Don't Build a Distributed Monoliths

Don't Build a Distributed Monoliths

Microservices architecture has become popular over the past few years. As a result, many developers, companies have started building their applications using a microservices architecture. There are several reasons why a company or developer would want to move to microservices, including building a scalable, Autonomous, Maintainable applications. as one of the primary reasons to build an application using microservice architecture is to have scalability. Therefore, microservices should have loosely coupled services which enable every service to be independent. The distributed monolith architecture takes this away and causes most components to depend on one another, increasing design complexity.

Distributed Monolith is one of a famous anti-pattern in distributed systems. it's a system that resembles the microservices architecture but is tightly coupled within itself like a monolithic application.

So, building a microservices apps comes with a lot of advantages. But while making one, there are good chances that you might end up with a distributed monolith.?

To identify whether a system is of microservice architecture or just a distributed monolith, there are some factors and behavior of the system that you can look out for :

  • A small change to application logic requires concurrent changes to many other components.
  • Many services in your application share a resource (such as a database) which makes them tightly coupled.
  • Multiple microservices and components share common, boilerplate code.
  • Low latency communications between services.
  • Services Don’t Scale Easily.

Distributed monolith can badly affect the team’s productivity. Implementing a new feature on top of existing services can become difficult.?

We all want to start with the goal of building microservices. But, sometimes, the implementation can turn the application into a distributed monolith.?It may be because of some bad decisions or application requirements, etc.?

Remember that traditional monoliths aren't always bad, and microservices aren't always good. But, if you think you made a serious mistake in your attempt at breaking up a monolith, the thing to do is go back, make better choices.

Finally Regardless of your system architecture you should be able to clearly identify if your system is a monolith, microservices, or a distributed monolith.

#distributedsystems #microservices #architecture

要查看或添加评论,请登录

社区洞察

其他会员也浏览了