Cloud-native applications are those that are specifically written to run on the cloud, usually within a PaaS. They take advantage of the benefits of the cloud directly - for instance, using cloud functions like elastic scaling to meet capacity needs. What’s more, these applications are built using different tools and runtimes than traditional applications. They tend to be more likely to employ Polyglot Development and Polyglot Persistence. For example, an application might not use a relational database but instead use a NoSQL database, such as Cloudant or MongoDB. Likewise, a Cloud-native application has a different set of assumptions about what is provided by its infrastructure and how.
Over the last several years that we have been building Cloud-Native applications we have found that there is a strong affinity between the 12 factors and the Microservices Architecture. Microservices applications are automatically 12-factor compliant and thus more able to run in a Cloud-Native way. We have found that if you design for microservices and cloud native at the same time then the benefits to the team are multiplied. Some of these benefits are:
- Faster development
- Smaller “Blast radius” for decisions
- Better ability to pick the right tool for the right job
In this section of our pattern language, we introduce some of the most basic patterns for Cloud-Native development. These include:
- Microservice Design is the root pattern of this section. It leads you into a process of discovering your microservices through Domain-Driven and Event-Driven Design.
- Bounded Context is a key concept for developing a good microservice
- Performing Event Storming is the crucial step that helps you set the stage for the other pieces in your microservice design.
- Identifying Entities and Aggregates is required to find the basic concepts to be implemented as microservices in a domain
- Identifying Repositories and Services help you identify processing elements in your microservices
- Container Orchestrator solves the problem of deploying numerous containers across multiple servers and managing them while they run.
- Service Registry solves the problem of discovering services when your number of services increases and the complexity of dealing with local and remote services becomes difficult.
- Event Driven Architecture is an important design consideration in building highly performant microservices architectures.
- Service Mesh is an important implementation approach to take care of many of the nonfunctional aspects of building with microservices.
- Results Cache is a fundamental technique used to improve the performance of data access in a microservices design especially when microservices are being called repeatedly.
The connections between most of these patterns is shown below: