When a system is split into services but the links between them remain monolithic, the result is a distributed monolith: the shape is that of microservices, but releases are shared. A change in one service forces the neighbouring services to be rebuilt and redeployed, so the cost of a distributed system is paid from day one, while its benefits — independent teams and releases in small increments — never materialise.
How to recognise one
- two or more services have to be deployed together: the “payments” release does not go out without re-releasing “orders” and “inventory”;
- “chatty” synchronous calls: a single client operation triggers a long chain of network requests;
- a shared database, or reading other services’ tables directly, bypassing the owner’s API, and the like;
- a small change calls for a coordinated release across several teams and lengthy testing of the whole system;
- a failure in one service stops the whole chain, not just its own function.
Microservices and a distributed monolith
| Aspect | Microservices | Distributed monolith |
|---|---|---|
| Deployment | each service on its own | only as a group or as the whole system |
| Calls | a few coarse-grained operations, not a network call at every step | synchronous chains of fine-grained requests |
| Data | its own database, other services’ data via the owner’s API | a shared database or direct reads of other services’ tables |
| Release | a team releases its service when it is ready | a coordinated release across several teams |
Where it comes from and how it is fixed
Splitting a system along technical layers often ends this way: instead of bounded contexts, teams carve out a presentation service, a business-logic service and a data-access service — and every operation travels the whole chain. The Azure guidance tests service boundaries against two criteria: no “chatty” calls between services and no dependencies that force two or more services to be deployed together. If two services constantly call each other, they may really be one service — and are merged back together. When in doubt, services are made larger: splitting one service in two is easier than moving functionality between existing ones. Where a call merely passes work on, a queue or an event is cheaper: for example, incoming requests are placed in a buffer queue, and the delivery history is assembled from the delivery service’s events. Fowler advises not to consider microservices as long as the system can be run as a monolith, with modularity kept inside it.
Sources
the term is written from these pagesVerified 8 Nov