Skip to content
About
Main content
Distribution & Failure

Emergent Failure Dynamics

What happens when nothing is broken, every component is healthy, and the system's own response to stress makes the stress worse?

Who this mechanism is for: a developer who writes services, calls other services over a network and has seen an outage or two, but has never studied queueing theory, control theory or failure analysis. You do not need any background in distributed systems. Every technical term is explained the first time it appears, and again in the glossary at the end. This mechanism is about failures that have no bug and no broken part: the system fails because of how its own parts react to each other.

The story we will follow

Selin is a backend engineer at Wayhop, a ride-hailing company. Wayhop serves about 6 million rides per day in 40 cities. A rider opens the app, the request passes through an API gateway to a booking service, and the booking service calls a pricing service, a dispatch service (which matches riders to drivers), a maps service, a payments service and, in the render path, an optional "ride again?" recommendations service. Prices come from a pricing database, with a cache in front. Two hundred "search nodes" answer the question "which drivers are near me?". At night a pipeline turns the day's trip events into reports for finance and operations. Bruno is the engineering director. He asks the hard questions: "Why did a 3-second blip cost us 40 minutes?", "Why not just add servers?", "Why not just restart it?" Wei is the data engineer who owns the nightly pipeline.

Over four months Selin will meet seven incidents, one at the start of each article below. Each one looks like a bug. Each one is actually a dynamic: a behavior that appears only when the parts of a healthy system react to each other. At the end of each article we go back and explain what happened and what to change. The numbers in the story are illustrations. The mathematics in the articles is real.

This is the main idea of this whole mechanism:

How this mechanism is organized

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

There is an order behind the articles. The first articles are increasing distance from the client. Feedback loops are driven by clients (they ). Death spirals are driven by the system itself (it garbage-collects and compacts). Overload defences come last because they are the answer to the rest.

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.

Recurring principles

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

Show all 12 principles