Microservices vs Monolith

System architecture is important part while we design our product.

cda4db94-ac16-43ba-82c4-53632154afc7.jpg Source n-ix.com/microservices-vs-monolith-which-ar..

Definitions

Monolith

Huge systems running entire system, need not to be single, i.e. we can scale horizontally.

Advantages

  1. Good for small team.
  2. Less complex, easy to maintain.
  3. Less duplication of code.
  4. Faster, procedure call is faster, cuz its within same machine

Disadvantage

  1. More frequent deployments, as everything is interconnected
  2. If server crashes, whole system will stop

Microservices

When monolith breaks into pieces called micro services. Small business unit running specific functions.

Advantages

  1. Easy to scale, each service is concerned with some function
  2. Team management is easy.
  3. Parallel development is easy.
  4. Analysis of service is easy.

Disadvantage

  1. Not easy to design

Migrate from monolith to microservices

When our product grows larger, need for microservice architecture increases, so different teams can work on different services, some changes may break the existing code. New services should be separatly