Should you consider moving from Monolithic to Microservices?

Prasanth C
2 min readDec 13, 2021

Firstly, we will see what Monolithic Architectured application really is.

A monolithic application is a huge single application that is a pack of all the modules into one.

Some pros and cons of Monolithic architecture to help you understand better,

  • Modules in this architecture cannot be reused as it is tightly coupled into one application.
  • If the codebase is large it becomes hard to understand, difficult to maintain and challenging to scale.
  • If there is a bug or enhancements needed in one module, after the fix, the whole application needs to be redeployed.
  • Application takes a lot of time to startup as it includes everything
  • Also, as everything is packed into one, it cannot scale individual modules for optimized performance. For example, if an application has various modules, some modules require more RAM, some modules may have more incoming requests (like the user module will have more requests than the admin module).
  • Migrating the code to new technology will be riskier.
  • Creating a new project and initial development is easy in Monolithic Architecture.
  • Testing is simple as all the services are available in one place.
Simple Monolithic architecture representation

Microservices are smaller services which is the result of breaking a larger application

More on Microservice Architecture,

  • Modules in this architecture can be separated and converted into a service that is highly maintainable.
  • It can be scaled individually depending on the resources it needs and if it is properly planned it is cost-effective too in the long run.
  • If one service is down, it doesn’t affect the other services which are running independently. For example, In a shopping application, if the payment service is down, still user can browse the items listed on the products page and can add them to the cart if needed.
  • Each service can be deployed individually without disturbing other services
  • Suitable for larger applications and it may consume some effort initially to design the services and communication between them properly.
Simple Microservices architecture representation

Putting it all together,

There are many cases Microservices architecture is not a good choice. Small applications like blogs, portfolio apps meant to develop and roll out quickly, can consider Monolithic as it requires very minimal effort to kickstart. If a project is expected to grow large and has got the scope to scale individually by modules in the future, it would be better to consider microservices. Invest some time initially for the design and setups which will benefit in the long run.

--

--