Book Deep Read · Fundamentals of Software Architecture · Chapter 9
Fundamentals of Software Architecture · Ch 9 · Mark Richards & Neal Ford · 2020
Every app you use has an overall "shape" behind it: are all the features crammed into one program, or split into dozens of small programs that shout to each other across a network? This chapter doesn't teach one particular shape. It covers the ground all shapes stand on: what the worst shape looks like, and the most basic dividing line between "one program" and "many programs."
In one big kitchen, the person chopping vegetables turns around and hands them to the cook. Fast, nothing gets lost, no charge. Now split the work across ten shops on a street: chopping happens in shop A, cooking in shop B, and couriers carry things in between. Couriers get stuck in traffic, deliver to the wrong door, get robbed; every trip costs money; and the street can be dug up and rerouted without warning. Separate shops can each grow on their own, but "handing something over" has turned from free into a business.
The most common software shape is actually no shape at all: features get piled on one by one, anything grabs whatever it needs directly, and eventually everything is tangled together like a spilled bowl of noodles. Pull one strand and the whole bowl moves. So people want to split things up. But many make one mistake when they do: they assume shouting across a network is as dependable as handing something across a room. At small scale the illusion holds; at large scale it fails all at once.
The book lists this illusion as eight beliefs that earlier engineers already paid for: that the network never drops anything, that a message takes no time, that the pipe is infinitely wide, that nobody is listening in, that the roads never change, that one person is in charge, that delivery is free, and that every road is the same. Each one is a real trap. Say you assume the next shop answers instantly; if one order passes through ten shops in a row and each adds a little delay, the customer waits forever. Another is easy to miss: with one program, when something breaks you read one notebook; with ten programs, you piece the truth together from ten notebooks, and the promise "either everything happens or nothing does" becomes very hard to keep.
Every architecture shape in the following chapters is first sorted into one of two buckets: the "one program" bucket and the "many programs" bucket. The first is simple, cheap, and easy to debug. The second lets parts grow independently, ship independently, and fail without taking everything down. The choice depends on whether you truly need parts to grow on their own; if you don't, don't pay the street's tolls for nothing. The honest cost: once you pick "one program," scaling up a single feature means scaling up the whole thing.
Before splitting, ask one question: how much am I willing to pay to hand things over a network? The network is unreliable, slow, and costs money; the benefits of splitting must outweigh that.
Want the Big Ball of Mud and client/server evolution, the eight fallacies of distributed computing one by one, the bandwidth math, and the monolith-vs-distributed comparison? → Switch to Deep
You might think the difference between monolithic and distributed is "how many services you have." It is really whether components talk across a network. Chapter 9 of FoSA is the base for every architecture style in Part II. It defines styles and a few "fundamental patterns" (Big Ball of Mud, unitary, client/server), splits every style into monolithic and distributed, and uses the eight fallacies of distributed computing to warn you: choose distributed and you have signed up for the network's bill.
The last chapter of Part I, "Foundations," and the doorway to Part II, "Architecture Styles." Chapter 8 covered how to slice components; this chapter covers the forms in which those components are organized. The eight styles in Chapters 10–17 are each sorted here into monolithic or distributed. In practice: the first-principles answer to "should we go microservices?"
Architecture discussions often stall for lack of a shared vocabulary. The book's starting point: a style name is compressed language. Saying "microservices" implies a topology, a deployment model, the characteristics it is good at, and its known traps, just as a design pattern name does for programmers. So styles have to be defined first and placed on one shared map.
The second problem is more practical. Since the 2010s, many teams have treated "go distributed" as the default upgrade path. But going from monolith to distributed doesn't change how code is organized; it changes the medium between components: what was one in-memory function call becomes a network round trip that can fail, can be slow, and costs money. Without seeing that cost up front, teams find out only after they grow, when they are fighting timeouts, cascades, inconsistent data, and failures they can't trace, all at once.
Big Ball of Mud is the name for "the absence of any discernible architecture structure," from Brian Foote and Joseph Yoder's 1997 paper of the same name. The book's typical picture: every UI event handler writes database calls directly, with no real internal layering; draw the class dependency graph and nearly every node connects to every other. Nobody chooses it on purpose; it is where a system naturally ends up when no architecture decisions are made. The cost: the impact of any change is hard to predict, and deployment, testing, and scaling can only happen as a whole.
Unitary architecture is the early form where software ran on a single computer; today it survives mostly in constrained settings such as embedded systems. As computing spread out, a family of client/server variants appeared:
The book adds a sidebar: Java was born when three-tier was in fashion, so it built object serialization (Serializable) into the core of the language to move objects between tiers. Today it is rarely used that way, yet it is baggage that is hard to remove. Architecture fashions leave fossils in languages and platforms.
The book splits Part II's styles into two families. Monolithic: all code in a single deployment unit, covering layered, pipeline, and microkernel. Distributed: multiple deployment units connected through remote access protocols, covering service-based, event-driven, space-based, service-oriented (SOA), and microservices.
Distributed styles buy potential in performance (in the scaling sense), scalability, and availability: deployment units can scale independently, release independently, and fail locally without taking down the whole. But the book immediately adds that these benefits come with significant trade-offs, and the first to face are the eight fallacies.
The list was compiled by L. Peter Deutsch and colleagues at Sun Microsystems around 1994 (James Gosling added the eighth). A "fallacy" here means something people believe to be true that isn't. The book walks through the consequences of each:
The book's example: a wish-list service needs only the customer's name (about 200 bytes) but calls the customer-profile service's general endpoint, which returns the entire profile (about 500 KB). At 2,000 calls per second, that is roughly 500 KB × 2,000 ≈ 1 Gb per second of traffic; returning only the name would be about 400 KB per second. Being forced to receive a whole record when you need one field is called stamp coupling. The book's remedies: private RESTful endpoints, field selectors in the contract, GraphQL so callers declare the fields they need, consumer-driven contracts, or internal messaging endpoints. The rule in one line: pass the minimum necessary data between services.
Distributed logging: when a monolith fails, one log lets you trace the cause. In a distributed system a single request is scattered across logs from dozens of services in different formats, making root-cause analysis very hard. The book notes that consolidation tools like Splunk help, but only partly.
Distributed transactions: a monolith with one database guarantees "all or nothing" with an ACID transaction. In a distributed system data is spread across services, so you fall back to BASE-style eventual consistency or patterns like transactional sagas (a chain of local transactions plus compensating actions on failure), with far more complexity and far more ways to go wrong.
Contract maintenance and versioning: a contract is the behavior and data services agree on. In a distributed system services and teams are independent, so changing a contract means notifying every caller and coordinating deprecation of old versions, an ongoing communication cost.
Table 1 · Monolithic vs distributed (the book's classification + typical costs compiled for this page)
| Dimension | Monolithic | Distributed |
|---|---|---|
| Deployment units | 1 | Many, communicating over a network |
| Styles in the book | Layered, pipeline, microkernel | Service-based, event-driven, space-based, SOA, microservices |
| Inter-component call | ns to µs, never lost | ms, can time out or drop |
| Good at | Simple, cheap, easy to debug, easy transactions | Independent scaling and release, fault tolerance, high availability |
| Cost | Scale and deploy only as a whole; drifts toward a Big Ball of Mud as it grows | Must handle all eight fallacies; plus logging, transaction, and contract bills |
| Fits | Small team, tight budget, uniform scaling needs | Parts with very different characteristics (see Chapter 7's architecture quantum) |
Table 2 · Eight fallacies → questions to ask at design time
| Fallacy | Ask yourself | Common countermeasure |
|---|---|---|
| Network is reliable | What do I do when a downstream call fails? | Timeouts, retries, circuit breakers |
| Latency is zero | What is p99? How many hops in the call chain? | Fewer serial hops, parallelism, caching |
| Bandwidth is infinite | How much unneeded data does each call carry? | Field selection, GraphQL, consumer-driven contracts |
| Network is secure | Is every endpoint authenticated? | Service-to-service auth, least privilege |
| Topology never changes | Who tells me when the network changes? | Change communication with the network team |
| One administrator | How many teams' domains does this path cross? | Clear ownership and collaboration process |
| Transport cost is zero | What will the extra hardware and gateways cost? | Put infrastructure cost into the proposal |
| Network is homogeneous | Does the path cross gear from several vendors? | Monitor packet loss; don't assume uniform behavior |
The rule: only when parts of the system genuinely differ in the characteristics they need (scalability, availability, release cadence) can distributed benefits outweigh this bill. If the whole system needs the same characteristics, a monolith is usually cheaper, faster, and easier to debug.
Taken together: the Big Ball of Mud is what happens when you don't choose; distributed is the bill for choosing, a bill real enough to send one of Amazon's own teams back to a monolith; and distributed logging is a problem big enough that Google built a dedicated system for it. The book was written at the peak of the microservices wave, and this chapter's value is in laying the bill out before you sign.
In an architecture review, walk through the eight fallacies one by one (Table 2). In an interview, when asked "why not just go microservices?", answer: "First check whether the parts need different characteristics. Distributed means paying for network reliability, latency, bandwidth, security, and cost, plus three extra bills: logging, transactions, and contracts."
① An architecture style is a named way of organizing components; the name itself is compressed shared language.
② Big Ball of Mud = no discernible structure, the natural end state when no architecture decisions are made.
③ The client/server evolution (two-tier → browser + web → three-tier) is computing being split across more machines.
④ Every style is first sorted in two: monolithic (one deployment unit) and distributed (many units + a network).
⑤ The essential cost of distributed: calls between components turn from function calls into network round trips.
⑥ The eight fallacies: reliable network, zero latency, infinite bandwidth, secure network, unchanging topology, one administrator, zero transport cost, homogeneous network — none hold.
⑦ Bandwidth example: needing 200 bytes but getting 500 KB, at 2,000 calls per second, is about 1 Gb/s — stamp coupling.
⑧ Three extra bills: distributed logging, distributed transactions (sagas / eventual consistency), contract versioning.
⑨ Rule: distributed is worth it only when parts truly need different characteristics; otherwise a monolith is cheaper.
⑩ Interview line: "First ask whether the characteristics differ, then price out the eight fallacies one by one."