✏️ Explanatory Question

Why do we measure latency using percentiles instead of averages?

👁 6 Views
📘 Detailed Answer
🟢 Easy
No previous question
No next question
💡

Answer with Explanation

An average hides the worst experiences. If 99 requests take 10 ms and one takes 2 seconds, the average is about 30 ms - which describes nobody.

Percentiles describe the distribution:

  • p50 (median) - the typical request.
  • p95 - the slowest 1 in 20.
  • p99 - the slowest 1 in 100, where timeouts and retries live.
  • p99.9 - matters most for your highest value users, who make the most requests and so hit the tail most often.

A page that makes 100 backend calls will, on average, hit its p99 backend latency at least once - so tail latency becomes typical latency at the page level. Set SLOs on p95 or p99, never on the mean.

No previous question
No next question