TECH 14 min

Distributed Monolith: When Microservices Are Just a Monolith with Network Latency

3 services, 1 PostgreSQL, shared Redis, one docker-compose — and the illusion of independence. How to spot a distributed monolith in your own architecture, when it's actually useful, and when it's time for real separation.

Distributed Monolith: When Microservices Are Just a Monolith with Network Latency

You split your code into services. You have separate containers. You even have a gateway. So why does deploying one service still break the other?


What is a distributed monolith

A distributed monolith is an architecture that looks like microservices but behaves like a monolith. Services are separated at the code level but remain coupled at the infrastructure, data, or deployment level.

Classic symptoms:

Sound familiar? That's our architecture. And we believe that right now – it's the right choice.


When a distributed monolith is the right choice

Here's an unpopular opinion: a distributed monolith isn't always a problem. At a certain scale, it's the optimal architecture.

Benefits we get

1. Operational simplicity – One docker compose up brings everything up.

2. Development speed – A shared package means DRY.

3. Transactional integrity – One PostgreSQL = the ability to JOIN across schemas.

4. Debuggability – One docker compose logs shows the entire request flow.

5. Cost – One server instead of three.

The formula: when a distributed monolith is enough

Team < 5 developers, load < 1000 RPS, deploys < 5/day, one server handles it, no requirements for independent scaling.


Step-by-step evolution plan

Phase 1: Hardening (effort: low, impact: 80%)

Phase 2: Infrastructure independence

Phase 3: True microservices (team > 5)


Conclusion

A distributed monolith is not a diagnosis. It's a stage in architectural evolution. 80% of microservice benefits can be achieved with 20% of the effort – by splitting Redis, adding a circuit breaker, and versioning your shared package.


Sign up: legal.org.ua