Skip to content
syntaqx

Operations, chapter 03 of 08

SLOs & Error Budgets

Picking SLIs that reflect what users feel, setting SLO targets, spending error budgets deliberately, and alerting on burn rate instead of raw thresholds.

3 min readUpdated

"Is it reliable enough?" needs a number, agreed on before the incident, not argued about during it. (How fast the team ships is a separate question, answered in Measuring Engineering.) Service level objectives give you that number, and error budgets turn it into a decision rule.

The point isn't maximum reliability. 100% is the wrong target for nearly everything: users can't tell 99.99% from 100% through their own flaky Wi-Fi, and chasing the difference costs releases you could have shipped. An SLO says how much unreliability is acceptable, which turns the rest into a budget for moving fast. The vocabulary and burn-rate math come from Google's SRE Book and Workbook, now the industry's common language.

Terms#

Term Meaning Example
SLI A measurement of good events over valid events Requests served successfully in under 300ms, over all requests
SLO The target for an SLI over a window 99.9% over a rolling 30 days
Error budget 1 - SLO, the unreliability you're allowed 0.1%, about 43 minutes of full outage per 30 days
SLA A contract with consequences, looser than the SLO 99.5%, with service credits

The SLO is always stricter than any SLA, so you find out you're in trouble before your customers' lawyers do.

Choosing SLIs#

Measure what users feel, as close to them as you can (the load balancer or the client, not the database). The telemetry SLIs are computed from, and the joins from an alert to the requests behind it, are in Observability.

Kind of service SLIs
Request/response API Availability (non-5xx ratio), latency (ratio under a threshold)
Pipelines and jobs Freshness (age of the newest processed data), correctness
Queues and webhooks Delivery latency, ratio delivered within the retry window
  • Ratios, not averages. "99% of requests under 300ms" is an SLI; "average latency 120ms" hides the slow tail users notice.
  • 4xx aren't failures. A 422 is the API working correctly (Error Responses). A 429 is a failure only if you throttled someone below their documented rate limit.
  • A few per journey. Two or three; twenty means nobody looks at any of them.

Setting Targets#

  • Start from today's performance, then tighten as you earn it. An SLO you miss every month is ignored; one you beat by miles is wasted budget.
  • Each extra nine is a different kind of system. 99.9% allows 43 minutes a month: a human can be paged and roll back. 99.99% allows 4, which only works if failover and rollback are automatic. Each nine costs roughly ten times the last.
  • Critical paths get stricter targets. Authorizing a payment and rendering a settings page don't deserve the same objective.
  • Rolling 30-day windows, reviewed quarterly.

Error Budget Policy#

The budget only matters if spending it changes behavior. Write the policy down before you need it:

Budget remaining What happens
Healthy Ship freely. Run experiments, do risky migrations
Under 25% Risky changes need a rollback plan reviewed in advance
Exhausted Feature releases freeze for that service. Work goes to reliability until the budget recovers

Exceptions (a security fix, a regulatory deadline) are allowed, and written down. Any single incident that burns more than 20% of the budget gets a postmortem, even if nobody noticed.

Without a policy, the budget is a dashboard: feature work continues while reliability burns, and the conversation happens after the outage. With one, the tradeoff between shipping and stability is a rule agreed in advance, not whoever argues loudest during the incident.

Alerting on Burn Rate#

Alert on how fast the budget is being spent, not on raw error rates. Burn rate is the error rate divided by the rate the SLO allows: at 99.9%, a 0.1% error rate is a burn rate of 1, which spends the budget exactly by the end of the window. Writing the rules, with burn rates precomputed as recording rules, is in Dashboards & Alerts.

The Workbook's recommended alerts for a 99.9% SLO over 30 days:

Severity Long window Short window Burn rate Budget consumed
Page 1 hour 5 minutes 14.4 2%
Page 6 hours 30 minutes 6 5%
Ticket 3 days 6 hours 1 10%
NOTES: (UNLESS OTHERWISE SPECIFIED) 1 S1 IS THE TARGET FOR THE SLI, GOOD EVENTS OVER VALID EVENTS, ACROSS A ROLLING 30 DAYS. 2 B1 IS 43.2 MINUTES OF FULL OUTAGE, OR A PARTIAL ONE: 1% ERRORS FOR 72 HOURS SPENDS THE SAME BUDGET. 3 BURN RATE R IS THE ERROR RATE OVER THE RATE THE SLO ALLOWS; AT R THE BUDGET IS GONE AFTER E = N1 ÷ R. 4 AN ALERT FIRES WHEN BOTH ITS LONG WINDOW L AND ITS SHORT WINDOW, L ÷ 12, BURN FASTER THAN R. RATES AND WINDOWS FROM PUBLISHED SRE ALERTING GUIDANCE, 99.9% OVER 30 DAYS. VALUES AND FORMULAS ARE IN THE TABLE. GOOD EVENTS · S1 1 N1 DETAIL A PLAN VIEW · ONE 30-DAY SLO WINDOW SCALE 1 DAY = 20 PX · TIMELINE ALERT 1 · PAGE ALERT 2 · PAGE ALERT 3 · TICKET E1 E2 L3 4 E3 PLAN VIEW · BURN RATE TO EXHAUSTION SCALE 1 DAY = 20 PX · TIMELINE · ONE BAR PER ALERT 3 ERROR BUDGET B1 2 DETAIL A · THE ERROR BUDGET SCALE 360:1 · 1 MIN = 5 PX VARIABLES CODE VARIABLE VALUE N1 SLO window 30 d = 720 h = 43,200 min S1 SLO target 99.9% B1 error budget (1 − S1) × N1 = 43.2 min R1 burn rate, alert 1 14.4 R2 burn rate, alert 2 6 R3 burn rate, alert 3 1 L1 long window, alert 1 1 h · short 5 min L2 long window, alert 2 6 h · short 30 min L3 long window, alert 3 72 h · short 6 h C1 budget spent when 1 fires R1 × L1 ÷ N1 = 2% C2 budget spent when 2 fires R2 × L2 ÷ N1 = 5% C3 budget spent when 3 fires R3 × L3 ÷ N1 = 10% E1 budget gone at R1 N1 ÷ R1 = 50 h E2 budget gone at R2 N1 ÷ R2 = 120 h E3 budget gone at R3 N1 ÷ R3 = 720 h Dimensional drawing of an error budget. A 30-day window of 43,200 minutes at a 99.9% SLO leaves a budget of 43.2 minutes, shown enlarged in a detail view. A second view draws how long the budget lasts at each alert's burn rate: 50 hours at 14.4, 120 hours at 6, and the full 720 hours at 1, with a table of each alert's long and short windows and the share of budget spent before it fires.
The budget is a sliver of the window, and the burn rate decides how fast it goes: each alert fires after spending a fixed share of it, 2%, 5% or 10%.

An alert fires only when both windows are over the burn rate. The long window keeps it from paging on a blip, and the short window (one-twelfth of the long one) makes it stop firing soon after the problem is fixed.

These replace threshold alerts like "error rate above 1% for 5 minutes", which page on spikes that don't matter and miss slow leaks that do. What happens after the page is On-Call & Runbooks.

References#

In practice