Monolithic v/s Microservices approach

Kuldeep Singh
Deskera Engineering

--

Most development projects start with the monolithic approach. Depending on the business though, and for scalability, it is useful to switch to microservices at some point. This is in some ways similar to upgrading your highways and adding interchanges.

Your applications can grow as your company and its requirements grow. As the company gained more and more active users exponentially. Deskera decided to move from a monolithic to microservices approach.

Monolithic Architecture

Monolithic applications have long life cycles, are updated infrequently, and changes usually impact the entire application. Adding new features re-configuring and updating the entire stack.

This process delays time-to-market and updates in application development.

Technical debt due to monolithic architecture -

There are a few reasons why this monolith eventually becomes a nightmare for developers

  • The codebase is too big for a new team member to understand.
  • If the code base is difficult to understand, changes made will often be detrimental
  • Big applications require more deployment time frames.

What are Microservices -

Microservices is an architecture design to build distributed applications. Microservices break an application into smaller services It allows each service to scale or update without disrupting the other services in the application.

Microservices Architecture

Microservices architecture was designed to remedy this problem. All services are created individually and deployed separately. This allows for autoscaling based on specific business needs

Benefits of Microservice Architecture -

As an engineer, I have experienced many benefits with microservices architecture, jotting down few -

  1. Improved Scalability — Microservice allows the developer to scale services up or down, the ease of scaling is dramatically less than monolithic architecture. Here, the entire application need not be taken down and deployed again. This enables a seamless update process and functioning of the application.
  2. Enhance developer productivity — New team members can get up speed rapidly due to its simplicity and isolated piece of functionality than an entire monolithic application. The microservice approach lets developers choose the right tool/ technology for the right task.
  3. Smaller and focused team — Development teams are often organized by microservices they work on. These teams involve fewer people, and they are more focused on a small set of functionalities at a time. The overall coding and testing process for individual services is more precise as a result.
  4. Technology proofed applications — As we are living in the technology era, technology keeps upgrading every day. Microservice architecture makes it easier to respond by replacing or upgrading the individual services affected without impacting the whole application.
  5. Simplicity to deploy and update — Because it is independent containers based, the system can be easily modified. In case, if a problem occurs in a particular microservice, the rest of the application won’t be harmed as the issue will be handled in isolation.
  6. CI/ CD — Microservices architecture is a great enabler for continuous delivery, allowing frequent releases whilst keeping the rest of the system available and stable.

Communication between Microservices -

There are two basic patterns for messaging or communicating between microservices

  1. Synchronous Communication — In this approach, a service can communicate through APIs exposed by another microservice through Http or gRPC calls. This option is a synchronous communication pattern because the caller waits for a response from the receiver.
  2. Asynchronous Communication — In this approach, a service sends a message without waiting for a response, and one or more services process the message asynchronously. This communication can be done through Kafka implementation.

Conclusion

Microservices are the most suitable for large-scale applications. To conclude it is in summary, a complex architectural system in which a large application is broken down in many loose coupled microservices. This makes it more manageable with respect to resource usage and easier to develop with many independent teams.

--

--