CMD Guide
HomeSystem DesignMental Models & Systems Thinking

Tail Latency & Fan-out Amplification — Why p99 Is the Number

The average is a liar — design for p99

"Average latency is 20ms" tells you almost nothing about user pain. A few percent of requests being slow (the tail, p99/p99.9) is what users actually feel — and at scale, a single user action often triggers many backend calls, which makes the rare tail the common case. This is the mental model behind Dean & Barroso's "The Tail at Scale."

One user request fans out to 100 backends; if each has a 1% chance of being slow, there is a 63% chance at least one is slow, so the whole request is slow
One user request fans out to 100 backends; if each has a 1% chance of being slow, there is a 63% chance at least one is slow, so the whole request is slow

The fan-out math (memorize this)

A request that fans out to N backends is only as fast as its slowest one. If each backend is slow 1% of the time (its p99):

P(at least one slow) = 1 − 0.99N. For N=100 → ~63%. For N=1 it's 1%.

So a "1-in-100 rare" tail latency becomes the majority experience once you fan out to 100 services or shards. Your service's p99 is dominated by your dependencies' tails, not their averages.

Fan-out NP(≥1 leaf slow) = 1 − 0.99NWhat it means
11%the leaf's own p99
10~9.6%your leaf p99 is your composed p90
30~26%a quarter of user requests touch the tail
100~63%the "rare" tail is the majority experience

The reusable rule: fan-out shifts the percentile, roughly by a factor of N. To hold a composed p99 across N=10 leaves, each leaf must hold roughly a p99.9 at the target latency — an SLO on the whole is an order-of-magnitude stricter SLO on every part.

What to do about tails

When hedging is the wrong choice

Hedging is not free. If your downstream service is already at 95% utilization, a 5% hedge can push it into saturation, making the tail worse for everyone. It also amplifies correctness risk: hedging a POST /charge can create two charges if the first request actually succeeded but its response was merely slow. Hedge idempotent reads (query, cache lookup) whose duplicates are harmless; avoid hedging non-idempotent writes (charge, transfer, email send) unless you have a strong idempotency contract.

Tied requests — the cheaper refinement from the same paper

Hedging waits for the p95 then duplicates; tied requests skip the wait: dispatch the request to two replicas immediately, each carrying the identity of its twin, and whichever server starts executing first sends a cancel to the other. Because the cancel fires at start-of-execution (while the loser is still queued), the duplicate rarely does real work — Dean & Barroso report only a few percent extra work with cancellation, versus hedging's full duplicate past the p95. Tied requests beat hedging when queueing (not service time) dominates the tail: there is no p95 wait, so the whole distribution improves, and duplicate work stays bounded. The cost: your RPC layer must support cross-server cancellation, which most off-the-shelf HTTP stacks don't (Dean & Barroso, "The Tail at Scale," CACM 2013).

The mental model

Whenever you see fan-out (scatter-gather, microservice graphs, sharded reads), think: "my latency = the worst of N, not the average of N." Design the tail down.

Takeaways


Re-authored for this guide; fan-out diagram hand-authored as SVG. Follows Dean & Barroso, "The Tail at Scale" (CACM 2013). See also: Capacity Estimation (latency numbers), Load Balancing (power-of-two), Designing for Failure.

🤖 Don't fully get this? Learn it with Claude

Stuck on Tail Latency & Fan-out Amplification — Why p99 Is the Number? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🎨 Explain it visually

Build the mental picture, not memorization.

I just read a lesson on **Tail Latency & Fan-out Amplification — Why p99 Is the Number** (System Design) and want to truly understand it. Explain Tail Latency & Fan-out Amplification — Why p99 Is the Number from first principles using ONE vivid real-world analogy and a visual mental model — draw it as ASCII art or a clear step-by-step diagram — with a concrete example using real numbers. Then ask me one question to check I got the mental picture, and wait for my reply. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🤔 Walk me through it (interactive)

Socratic — adapts to where you're stuck.

Teach me **Tail Latency & Fan-out Amplification — Why p99 Is the Number** interactively. Ask me ONE guiding question at a time, wait for my answer, and adapt to my confusion — build the idea with me step by step instead of explaining it all at once. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧪 Quiz me & fix my gaps

Active recall exposes what you missed.

Quiz me on **Tail Latency & Fan-out Amplification — Why p99 Is the Number** with 5 questions, easy to tricky, ONE at a time. Tell me if each answer is right; at the end, explain clearly what I got wrong and why. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🧠 Make it stick

Intuition + hook + flashcards for long-term memory.

Help me remember **Tail Latency & Fan-out Amplification — Why p99 Is the Number** for the long term: give the one-sentence intuition, a memorable hook/mnemonic, a tiny worked example, and 3 active-recall flashcards (Q -> A). If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes