Try
↑ ↓ move↵ openesc close

Interview prep / Load balancing

Junior · Load balancing · System design interview question

What is tail latency, and why do teams watch p99 instead of the average?

Sketch your own answer first, then compare it with the one below.

A strong answer

Tail latency is the slow end of the latency distribution. The p99 is the value that one request in a hundred exceeds. The average hides it: a handful of very slow requests barely move the mean.

The tail matters because users notice slow requests, and because a single user action often triggers several backend calls. If the page waits for the slowest call, the user experiences something close to the tail of each backend, not its average.

Tails come from queueing behind a long request, garbage collection pauses, noisy neighbours, retries, and uneven load across servers. Load balancing affects the tail directly, since a balancer that lets one server build a queue makes everything waiting on that server slow.

A p99 with no measurement window is incomplete. The same service reports different values over ten seconds and over a day.

Sources

Learn it by running it

The load balancing lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms