- Loosely Coupled: You must be able to deploy a single microservice independently.
- Small & Focused: Microservices need to focus on a unit of work and are small.However, there are no rules on how small a microservice must be.
- Language Neutral: Microservices do not need to be written using the same/specific programming language.
- Bounded Context: Particular microservice does not â€śknowâ€ť anything about underlying implementation of other microservices surrounding it.
Microservices vs monolithic architectures Monolithic
- A single code base for the entire application.
- Complex deployments with maintenance windows and scheduled downtimes.
- Requires you to scale the entire application even though bottlenecks are localized.
- Multiple code bases. Each microservice has its own code base.
- Simple deployment as each microservice can be deployed individually, with minimal if not zero downtime.
- Enables you to scale bottle-necked services without scaling the entire application.
Service-Oriented Architecture (SOA) vs. Microservices Service-Oriented Architecture (SOA) is suited for:
- Large distributed system
- Overall business transformation
- Large scope spanning multiple system
Microservices are suited for:
- A single distributed system
- Accelerated realization of benefits
- Specilization of SOA
Microservice Pros and Cons Pros
- Microservice architecture gives developers the freedom to independently develop and deploy services.
- Code for different services can be written in different languages.
- The developers can make use of the latest technologies of choice.
- Starts the web container more quickly, so the deployment is also faster.
- No long-term commitment to a technology stack.
- Due to distributed deployment, testing can become complicated , leads to duplication of effort and is slightly tedious.
- When number of services increases, integration and managing complete products can become complicated.
- Developers have to put additional effort into implementing the mechanism of communication between the services.
Are Microservices the Future? By taking the time to do this we clearly think that the microservices architectural style is an important idea â€“ one worth serious consideration for enterprise applications. Amazon, Netflix, The Guardian, the UK Government Digital Service, realestate.com.au, Forward, comparethemarket.com and many other large-scale websites and applications have all evolved from monolithic to microservices architecture and many more are adopting this trend.