What it is
A service level indicator (SLI) is a measurement of service quality as users experience it, expressed as the ratio of good events to valid events. A service level objective (SLO) is a target for an SLI over a time window. A service level agreement (SLA) is a contract with customers that specifies consequences, usually service credits, if a level is not met. The error budget is the allowed shortfall: 1 − SLO.
Why it exists
"Is the service reliable enough?" otherwise becomes a matter of opinion and of which dashboard someone looks at. SLOs make reliability a number agreed in advance: enough to keep users happy, not so much that every release becomes impossible. The error budget turns that number into a shared currency for product and engineering decisions and for alerting.
How it works
Choose SLIs for important user journeys: availability (share of requests that succeed), latency (share faster than a threshold), sometimes freshness or correctness. Measure where users' experience is visible: at the load balancer, gateway or client, not on hosts. Define "valid" (exclude, for example, client errors caused by bad input) and "good" precisely.
Set the SLO: target and window, e.g. 99.5% over a rolling 30 days. Base it on what users need and what you achieve today, not on aspiration. 99.9% over 30 days allows 43.2 minutes of total outage; 99.5% allows 3.6 hours.
Error budget. At 100 req/s, 30 days is about 259 million requests; a 99.5% SLO allows about 1.3 million bad ones. Deploys, experiments, dependencies and bad luck all spend from it.
Burn rate = observed error ratio ÷ budget ratio. Burn 1 uses the budget exactly over the window; burn 10 uses a 30-day budget in 3 days. The Google SRE Workbook recommends multi-window, multi-burn-rate alerts, for example: page when burn > 14.4 over 1 hour and over 5 minutes (2% of a 30-day budget in an hour); page when burn > 6 over 6 hours and 30 minutes (5% in 6 hours); ticket when burn > 1 over 3 days. The long window gives significance, the short one makes the alert stop soon after recovery.
SLA sits below the SLO (e.g. 99.0% vs 99.5%), so you get internal warning before contractual breach. SLAs often use coarser measurements (monthly uptime from external probes).
Error budget policy. Agreed in advance: while budget remains, ship; when it is exhausted, freeze risky changes and prioritise reliability work until the SLI recovers.
When to use it
For any service with users who care about its reliability, internal platform services included. SLOs are most valuable when several teams must agree on priorities, or when alert noise is a problem.
When not to
- For every internal metric: SLOs belong to user-facing behaviour, a handful per service.
- When you cannot measure the user experience yet: fix the measurement first.
- A 100% SLO: it leaves no budget for any change and cannot be met in practice.
Trade-offs
| Choice | You gain | You pay |
|---|---|---|
| Stricter SLO (more nines) | Happier users at the margin | Much more engineering, slower releases |
| Longer window (30 vs 7 days) | Stable, less noisy target | Slow to reflect improvements |
| Request-based SLI | Precise, weights by traffic | Low-traffic periods can be noisy |
| Time-based SLI (good minutes) | Simple, matches uptime SLAs | Hides partial failures within a minute |
| Burn-rate alerts | Pages scaled to damage, fewer false pages | More complex rules to set up |
Alternatives
- Threshold alerts on symptoms (error rate > 1% for 5 minutes): simpler, but either noisy or slow, and not tied to a budget.
- Uptime monitoring only: external probes see total outages, not partial failures or slow responses.
- Apdex: a single satisfaction score from latency thresholds; less flexible than separate SLIs.
Failure modes
- Measuring hosts, not users: health checks and CPU look green while a canary or a dependency fails users.
- Average-based latency SLIs: hide tail latency; use thresholds or percentiles.
- Too many SLOs: nobody knows which ones matter; alerts multiply.
- SLO nobody acts on: no error budget policy, so budget exhaustion changes nothing.
- SLA tighter than SLO: contractual breach comes before any internal warning.
In production
Define two or three SLIs per critical journey, measure them at the edge from request logs or metrics, set SLOs with product owners, publish dashboards with remaining budget, alert with multi-window burn rates linked to runbooks, and review SLOs every quarter. Canary releases should be judged automatically against the SLI, not only against host health.
Common misconceptions
- "Higher is always better." Every additional nine costs roughly ten times more and slows change.
- "If every server is healthy, we meet the SLO." Health checks test hosts, often shallowly.
- "An error budget is permission to be careless." It is a planned allowance that funds change and absorbs bad luck.
- "SLA and SLO are the same." One is a contract with consequences, the other an internal target.
Interview angle
Expect to define SLIs for a system you design ("availability: share of non-5xx responses at the gateway; latency: share of requests under 300 ms"), set SLOs with reasons, compute an error budget in minutes or requests, and explain burn-rate alerting. Mention that the SLA is looser than the SLO and that SLOs drive release decisions through an error budget policy.
Model assumptions
Simulated: three stable app servers (8 workers, 30 ms) and a canary behind a smooth weighted-round-robin balancer with health checks every 500 ms; the canary (weight 1 of 19, later 6 of 24) calls a Recommendations service that is down, so its requests fail while its health checks pass. The SLI, error ratio and burn rate in the text are computed from the simulated requests. The 30-day budget, alert windows and incident cost are arithmetic on those rates, not simulated: a lesson step runs for seconds. Arrivals are Poisson, service times lognormal. Numbers show behaviour, not benchmarks.