Monolith or Microservices

Rajitha Gunawardhane
2 min readMar 29, 2020

Recently I had to work on a huge monolith application, which is very hard to maintain. At the same time, I work with nice set of microservices as well. Getting on board with microservice-based project is so easy when compared with the huge monolith. Bug fixing, Feature development and Releasing also quick with microservices.

While working on both Monolith and Microservices, another new application came in to develop and we started to think of what is the best architecture for it. This new application is an image rendering application. Having experience with good old Monolith and new Microservices helped to make the final decision. Following points help us to make this decision.

Interaction with other application:

Does your application need to be accessed from other applications? If there are more dependencies, then running it as a self-contained microservice will be a good choice.

Expected load to handle:

Having a multi-tier single application (Not a Monolith we can call it as a Polylith ;-) ) is easier to manage than collection of microservices. Yet if it needs to handle a huge load we have to scale the application. Vertical scaling of a single application will not be effective (cost, effort, etc). Yet Microservices are great at vertical scaling.

What are the future expectation:

Does your application expect huge improvements in the future? Maybe you are working on the initial version of a huge application where stakeholders already have plans to expand it with many new functionalities/modules. If this is the case, the microservice based approach is a good choice.

On the other hand, if your application is going to be a small one where you do not expect totally new modules in the future it is good to go with a Polylith.

Team/Organizational readiness for Microservices:

If you choose Microservices architecture for your application, whole organization needs to be aware that Microservices architecture is not a silver bullet (The famous quote about microservices ) where it will give a smooth trouble-free application to end-users. Microservices comes with its own challenges. Your organization needs to be ready, not only technical staff, management and all other stakeholders need to be aware of it.

Conclusion:

Monolith is not a bad choice over a microservice-based architecture. Both have its own good and bad. You have to choose based on your project or product and organizational readiness.

--

--