Micro Vs Monolithic

Created at 2021-10-14 Updated at 2024-04-17 - 2 min. read Tag system-design

We all have been always listening about the different architecture we have. Some of the famous architecture are

  • Monolythic

  • Micro service

Monolith means composed all in one piece like a sandwich. The Monolithic application describes a single-tiered software application in which different components combined into a single program from a single platform. Components can be:

  • Authorization layer

  • Presentation layer

  • Business logic

  • Database layer

Third party integration

  • Notification layer

  • UI layer

Example:

https://miro.medium.com/max/700/1*TRmj8lWyzCufEGjxCONAog.jpeg

Let’s take example of a e-commerce website

Browser
mobile ——> Application layer —————> RDMS

Pros :

  • Easy to develop

  • Easy to test

  • Easy to deploy

  • Easy to scale horizontally

Cons :

  • Maintenance

  • Redeploy for any fix

  • Reliability

Microservice Architecture

Microservices is an approach to application development in which a large application is built as a suite of modular services (i.e. loosely coupled modules/components). Each module supports a specific goal and uses a simple, well-defined interface to communicate with other sets of services.

Instead of sharing a single database as in Monolithic application, each microservice has its own database. Having a database per service is essential if you want to benefit from microservices, because it ensures loose coupling. Each of the services has its own database. Moreover, a service can use a type of database that is best suited to its needs.

Example

  • Payment service

  • Balance service

  • Coupon service

  • Shipping service

Pros

  • Better testing

  • Betting deployment

  • Easy to introduce any new technology

  • Easy to understand

Cons

  • Testing is more difficult

  • Deployment complexity increases

  • Debugging complexity increases

Table of Content

Site by Ashutosh Kumar Singh using Hexo & Random

Traveller - Developer - Foodie - Biker - Cyclist - Rider - Technocrat