HomeResourcesCase study
Case study

Netflix Beats the Slow Tail by Asking Twice

By The SDL team·4 min read·Updated Sep 16, 2026

You can't predict which request hits a GC pause. So hedge: fire a backup after the SLO target — safely, because writes are idempotent.

The slowest 1% of your requests can ruin the experience for everyone, and you usually can't predict which request will be slow. Netflix's answer is almost cheeky: don't try to predict it. Just quietly ask a second time.

On stateful services, tail latency comes from unlucky moments — a replica mid-GC-pause, a node briefly overloaded. The request itself is fine; it just landed on a momentarily slow server. Waiting it out punishes the user for the server's bad luck.

Plain English

Your data lives on several replicas. When you read, you ask one of them. Usually fast — but occasionally the replica you picked is having a bad moment (garbage collection, a load spike) and takes far longer than normal. You're now stuck waiting on a slow server, even though other replicas could have answered instantly.

Request hedging is the fix: if your first request is taking unusually long, send the same request to a second replica and use whichever answers first. You're hedging your bet against one server's bad luck.

Now the engineering

The naive version — always send two requests — doubles your load. Netflix's version is disciplined: the server advertises a target and max latency per namespace (its SLO), and the client only fires a hedge request after the target elapses (say, the p95). So for the 95% of requests that are normal, nothing extra happens; the backup fires only for the slow tail. Hedges are themselves concurrency-limited so a wave of slowness can't trigger a self-inflicted load storm, and timeouts are GC-tolerant so a normal pause isn't mistaken for failure.

Request hedging: don’t wait on a slow replica — ask a second one t=0 send to replica A A is slow (GC pause) … still going t=p95 hedge: also send to replica B B answers fast → use it, cancel A Fire the backup only after the SLO target (e.g. p95) elapses — so you add load only for the slow tail, not for every request. Safe only because writes are idempotent: sending the same request twice must not corrupt state. Hedging + idempotency are a pair. Server advertises target + max latency per namespace; the client hedges and times out GC-tolerantly.
Pay only for the tail. Fire the backup request only after the SLO target elapses — and only safely, because the writes are idempotent.

The non-negotiable precondition: idempotency. Hedging means the same operation may execute more than once, so it must be safe to repeat — exactly the property Stripe's idempotency keys guarantee. Hedging and idempotency are a matched pair; you cannot safely do the first without the second.

Worth knowing

Notice the threading-together of three earlier teardowns: hedging fights the GC pauses that pushed Discord off Go (#2), it's concurrency-limited using the same thinking as Netflix's adaptive limits (#6), and it's safe only because of idempotency (#12). These mechanisms aren't isolated tricks — they compose. Senior design is mostly knowing how the pieces fit, not memorising each in isolation.

The gap it reveals

Engineers obsess over average latency; the tail is what users feel. The realisation is that p99 is often caused by transient bad luck (GC, momentary load), not a slow request — so you can attack it by retrying against another replica, but only after a threshold and only if operations are idempotent. Knowing hedging without knowing its idempotency precondition is how you double-charge a customer.

In the interview room

"How would you reduce p99 latency?" rewards the candidate who says more than 'add a cache.' Hedging — send a backup request after the SLO target, use the first response — is a strong answer, provided you immediately add 'and this requires idempotent operations and a concurrency cap on hedges.' Stating the precondition unprompted is the senior signal.

The reframe

You can't eliminate the random bad moments inside a large fleet — some server is always mid-pause somewhere. So instead of trying to make every replica perfectly fast, Netflix designed around the certainty that some will be slow at any instant, and routed around it cheaply. Resilience is accepting the inevitable variance and building a graceful escape from it.

Don't predict which request will be slow. Make it cheap to stop waiting on the one that is.

Primary source →
infoq.com — How Netflix Ensures Highly-Reliable Online Stateful Systems

Want feedback on your design?

The weekly teardown

One real-world architecture, every week.

How real companies actually built it: the design, the trade-offs, and what to say about it in an interview. Free, and one click to unsubscribe.

Related articles