Try
↑ ↓ move↵ openesc close

Interview prep / Percentiles

Senior · Percentiles · System design interview question

A load test shows a p99 of 50 ms, but production shows several hundred. List the explanations you would check, in order.

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

A strong answer

Start with how the test measures. If the generator waits for each reply, coordinated omission hides the requests that queue behind a slow one, and the test tail is too low. Check that the test sends on a schedule and times from the intended send.

Then compare the load. Production is open loop, with independent arrivals and bursts, while a test with a fixed number of connections may keep the system under a steady, gentler load. Queueing grows sharply with utilisation, so a test at lower utilisation reports a better tail.

Next compare the workload: data size and key distribution, cache warm-up, request mix, connection reuse, and whether the test ran long enough to include pauses and background jobs. A short test misses rare events.

Finally, check the measurement itself: how percentiles are aggregated, bucket widths, and whether the two environments compute the same statistic over the same window. To confirm which explanation is right, replay captured production traffic at its original arrival times and compare.

Sources

Learn it by running it

The percentiles and why averages lie 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