Quick answer: response times have a long tail: most requests are fast and a few are very slow. The average blends them together, so a site where 1 in 100 requests takes 4 seconds can still show an average of about 120 ms. Percentiles show the tail directly: P95 is the time 95% of requests beat, P99 the time 99% beat. Set targets and alerts on P95 or P99, not on the average.
When measuring website and API performance, teams often look at a single metric: average response time (also known as the latency mean). If the average response time is under 150 milliseconds, it is easy to assume that all users are experiencing a fast, responsive interface.
However, in system operations and Site Reliability Engineering (SRE), relying on the mean is a dangerous anti-pattern. Average metrics hide spikes, obscure outliers, and can lead to a false sense of security while a significant portion of your customer base experiences severe lag.
This guide explains the mathematical flaws of mean latency, defines percentiles like P95 and P99, and outlines how to configure alerts to capture real-world user experience.
1. The Mathematical Flaw: Latency is Not Normal
In statistics, the arithmetic mean (average) works best for data that follows a symmetric bell curve (Normal or Gaussian distribution). For instance, human heights are normally distributed.
However, computer network and server response times do not follow a normal distribution. Instead, they follow a long-tailed (often log-normal) distribution.
- Most requests resolve extremely fast (the head of the curve).
- A small percentage of requests get stuck due to database connection locks, server cold starts, or packet loss (the long tail of the curve).
Because response times are asymmetrical, a few extremely slow requests can hide behind thousands of fast requests when you run an average.
2. A Simple Outlier Example
Let's look at the math to see how a healthy-looking mean hides a broken user experience.
Suppose your API receives 1,000 requests over a 5-minute interval:
- 990 requests execute perfectly in 80 milliseconds.
- 10 requests hit a database lock queue and take 4,000 milliseconds (4 seconds) to resolve.
The average is (990 × 80 ms + 10 × 4,000 ms) ÷ 1,000 = (79,200 + 40,000) ÷ 1,000 = 119.2 ms.
An average latency of 119.2ms looks excellent. On your reporting dashboard, the green line is flat and healthy.
However, in reality, 1% of your users experienced a massive 4-second delay, which is slow enough to cause payment webhook timeouts, cart abandonment, or a broken user interface. The average completely erased this issue.
3. What Are Percentiles (P50, P95, P99)?
To see the "long tail" of performance issues, SRE teams use percentiles instead of averages. A percentile represents the threshold below which a specific percentage of requests fall.
P50 (The Median)
- Definition: The middle value of your sorted response times.
- Significance: 50% of your requests are faster than the P50, and 50% are slower. It represents the typical experience of an ordinary visitor.
P95 (The SRE Standard)
- Definition: The threshold below which 95% of your requests fall.
- Significance: Only the slowest 5% of your users experienced response times longer than this number. This is the industry-standard metric for assessing general application speed under load.
P99 (The Outlier Capture)
- Definition: The threshold below which 99% of your requests fall.
- Significance: This captures the worst 1% of your response times. It highlights critical edge-case bottlenecks like server cold starts, memory leaks, or heavy database table locks.
4. How to Configure Alerts for Latency Percentiles
If your SLA (Service Level Agreement) commits to a response time under 500ms, do not write your SLA threshold based on the average. If you do, 5% of your users could be experiencing 3-second delays without triggering your alert limits.
Instead, configure your metrics and alert rules using percentiles:
- Set SRE Targets on P95/P99: Design your performance criteria around percentiles (e.g., "P95 response latency must remain under 300ms").
- Require It to Last: To avoid alerts for a brief blip, alert only when P95 stays above the target for a sustained period, for example 5 or 10 minutes.
- Measure Where the Requests Are: percentiles need many samples. Calculate them from your server or load balancer logs, an APM tool, or real user monitoring, which see every request, rather than from an occasional test request.
5. Where Each Kind of Monitoring Fits
- Server-side percentiles (access logs, APM, Prometheus histograms): every request counts, so P95 and P99 are accurate. This is where latency targets belong.
- Real user monitoring: measures what visitors' browsers actually experience, including the network between them and you.
- External uptime checks: one request every few minutes from outside your network. Too few samples for P99, but they catch the site being down or suddenly slow, which logs from a crashed server can't report.
Pingzo covers the last two. Uptime checks run every 1 to 15 minutes depending on your plan and record each response time; a check is marked degraded when it is more than three times slower than the recent typical response, and an incident opens when 3 of the last 5 checks fail. Its real user monitoring reports Core Web Vitals at the 75th percentile (P75), the same percentile Google uses. Alerts go to WhatsApp, Slack, Telegram, Discord or email.
Related guides
- How to read ping response time: RTT, jitter and packet loss
- Kubernetes liveness vs readiness probes: fix 503s and CrashLoopBackOff
- Nginx "upstream prematurely closed connection": How to Fix
Stop Finding Out About Outages from Angry Users
Get instant WhatsApp & Discord alerts the second your API, website, or server goes down. Setup in 30 seconds, with checks as often as every minute.