liveBook · Manning

Distributed monolith

As explained in Grokking Software Architecture

A distributed monolith is a system whose deployable units are separated across processes or machines but remain tightly coupled through shared data or synchronous call chains.

A distributed monolith splits an application into separately deployed services but leaves them logically coupled. It has the network complexity of distributed systems without the agility of genuinely independent services. section 12.2.4 section 12.11

Two common traps create this pattern:

  • A shared database lets a schema change break multiple services at once. section 12.2.4
  • Synchronous service calls make one service’s success depend on another’s availability. section 12.2.4

An order that waits on every service

An Order API checks inventory, charges payment, then asks Shipping to print a label. If each call takes 200 ms, the user waits at least 600 ms; if Shipping is down, the order fails despite available stock and a successful payment. Queueing label printing for later breaks this fragile synchronous chain. section 6.8.4 section 6.8.4

Figure 12.2 A Distributed Monolith provides the illusion of separation, but maintains extreme logical coupling. It is a monolithic ball of mud stretched across a fragile network.

Shows the illusion of service separation and the logical coupling underneath. section 12.2.4

Figure 6.14 Avoiding the Distributed Monolith: Breaking a fragile synchronous chain with an asynchronous queue ensures critical tasks succeed even if non-critical services fail.

Illustrates how queueing a noncritical task can protect the user-facing operation when a downstream service fails. section 6.8.4

How Grokking Software Architecture covers it

How deep it goes
Defines the pattern, explains shared-database and synchronous-call failures, and traces their operational costs.
Examples
Uses an order workflow that calls inventory, payment, and shipping services, plus a shared SQL database scenario.
What it assumes
Assumes familiarity with microservices and deployable services while defining the coupling that undermines their separation.
What you can do after
Evaluate whether service boundaries actually reduce coupling and recognize how synchronous chains spread failures.
How it connects
Links microservices to shared databases, synchronous HTTP, temporal coupling, and modular monoliths.

Also explained in

Compare how 2 books explain distributed monolith →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.