SLI, SLO & Error Budgets
Cheat sheet · https://pcornel.dk/topic.php?topic=6108
Answer
An SLI measures service behaviour that users care about (e.g. share of successful requests); an SLO sets a target over a window (99.9 % over 30 days); the error budget is the allowed unreliability (0.1 %).
Remember
Measure at the user edge. Choose a few SLIs per service. Alert on error budget burn rate, not on every blip.
First checks
sum(rate(http_requests_total{code!~"5.."}[30d])) / sum(rate(http_requests_total[30d]))— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
Verify in this order
user requests → SLI → compared with SLO → error budget → decisions
Where it usually breaks
Common failures are measuring infrastructure uptime instead of user outcomes, changing denominators silently, excluding failures through missing telemetry, using tiny windows for long SLOs and confusing contractual SLA penalties with internal SLO engineering targets.
SLI, SLO & Error Budgets verification boundary matrix
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Service level indicators | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Service level objectives / Availability/latency/error-rate signals | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Burn rate | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Error budget concepts | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6108