Should a latency SLO say "p99 under 500 ms" or "99 percent of requests under 500 ms"? They sound identical.
Sketch your own answer first, then compare it with the one below.
A strong answer
Over a single window they are the same statement: if 99 percent of requests were under 500 ms, the p99 is under 500 ms. They differ in what you can do with them afterwards.
The ratio form is a count of good events over a count of valid events. Counts add up, so you can sum them across hosts, regions and days and divide once. A percentile does not. A fleet p99 cannot be rebuilt from per-host p99s, and a monthly p99 cannot be rebuilt from daily ones.
The ratio also plugs into error budgets. One percent of requests may be slow, so every request over 500 ms spends budget, and you can say how much was spent by a given incident. Burn-rate alerts then work unchanged, with the slow share playing the role of the error ratio. A percentile target only says pass or fail for a window, and it does not say how badly a failing window failed or how much margin a passing one had.
The ratio form has a cost: you need a bucket boundary at 500 ms to read it exactly. The percentile form needs a mergeable histogram anyway, so that is rarely a real obstacle.
Sources
- Betsy Beyer, Niall Richard Murphy, David K. Rensin, Kent Kawahara, Stephen Thorne (2018). The Site Reliability Workbook, chapter: Implementing SLOs.
- Prometheus authors (2024). Histograms and summaries.