Your dashboard says the average response time is 180 ms. Everyone is happy. Meanwhile, one customer in twenty waits more than two seconds for checkout. The average did not lie exactly, but it hid the people who matter most.
Why the average misleads
Latency is not spread evenly. Most requests are fast, and a few are very slow: a cold cache, a lock in the database, a slow third-party call. A handful of slow requests barely moves the average, yet those are the requests people remember.
Consider ten requests:
40, 45, 50, 50, 55, 60, 60, 65, 70, 2400 ms
The average is 290 ms, which describes none of them. Nine were fast; one was terrible.
Percentiles in plain words
A percentile answers: how long did the slowest X% of requests take?
- p50 (median): half the requests were faster than this. The "typical" request.
- p95: 95% were faster. One request in twenty was slower.
- p99: 99% were faster. One in a hundred was slower.
If your API handles 100 requests a second, a p99 of 3 seconds means one request every second takes 3 seconds or more. At scale, the tail is not rare.
Which percentile should you watch?
| Percentile | Use it for |
|---|---|
| p50 | Spotting general slowdowns after a release |
| p95 | Day-to-day health and alerts: it reflects most users' worst experience |
| p99 | Finding tail problems: locks, timeouts, slow dependencies |
A good rule: alert on p95, investigate with p99. p95 is stable enough not to flap, and sensitive enough to catch real problems.
Reading percentiles correctly
- Compare like with like. Compare p95 today with p95 at the same hour last week, not with the average.
- Do not average percentiles. The average of five servers' p95 values is not the p95 of all requests. Percentiles must be computed from the combined data (for example from mergeable histograms), which is what good APM tools do.
- Look per endpoint. A healthy overall p95 can hide one route that is ten times slower. Rank endpoints by p95 and by total time spent.
- Watch the shape. A p50 that stays flat while p99 climbs points to a specific slow path: a query, a lock, an external call.
From a slow percentile to the cause
- Find the endpoint whose p95 moved.
- Open its slowest requests, not a random sample.
- Read the trace waterfall: which span takes the time? A database query, a call to another service, waiting for a connection?
- Check what changed: a deployment, a traffic spike, a dependency.
This is exactly the workflow an APM tool is built for. In VitalRix APM, endpoints are ranked by p95 and p99, each opens to its slowest traces, and deployments are marked on the charts so you can see whether a release caused the change.
Setting latency targets
Targets depend on what the request does, but these are common starting points for p95:
- API reads: under 300 ms
- API writes: under 800 ms
- Server-rendered pages: under 1 second to first byte
Then express them as an SLO, for example 99% of checkout requests under 800 ms. See SLOs and error budgets explained.
A quick worked example
An endpoint served 1,000 requests in a minute. Sorted from fastest to slowest:
- request 500 took 92 ms: that is the p50;
- request 950 took 480 ms: that is the p95;
- request 990 took 1,900 ms: that is the p99;
- the average was 160 ms.
The average suggests everything is fine. The p95 and p99 say that 50 people in that minute waited half a second or more, and 10 waited almost two seconds. If those requests were checkouts, that is where you lose orders.
How percentiles are computed at scale
Storing every request duration is expensive, so monitoring tools usually keep histograms: counts of requests in buckets (0-10 ms, 10-25 ms, 25-50 ms and so on). Percentiles are estimated from the buckets, and histograms from many servers or many minutes can be added together before the percentile is calculated. That is why good tools can show an accurate p95 for a whole day across all servers, which averaging per-server values cannot do.
What to do when p99 is high but p95 is fine
Look for something that happens rarely but takes long: a cache miss path, a cold start after scaling, garbage collection pauses, a lock taken by a nightly job, or a slow call to a third party with no timeout. Open the slowest traces for that endpoint and compare what they have in common.
What does p95 latency mean?
p95 latency is the time within which 95% of requests finished. One request in twenty took longer.
Is p95 or p99 better for alerts?
p95 is usually better for alerts because it is stable and reflects what most users feel. Use p99 to investigate tail problems.
Can I average p95 values from several servers?
No. The average of percentiles is not a percentile. Compute percentiles from the combined data, for example with mergeable histograms.
Try VitalRix free
Uptime monitoring, APM, logs, real user monitoring and status pages in one place. No credit card needed.