Choosing SLIs

Measure at the user boundary: request success ratio and latency thresholds, freshness for pipelines. Good SLIs are ratios of good events over valid events.

About 25 min read3-question knowledge check

The mental model

A hospital does not judge itself by how hard the MRI machine's fans are spinning. It judges itself by whether patients walk out healthier than they walked in. The fan speed is real, measurable, and completely beside the point — a machine can run hot and still cure people, or run cool while the waiting room fills with the untreated.

An SLI — Service Level Indicator — is the vital sign you agree to be judged by. It is a carefully chosen quantitative measure of some aspect of the service that matters to a user. The whole discipline of choosing SLIs is the discipline of not confusing fan speed with patient outcomes. CPU utilisation, thread-pool depth, garbage-collection pauses, replica count — all real, all measurable, all the MRI fans. The SLI is: did the user's request succeed, and did it succeed fast enough.

The reason this is the *first* topic in reliability engineering, before the math and before the policy, is that everything downstream inherits the SLI's mistakes. A burn-rate alert computed on the wrong indicator pages you for the wrong reason. An error budget spent tracking the wrong number buys you nothing. A beautifully-run incident that restores a metric users never cared about is theatre. Pick the indicator badly and no amount of sophistication rescues you; pick it well and even crude alerting is useful.

The Google SRE formulation, which has become the industry default, is exact and worth memorising: an SLI is the ratio of good events to valid events, expressed as a percentage.

SLI = good events / valid events × 100%

The genius is in the two definitions you are forced to write down. What makes an event good? What makes an event valid (and thus counted at all)? Those two sentences are where all the engineering judgement lives, and a team that cannot state them crisply does not yet have an SLI — it has a dashboard.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision