Microservices vs Monolith

Rohit Kumar Dubey
4 min readJul 31, 2022

--

There were phases where the way of deploying applications grew and a few of them revolutionized the entire deployment practices. Let’s discuss them.

Applications deployed to local machines of the users

Just after the phase of computers that were not able to fit in a room, there came an era of desktop computers. So whenever there was a need to deploy applications, the developers installed the entire environment to deploy their applications that too on their local machine.

Then came modular application development wherein the large codebase which was deployed all at once was to be broken down into small chunks known as modules which could be brought into use for the development of other applications. This helped in arranging the functionality of code in a nice and ordered manner. The entire process was termed Modularization.

Applications were deployed over remote servers

Then there was a time when the developers deployed their applications on remote servers and then the users could access those applications easily on or through their browsers. It was a revolutionary change as previously it was supposed to be installed on the users' machine but now it went directly to the remote services bringing down the workload of the developers to a greater extent.

The Monolithic model

The term Monolith meant “composed all in one piece” according to the Cambridge dictionary it also meant “too large” and “unable to be changed”. This model had the applications tightly coupled than loosely coupled as in modular applications. In this architecture, each component and its associated components must all be present to be executed or compiled to run or execute the entire application.

They were also referred to as single tiered which meant their smaller components were combined to make a larger codebase which was usually tough to handle.

There was also a major drawback in these monolithic models where in order to make a minor change or commit to a piece of code it required the entire application to be compiled and rerun to execute the entire application. This in parallel increased the chance of bug introduction in the code which would be really tough to handle. Despite these disadvantages, the monolithic models are still in use due to the advantages it offers.

Advantages

  • Easier continuous development
  • Reduced latency
  • Simplifying cross-cutting concerns

Disadvantages

  • Difficult to scale
  • Incoherent codebase
  • Implementation constraints

The Microservices

They can be easily understood as an upgraded version of the monolithic model. Here the larger or the tightly coupled codebase was broken down into loosely coupled modules for specific functionalities. Then these modules or mini-applications were deployed over different servers to handle those particular applications or models and then these servers were made to communicate over a network for the implementation of the application according to the user. These were then combined to form an entire web application for further usage.

Advantages

  • Independently managed and deployed
  • Dynamic scaling
  • Faster release cycle.

Disadvantages

  • High failure chances during communication between different services
  • Tough to handle latency and load balancing
  • Complex testing

Thanks for giving it a read, Happy Reading! :)

Feel free to reach me out on LinkedIn or Twitter for any sort of suggestions or queries!

--

--

Rohit Kumar Dubey

Cloud ☁️ & DevOps 🐳 Enthusiast | Learner 📚 | Explorer 👨🏻‍💻