Monolithic and Microservices Architecture.

Monolithic and Microservices Architecture.

So, we have been hearing buzzwords like cloud native, containers, etc., flying around. Before we can get to understand these technologies and their use cases, let us get to know the basics.

When we set out to develop an application or a software we have different approaches that we can use. The approach we decide now has future consequence on how our application scales when we add more users or when something goes down in the system. The following are the 2 popular approaches used :

1) Microservices Architecture.
2) Monolithic Architecture.

Don't worry if you have never heard of them, we'll discuss them in this blog.

Let's get started!

In a microservice architecture all the functional components of the application are implemented as separate component. They communicate with each other via external interfaces such as API's. In a monolithic architecture, the components are bound together as one cohesive unit.

The following pictures of an Airport booking system give a nice idea of the above definition :

Microservices Architecture


Monolithic Architecture blog pic monolithic.png

Now let's explore them in depth,

-> In terms of latency (delay by the system in response to a request) : Monolithic comes on top , even when the best practices are applied in the microsystem services. Credit for this goes to the 'tightly bound' concept of the monolithic architecture.

-> In terms of the usage of programming language : Monolithic software need to be programmed using the same language throughout as the whole system is bound together, but in a microservices system since the different functionalities are applied as isolated components, different components can be coded using different programming languages.

-> In terms of scaling : Monolithic software is a bit clumsy to scale as
       1) The whole of the system needs to be scaled even if one component of the software is receiving heavy traffic.
      2) Since the whole system needs to be scaled the time required increases as the codebase starts to get bigger.
Whereas in the microservices model, only the component that receives increased traffic can be scaled individually.

-> Failure and other aspects : When a failure occurs in a monolithic system, it is difficult as all the components are interconnected and many instances of the error may be present in different components. Whereas in a microservices architecture it is easy to rectify the failure as the component is isolated and also the time taken in rectifying the error may also be less in this type of systems.

So to conclude both the systems of architecture have their own set of advantages and disadvantages. The application of these architecture should be based of the application/software being implemented.

One another article that I found helpful while learning this topic is linked here