Popular Posts

Friday, December 23, 2016

Monolithic vs. Microservices Architecture

Monolithic Architecture

In a server-side application Its common to have following layers:
Presentation — responsible for handling HTTP requests and responding with either HTML or JSON/XML (for web services APIs).
Business logic — the application’s business logic.
Database access — data access objects responsible for access the database.
Application integration — integration with other services (e.g. via messaging or REST API).

Benefits of Monolithic Architecture

* Simple to develop.
* Simple to test. e.g. you can implement end-to-end testing by simply launching the application and testing the UI with Selenium.
* Simple to deploy. You just have to copy the packaged application to a server.
* Simple to scale horizontally by running multiple copies behind a load balancer.
* In the early stages of the project it works well and basically most of the big and successful applications which exist today were started as a monolith.

Drawbacks of Monolithic Architecture

* This simple approach has a limitation in size and complexity.
* Application is too large and complex to fully understand and made changes fast and correctly.
* The size of the application can slow down the start-up time.
* You must redeploy the entire application on each update.
* Impact of a change is usually not very well understood which leads to do extensive manual testing.
* Continuous deployment is difficult.
* Monolithic applications can also be difficult to scale when different modules have conflicting resource requirements.
* Another problem with monolithic applications is reliability. Bug in any module (e.g. memory leak) can potentially bring down the entire process. Moreover, since all instances of the application are identical, that bug will impact the availability of the entire application.
* Monolithic applications has a barrier to adopting new technologies. Since changes in frameworks or languages will affect an entire application it is extremely expensive in both time and cost.

Source:
https://articles.microservices.com/monolithic-vs-microservices-architecture-5c4848858f59
http://www.martinfowler.com/articles/microservices.html
http://microservices.io/patterns/microservices.html

No comments: