Percentile latency (p95 and p99)
Percentile latency is the response time that a given share of requests stay under. p50 is the median, p95 is the time 95% of requests beat, and p99 is the time 99% beat. Percentiles show the slow tail of requests that an average hides, which is often where users notice a problem first.
How to calculate it
Sort request durations from fastest to slowest and read the value at the chosen rank. With 1,000 requests, p99 is roughly the 990th value. Suppose 980 requests take 100 ms and 20 take 5 seconds. The average is about 198 ms and looks healthy, but p99 is 5 seconds. In production, tools estimate percentiles from histograms, so bucket boundaries affect accuracy. Percentiles from different servers cannot be averaged together; merge the histograms instead.
Why it matters in production
A page that makes 20 backend calls has about an 18% chance (1 minus 0.99 to the power 20) that at least one call is slower than p99. Tail latency becomes the experience of many users. Setting latency SLOs and alerts on p95 or p99 catches degradation that an average would miss.
See also
On the One2N blog
References
