Microservices is an architectural style that structures an application as a collection of loosely coupled services, which implement business capabilities. The microservice architecture enables the continuous delivery/deployment of large, complex applications. It also enables an organization to evolve its technology stack.
3. Monolithic Applications
A monolithic application is built as a single unit.
Enterprise Applications are built in three parts,
• Database
• Client-side (user)
• Server-side application
4.
5. Problems of Monolithic Applications
• Simple application will have grown into a monstrous monolith.
• The larger the application, the longer the start-up time is.
• Difficult to scale because different modules have conflicting resource
requirements.
• Reliability
• Extremely difficult to adopt new frameworks and languages.
6. Microservices
Microservice architecture is a method of developing software
applications as a suite of independently deployable, small, modular
services in which each service runs a unique process and
communicates through a well-defined, lightweight mechanism to
serve a business goal.
7.
8.
9. A monolithic application pull
all faction into single process
A microservice architecture application
put each element into a separate service
Scale by replicating Scale by distributing these services
10.
11. Benefits of Microservices
• It tackles the problem of complexity.
• Each service to be developed independently
• Each microservice to be deployed independently.
• Each service to be scaled independently.
12. Drawbacks of Microservices
• Deploying a microservices-based application is also much more
complex.
• Microservices is the partitioned database architecture.
• Testing a microservices application is also much more complex.
13. Summary
• A Monolithic architecture only makes sense for simple, lightweight
applications.
• You will end up in a world of pain if you use it for complex
applications.
• The Microservices architecture pattern is the better choice for
complex, evolving applications.
14. References
• Chris Richardson of microservices.io
https://www.nginx.com/blog/introduction-to-microservices/
• What is Microservices Architecture
https://smartbear.com/learn/api-design/what-are-microservices/
• Microservices
https://martinfowler.com/articles/microservices.html
At the core of the application is the business logic, which is implemented by modules that define services, domain objects, and events. Surrounding the core are adapters that interface with the external world. Examples of adapters include database access components, messaging components that produce and consume messages, and web components that either expose APIs or implement a UI.
Applications written in this style are extremely common. They are simple to develop since our IDEs and other tools are focused on building a single application. These kinds of applications are also simple to test.
Monolithic applications are also simple to deploy. You just have to copy the packaged application to a server. You can also scale the application by running multiple copies behind a load balancer. In the early stages of the project it works well.