Site Reliability Engineering interview question · Most asked
Why use percentiles instead of averages for latency, and how should percentiles be aggregated?
Summary
Averages hide the tail: a mean of 120 ms can coexist with 5% of users waiting over 2 seconds. Percentiles (p50, p95, p99) describe what users actually experience, and the tail matters even more when one page load fans out to many backend calls. Percentiles cannot be averaged across hosts; aggregate histograms and compute percentiles from them.
Longer Answer
If a page makes 20 backend calls, the chance that at least one hits that backend's p99 is about 18%, so backend p99 becomes typical user experience. Prometheus histograms (or native/exponential histograms) store bucket counts that can be summed across instances, after which histogram_quantile estimates percentiles. Averaging per-host p99 values gives a meaningless number.
For SLOs, threshold-based SLIs ("proportion of requests under 300 ms") are often clearer than percentile targets and are easy to aggregate.
Key Points
- Averages hide the tail.
- Fan-out makes tails common.
- Aggregate histograms, never percentiles.
- Threshold SLIs aggregate cleanly.
More most-asked Site Reliability Engineering questions
- What is Site Reliability Engineering, and how does it relate to DevOps?
- What makes a good alert? Explain symptom-based alerting and alert fatigue.
- What is an error budget, and how should it be used?
- Define SLI, SLO and SLA, and explain how they relate.
- What is burn-rate alerting, and why is it better than alerting on raw error rates?
- How do you choose good SLIs for a service?
- What are the four golden signals?
- What is the difference between monitoring and observability? Explain metrics, logs and traces.