Skip to content

Monolithic and Microservice architectures

Monolithic

All code contained in the same repository, same set of nodes in a cluster responsible for handling any possible application request.

In a monolithic architecture, all features and functionalities are integrated into a single, unified codebase, often deployed as a single application.

Advantages:

  • Simple architecture, no need to do complex architecture design in advance
  • Low deployment cost, just package the whole project on tomcat server
  • Simple to scale - we can scale the application by running multiple copies of the application behind a load balancer

Disadvantage: High coupling, difficult to maintain and upgrade. Also, complex projects with many modules take a long time to compile and package.

Microservice Architecture:

Definition: Microservices divide an application into a collection of small, independently deployable services, each responsible for a specific functionality and communicating via APIs or messaging.

Advantages:

  • Reduced coupling, each module has less code and does not affect each other after the service is split.
  • Facilitates service upgrade and expansion
  • Increase maintainability, fault tolerance.

Disadvantage: Service splitting makes deployment complex and introduce the following problems

AD_4nXe7MxcK-AnxQ9Cl6ksgFtKqR_WguUs-D_LbTuK5-TacuC2I2w1reWhQUeH5xBR9CxfvqGKa1mpOz36IeLPG9R3ZI3WatK1brpcT9kLlQprdvdQU9SPK5CeLoUdOUYJhOMu5Kh6x