Chapter Six · Building Blocks
Messaging and Failure
Every design at scale sends work that nobody waits for, and every design at scale has a part that is failing right now. Five lessons cover both: the three shapes of messaging, what a delivery guarantee really promises, overload at one tier, failure spreading across many services, and availability as arithmetic over zones and regions.
The chapters before this one made a design faster and larger. This one makes it survive. Two things tend to happen at the same point in a design: some work moves off the request path onto a broker, and the number of services grows until one of them is always failing somewhere. Both lead the interviewer to the same question, which is what happens when a part does not answer.
The chapter follows that question outward. It starts with one message: which shape of messaging carries it, and whether it can arrive twice, be lost or arrive out of order. Then one tier with more work than it can drain, where a queue either absorbs a burst or hides an outage. Then a fleet, where one slow service takes down others that have no bug of their own. It ends at regions, where an availability target becomes minutes a month and every extra nine has a price.