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
- Gil Tene (2015). How NOT to Measure Latency.
- Jeffrey Dean, Luiz André Barroso (2013). The Tail at Scale.