What is p95 latency?
p95 latency is the 95th percentile of response times: 95% of requests were as fast or faster, and the slowest 5% took longer. Unlike the average, it shows what the slow end of your traffic experiences, which is why SLOs and alerts usually use p95 or p99. With 20 sorted samples, p95 is the 19th value by nearest rank.
Why p95 latency matters
Averages hide tails. If 95 requests take 100 ms and 5 take 4 seconds, the mean is 295 ms, which describes nobody. p95 shows the slow group directly.
Users make many requests per page and per session, so most of them hit the slow tail sooner or later. A p95 regression after a deploy is often the first sign of a missing index or a slow dependency.
How to measure p95 latency
nearest-rank p95: sort the n values and take the value at rank ⌈0.95 × n⌉ (many tools interpolate between neighbouring values instead, so small samples can differ slightly)
Worked example
Twenty requests took, sorted: 75, 85, 88, 90, 91, 95, 97, 99, 102, 105, 110, 112, 118, 121, 130, 142, 160, 210, 480 and 1,250 ms.
- Rank = ⌈0.95 × 20⌉ = 19.
- The 19th value is 480 ms, so p95 = 480 ms.
- The median is the average of the 10th and 11th values, (105 + 110) ÷ 2 = 107.5 ms, and the mean is 188 ms, pulled up by a single 1,250 ms request.
Result: Half the requests finish in about a tenth of a second, yet one in twenty takes nearly half a second or more. That is what p95 is for.
Common mistakes
- Averaging percentiles. The average of hourly p95 values is not the day's p95. Compute percentiles from raw data or histograms.
- Too few samples. The p95 of 20 requests rests on one value. Show the request count beside it.
- Mixing endpoints. A fast health check and a slow report in one series give a meaningless p95. Measure per endpoint.
- Ignoring p99. On a busy service the 1% beyond p99 can still be thousands of requests an hour.
How Vigil handles p95 latency
- Uptime monitors chart p50 and p95 response times, and adaptive latency alerts learn a 7-day baseline and open a degraded incident on anomalies.
- Vigil's APM keeps a latency histogram per endpoint, so percentiles are computed from the distribution rather than averaged, and the server agent can alert on an endpoint's p95.
- Real user monitoring reports Web Vitals at p75, the percentile Google uses to assess them.
p95 latency: frequently asked questions
What is the difference between p95 and p99?
p95 is the value 95% of requests beat; p99 is the value 99% beat. p99 shows rarer, slower requests and needs more traffic to be stable.
Why not use the average?
A few very slow requests pull the average up while most users see something faster, and a slow minority can hide behind a fast majority. Percentiles describe actual experiences.
What is a good p95 latency?
It depends on the endpoint. Define it from what users expect, write it into an SLO such as "95% of requests under 300 ms", and alert when you drift from it.