Part 16 / Topic 2 of 6
SLOs and error budgets
Before production, agree what "reliable enough" means — as a number, with the customer. A service level objective (SLO) like "99.9% availability over 30 days" implies its error budget: the downtime the target allows:
# examples/01_slos_and_error_budgets.py
def error_budget_minutes(slo, days=30):
return (1 - slo) * days * 24 * 60
for slo in [0.99, 0.995, 0.999, 0.9999]:
print(f"SLO {slo:.2%}: {error_budget_minutes(slo):7.1f} minutes of downtime allowed per 30 days")
downtime_so_far = 30.0
budget = error_budget_minutes(0.999)
print(f"used {downtime_so_far} of {budget:.1f} min ({downtime_so_far / budget:.0%}) -> slow down risky releases")
# SLO 99.00%: 432.0 minutes of downtime allowed per 30 days
# SLO 99.50%: 216.0 minutes of downtime allowed per 30 days
# SLO 99.90%: 43.2 minutes of downtime allowed per 30 days
# SLO 99.99%: 4.3 minutes of downtime allowed per 30 days
# used 30.0 of 43.2 min (69%) -> slow down risky releases
Two readings of that table matter in customer conversations. First, each nine is 10× harder: 99.9% allows 43 minutes a month; 99.99% allows 4 — and the dispatch dashboard almost certainly does not need the second nine at the price it costs. Second, the budget is a spending signal: at 69% used mid-month, you slow risky releases and spend the remainder on reliability — a rule agreed with the customer in calm weather, so nobody negotiates it during an outage.
🧪 Quick quiz
- How much downtime does a 99.9% SLO allow over 30 days?
Show the answer
43.2 minutes — (1 − 0.999) × 30 × 24 × 60. (verified against the example output above)
- You have used 69% of the month's error budget. What is a sensible response?
Show the answer
Slow down risky releases and focus on reliability until the budget recovers. The example used 30 of 43.2 minutes and flags slowing down. (verified against the example output above)
Done here? The practice set for Part 16 — 4 exercises with solutions — is on the part page.