Video in progress

Strong Junior 🧩 Microservices

What is meant by a "distributed monolith", and how do you recognize it?

It's a system that looks like microservices from the outside but is really tightly coupled: the services can only be deployed together, and if one goes down everything goes down. You pay the price of microservices and don't get the benefits.

📖 Answer

Some familiar signs:

  • one feature means changing 4-5 services at the same time and deploying them in a certain order;
  • services read or write shared database tables;
  • a "common" library has domain classes (the Order, User entities), and when its version goes up, every service gets rebuilt;
  • the chain of synchronous calls for a single user request stretches to 5-6 services;
  • releases are still "all services together, once a month".

This is worse than a monolith: code calls have turned into network calls, but there's no independence.

How do you check? Take the last few features and count how many services each one touched. If almost every time the same group of services changes together, they probably should have been one service. Sometimes the right fix is merging the services back together, and that's a perfectly normal decision.