SLOs & Error Budgets Quick Reference
text
# Core formulas
error_budget = (1 - SLO_target) * total_requests_in_window
# SLO 99.9%, 2,600,000 requests/month -> budget = 2,600 allowed failures
burn_rate = actual_error_rate / (1 - SLO_target)
# SLO 99.9% (allowed error rate 0.001), observed error rate 1% (0.01)
# burn_rate = 0.01 / 0.001 = 10x
budget_remaining_fraction =
(SLO_target - current_period_success_rate) / (1 - SLO_target)
# negative or zero -> budget not yet exhausted this period
# positive, > 1 -> already over budget by that multiple
# Common multi-window burn-rate alert pairs (both windows must agree)
Fast-burn: 5m AND 1h windows, burn_rate >= 14.4x -> page now
(exhausts a 30-day budget in ~2 days)
Slow-burn: 30m AND 6h windows, burn_rate >= 6x -> page, less urgent
(exhausts the budget in ~5 days)
# SLI types, by what they measure
Request-based: good_requests / total_requests -- most APIs/services
Windows-based: "did this time bucket meet the bar" -- batch, uneven traffic
Latency: percentile under a threshold (p95/p99) -- usually paired with availability
Freshness: time since last successful run -- async/batch jobs
Completeness: fraction of expected records processed -- batch jobs
Correctness: fraction processed without error -- batch jobs
# SLO ordering, strictest to loosest
Internal SLO > External SLA
(SLO set tighter so normal variance doesn't breach a contractual promise)
# Error budget policy checklist (decide ALL of this in advance, not during an incident)
[ ] What specifically pauses when budget hits zero (feature releases? all deploys?)
[ ] What's exempt (security fixes, critical bugs)
[ ] Who has authority to approve an exception, and how it's logged
[ ] When/how the budget resets (rolling window vs. calendar month)
