Microservices is a architectural pattern where a structure of an application is decomposed as collection of loosely coupled services. These services are responsible for handling separate business capabilities.
Microservices helps software teams to continuously deliver large scale complex application in pieces. (
Should you use microservices)
We all can search and find theories of microservices, but practical use cases and practical issues are what most of us will be interested in espeically when such resources are rare. So I thought of organizing this page to list some concerns involved.
Traditionally monolithic architecture is used for many software's but it generates bigger problems with time.
- Involves a single code base which increases code complexity, learning curve, maintainability, dependencies
- Overloads IDE since there's only single code base
- Difficult continuous integration since all application is a single one
- Scaling is linear. Since there is no modularity all modules comes as a single package. Cannot scale different modules separately based on the requirement (Even if module A gets used 99% and B 1% both will be handled via. same infrastructure)
For smaller teams most of the time monolithic will be the way to go.
Consider microservices if you have previous experience but not because you want to try it. If your application tends to get bigger , much complex or if you encounter a non-functional business requirement such as one part of the application need higher performance consider using microservices. This is because separate services can scale independently. Note that what can be done in monolithic can be done in microservices as well.
Patterns in Microservices
There are patterns which can be used with Microservices.
API Gateway (source)
There could be requirements from front-end to have an API which would access multiple microservices to retrieve data. Solution here is to create a separate API Gateway which would access required microservices and give what you need.
API Composer is when you need to query multiple services where services uses Database per service pattern. API Gateway often does API composition as well.
Microservices in Azure - Service Fabric
https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-overview-microservices
https://azure.microsoft.com/en-us/blog/microservices-an-application-revolution-powered-by-the-cloud/
https://docs.microsoft.com/en-us/azure/service-fabric/
Case studies
Microservices - Case Studies