Error Budgets & Burn-Rate Alerting
Delete Your "Error Rate > 1%" Alert
System designsystem design / SRE & reliability
Two ways to answer "is this an incident?"
THRESHOLD ALERT
- Rule: error_rate > 1% for 5m
- Fires on: a 90-second blip at 3am
- Silent on: 0.4% errors for 11 straight days
- Tells you: a number crossed a line
- Tuning knob: guesswork
BURN-RATE ALERT
- Rule: you are spending your reliability budget N times faster than allowed
- Fires on: anything that will actually exhaust the budget
- Silent on: noise that won't
- Tells you: how long until you're out
- Tuning knob: arithmetic
Step 1 — the budget is a real quantity
An SLO of 99.9% over 30 days doesn't mean "be good." It means you are ALLOWED:
99.9% → 43.2 min/month of badness
99.95% → 21.6 min
99.99% → 4.32 min
At 1M requests/month, 99.9% = 1,000 failures you may spend. Not 0.
Step 2 — burn rate
burn_rate = observed_error_ratio / (1 - SLO)
2% errors against a 99.9% SLO → 0.02 / 0.001 = 20x.
Time to exhaust = 30 days / burn_rate:
1x → 30 days (exactly on budget)
6x → 5 days
14.4x → 50 hours
20x → 36 hours
100x → 7 hours
Now "2% errors" stops being a vibe and becomes "we're out by Thursday."
Step 3 — the config (two windows, not one)
Page: 14.4x over 1h AND 14.4x over 5m
Page: 6x over 6h AND 6x over 30m
Ticket: 3x over 24h AND 3x over 2h
PromQL for the fast one:
(
sum(rate(http_requests_total{code=~"5.."}[1h]))
/ sum(rate(http_requests_total[1h]))
) > 14.4 * 0.001
and
(
sum(rate(http_requests_total{code=~"5.."}[5m]))
/ sum(rate(http_requests_total[5m])) > 14.4 * 0.001
)
Why the second window matters — this is the bit people skip
The LONG window decides it's real (no flapping). The SHORT window decides it's still happening. Drop the short one and your 1h-window alert stays latched for ~an hour after the outage is fixed — so your team learns that resolved pages are normal, which is how you train yourselves to ignore pages.
Four things practitioners get wrong
1️⃣ Measuring the SLI inside the app. Your 500s got counted; the connection resets the LB ate never reached your middleware. Measure where the user is — LB logs or RUM.
2️⃣ One SLO for everything. A chatty /health endpoint at 50k req/min drowns out checkout failing 40% of the time. Scope SLOs to user journeys, weighted by request volume that matters.
3️⃣ Treating the budget as a scoreboard to shame people with. It's a spending permission: budget remaining → ship, deploy on Friday, take risks. Budget burnt → freeze features, pay down reliability. That's the whole point — it converts "be careful" into a policy.
4️⃣ Picking 99.99% because it looks professional. That's 4.32 min/month. Your single-AZ Postgres failover alone takes longer than that. Never set an SLO tighter than your slowest unavoidable recovery.
Your exercise
Take one real endpoint you own. Write down its SLO (pick 99.9% if you've never set one) and compute the monthly error budget in both minutes and failed requests.
Then pull last month's actual error ratio and compute the burn rate. Two possible answers, both informative:
- burn_rate < 1 → you are over-delivering. You could be shipping faster, or your SLO is too loose to catch anything.
- burn_rate > 1 → you blew the budget last month and nobody paged. Why not?