The microservices pattern involves creating multiple applications—or microservices—that can work interdependently. Although each microservice can be developed and deployed independently, its functionality is interwoven with other microservices.
A key concept in the microservices pattern is the separate deployment of units. This creates a streamlined delivery pipeline that allows for easy deployment of microservices and increases application scalability. Another key feature of this pattern is that it is a distributed architecture, meaning that the structure’s components can be fully decoupled and accessed through remote access protocols such as REST, SOAP, or GraphQL. This distributed nature of the pattern allows for its high scalability properties.
The microservices architecture uses several design patterns: Aggregator pattern, API gateway design pattern, chain of responsibility pattern, branch pattern, and asynchronous messaging design pattern. Each approach provides a method to manipulate data to produce services.
Image
Pros
- Independent deployment of each microservice.
- Engineers can write and maintain each microservice independent of the others, potentially increasing its functionality and scalability.
- As each microservice is small, it is easier to rewrite and update.
Microservices architecture is best for web applications and websites with small components. It is also useful for corporate datacenters that have well-defined boundaries.
Cons
- Complexity, particularly in the network layer.
- Decoupling services to work completely independent of each other requires significant architectural expertise.
- Deployment overhead
Conclusion
References