Skip to content
About
Main content
Distribution & Failure

Distributed Systems Coordination

Who is allowed to decide, and how does everyone else learn the decision without asking?

Who this mechanism is for: a developer who writes services, calls APIs and knows basic SQL, and who now has to run software on more than one machine. You do not need to know how , replication or databases work inside. Every technical term is explained the first time it appears, and again in the glossary at the end. You do need to be willing to read some arithmetic: most claims here are small calculations.

The story we will follow

Ingrid Haugen is a backend engineer at Tixora, a company that sells tickets for concerts, football matches and festivals. At the heart of Tixora is SeatKV, a key-value store the company built itself. It holds the status of every seat ("seat A12 of show 881 is FREE, HELD or SOLD") and every shopping-cart hold. SeatKV runs on 12 storage machines (called nodes) in 3 racks, spread over 3 availability zones (separate buildings) of one cloud region in Frankfurt. The data is cut into 64 pieces (), and every piece is stored on 3 nodes. A small separate cluster of 5 machines, the metadata cluster, stores the list of nodes, the map of which node holds which partition, and who the current of each partition is. A second region in Mumbai serves fans in Asia.

Tixora handles about 20 million seat operations per day. But when a famous tour goes on sale, hundreds of thousands of requests arrive in the first minute. That minute is when everything breaks.

Ingrid works with two colleagues. Babajide ("Jide") Adeyemi is the site-reliability engineer on call. He watches the dashboards and proposes quick fixes: "lower the ", "add nodes", "add retries". Carmen Reyes is the product lead. She asks the "why can't we just ...?" questions: "why can't we sell the same seat from Mumbai in 20 ms?", "why can't we never lose a sale?"

During the next on-sale season Ingrid will meet five problems, one at the start of each article. Each problem looks like a bug. Each is actually a consequence of one hard fact: machines that share nothing can only talk by messages, and a message that does not arrive tells you nothing about why. At the end of each article we go back and solve her problem.

The main idea of this whole mechanism:

How this mechanism is organized

After that: a summary, hands-on labs, interview questions and a glossary.

One request: do not skip the numbers. This mechanism quotes round-trip times, failure probabilities and message counts. The ratios between them decide which design is possible.

What do I do, and what does each option cost?

Can I see it myself?

Can I reason about it under questioning?

Trade-offs

The tensions this mechanism takes a position on. Each recurs across mechanisms.

Show all 6 trade-offs
Recurring principles

Ideas this mechanism meets that keep coming back, mechanism after mechanism.

Show all 16 principles