SLIs, SLOs and error budgets
Start with a user outcome
Site reliability engineering (SRE) applies engineering methods to running dependable services. Instead of asking only whether servers respond, define what users need. A fictional bookstore checkout service must accept a valid purchase request and return a correct confirmation before a deadline. An SLI (service level indicator) is a measured quantity; an SLO (service level objective) is its target over a specified period; an SLA (service level agreement) is a contractual commitment with defined conditions and possible remedies. An SLA for a cloud component does not guarantee application availability: your code, dependencies, configuration and recovery also matter. The examples below are synthetic, not actual measurements or contract terms.
Specify the denominator before measuring
Use a rolling 30-day window, UTC timestamps, and one eligible event per valid checkout attempt observed at the user-facing boundary. Count a good event only if the operation completes correctly within 2 seconds. Count eligible timeouts and server errors as bad, even when no response is returned. Exclude malformed requests and synthetic probes under a documented rule; do not silently exclude overload failures or planned maintenance that affects eligible attempts. Handle retries consistently: this SLI measures attempts, not unique orders. A separate order-level indicator may measure duplicate charges or eventual completion. An incomplete measurement pipeline can hide failures; report missing coverage as unknown, and use independent probes to investigate.
| Term | Fictional checkout definition |
|---|---|
| SLI | good eligible attempts / all eligible attempts |
| SLO | at least 99.9% good over rolling 30 days |
| SLA | separately negotiated commitment, with its own scope and remedies |
A latency objective can alternatively be separate from success; specify whether the denominator includes failures. Zero eligible requests means undefined, not 100%. Do not average daily percentages equally when daily traffic varies: add good and eligible counts separately.
Calculate the error budget
An error budget is the tolerated bad fraction: 1 - SLO expressed as a fraction. For 100,000 eligible attempts at 99.9%, the budget is 100 bad attempts. If 60 fail, the measured SLI is 99.94%, remaining budget is 40 attempts, and 60% of the budget is consumed. At 120 failures, SLI is 99.88%, remaining budget is -20 and consumption is 120%. A negative budget signals an objective miss; it is not additional capacity. For integer event counts the maximum permitted failures is floor(total × bad fraction). A rolling window changes as old events leave and new ones arrive; do not treat the current count as a fixed monthly allowance.
For time-based availability instead, a 30-day window has 43,200 minutes; 99.9% permits 43.2 minutes of unavailable time under the defined time-based measurement. A request-based allowance is not interchangeable with minutes: traffic may be concentrated during an outage. A provider SLA may use a calendar month, particular regions or request types and exclusions; read the actual contract before evaluating eligibility for remedies.
Use burn rate to detect risk early
Burn rate is observed bad fraction / allowed bad fraction. At a 99.9% objective, a complete one-hour window with 2,000 attempts and 20 bad attempts burns at 10× (1% / 0.1%). A five-minute window with 200 attempts and two bad attempts also burns at 10×. Both suggest sustained risk, but neither proves the month will miss its objective. With stable volume, a sustained 10× burn starting from a fresh 30-day budget would exhaust it in about three days; with uneven volume or existing consumption, that projection changes.
A fictional policy pages when both the one-hour and five-minute complete windows meet or exceed 10× burn and contain at least 100 attempts each. If only the long window breaches, create an investigation ticket rather than page under this simplified policy. Missing or low-volume evidence requires separate handling; critical confirmed incidents can trigger escalation independently. Choose production thresholds from desired detection time, false-positive cost, traffic and SLO. Monitor recovery and deduplicate alerts.
Balance reliability and delivery
A team agrees before an incident that normal changes can proceed while sufficient budget remains and operational readiness checks pass. At exhaustion, pause ordinary feature releases, prioritize reliability fixes, and permit emergency security or reliability changes only under documented authorization. Do not silently lower the objective or reset the budget to make a chart green. Maintain a separate plan for low-traffic services; a single failed attempt can dominate a tiny denominator. Review the objective with stakeholders using business impact, technical feasibility and cost. A 100% objective can make ordinary dependency failures impossible to tolerate and may divert effort from user value; choose targets intentionally.
For a service with 5,000 good out of 5,010 attempts, calculate its SLI and allowed integer failures at 99.9%. The result is about 99.8004%, at most five bad attempts, and ten observed failures: the budget is exceeded. Explain why a dashboard that averages separate hosts equally could be misleading.
Compare frameworks without merging criteria
The Google SRE workbook explains SLO specification, budget policies and burn-rate alerting (implementing SLOs). AWS Well-Architected operational guidance emphasizes workload and operations health and procedures (Operate). Azure Well-Architected Operational Excellence emphasizes standardized delivery, observability and incident practices (Operational Excellence). Google Cloud Well-Architected Operational Excellence covers operational readiness, incident response and improvement (pillar). These are distinct guides, not interchangeable certification checklists or SLAs. The lesson's thresholds and arithmetic are original teaching examples, not provider requirements.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
SLIs, SLOs and error budgets — knowledge check
Choose the best answer for each offline scenario.
At 99.9% SLO, how many bad attempts are allowed among 250,000 eligible attempts?
What is the SLI for a complete window with zero eligible attempts?
What burn rate corresponds to 2% bad attempts at a 99.9% objective?
Which statement about a provider SLA is correct?
How should two windows with unequal eligible traffic be combined?