Overview
Curated: · Written: · Reviewed:
SLIs, SLOs & Error Budgets
In one line
An SLI is a measured ratio of good to valid events for one user journey, an SLO is the target for that ratio over a declared window, and an error budget is the allowed bad fraction (1 − S) together with the policy for what happens as it is spent. Reach for it whenever someone asks how reliable a service must be and what changes when it is not.
Key definitions
- SLI: good eligible events divided by valid eligible events, measured at a stated point.
- SLO: a target for an SLI over a stated population and window, with a policy attached.
- SLA: a business or legal contract with remedies. Its measurement rules may differ from the internal SLO.
- Error budget: the allowed bad events, 1 − S of the eligible events in the window.
- Burn rate: observed bad-event rate divided by the allowed bad-event rate.
- Rolling vs calendar window: a rolling window expires old events continuously; a calendar window resets at a boundary.
Formulas and complexity
Worked figures: 99.9% over 43.2M eligible events gives a budget of 43,200 bad events. A 2 h overnight outage at 2 rps costs 14,400 bad events, leaving 28,800. A 12 min peak outage at 500 rps costs 360,000 bad events, which exhausts the budget 8 times over.
How it works
- Define the population, good-event condition, measurement point, exclusions and window before choosing a metric.
- Consumed and remaining budget come from one versioned numerator, denominator, target and window.
- A fast burn pages a human now. A slow burn creates a ticket.
- The policy decides what pauses when the budget runs out and who decides.
When to use and when not to
| Situation | Use an SLO? | Note |
|---|---|---|
| User-facing request path with a clear good event | Yes | Count from the user's side where possible |
| Time-based availability on uniform traffic | Yes | Minutes-of-downtime conversion holds here only |
| Request-based SLI with peaky traffic | Yes | Budget is bad events, so peaks dominate |
| Batch pipeline | Use freshness or correctness | HTTP availability misleads |
| Target equal to current performance | No | Leaves no budget and no reason to act |
| Objective nobody would act on | No | It is a dashboard gauge |
| Tiny cohort inside a healthy global SLO | Add a diagnostic slice | The global number hides it |
Traps interviewers probe
- Converting 99.9% into 43 minutes a month by reflex. Fix: say the budget is bad events. Minutes are only equivalent under uniform traffic and a time-based SLI.
- Using server-side success codes as the SLI. Fix: measure closer to the user, count requests that never arrived, and document the blind spots. Missing telemetry is unknown, not good.
- Averaging availability or latency. Fix: use a thresholded SLI or a p99 per journey. A total outage disappears into a month of good hours, and a mean hides the tail.
- Setting the target to 100% or to current performance. Fix: derive it from user harm, dependency capability and cost. A 100% target leaves no budget for change.
- Trusting a green global SLO. Fix: add diagnostic slices with minimum volume, and check the population, window and measurement point.
Interview tips
Open with the distinction: "An SLI is a ratio of good to valid events at a stated measurement point. The SLO is its target over a window. The SLA is a contract with penalties. An SLO with no policy is a dashboard gauge."
Follow-ups to expect:
- Why a ratio and not a count? 500 failures is catastrophic at 10k requests and invisible at 50M.
- Why not 99.99%? It is tighter than users can perceive, each extra nine multiplies the engineering, and the budget becomes too small to release through.
- Rolling or calendar? Name the one you use. The same incident consumes different amounts of each.
- Why are users complaining while the SLO is green? The population, window, measurement point or slice is hiding the harm.
- What happens when the budget is exhausted? Feature freezes or slower rollouts, reliability work ahead of features, a named exception approver, and declared exit criteria.
30-second answer outline:
- Define the SLI as a good-to-valid ratio and say where it is measured.
- State the SLO target and window, and express the budget as bad events.
- Describe burn-rate alerting: fast burns page, slow burns make tickets.
- Name the policy: what pauses when the budget runs out, and who decides.
Feedback on this overview
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.