Video in progress
How does an alert based on error budget burn rate work, and why is it better than an "errors exceeded 1%" alert?
Burn rate is how many times faster than normal you are spending the error budget. Two-window rules (for example 1 hour and 5 minutes, at 14.4x) catch a serious breakage quickly and a slow leak later but reliably, and they cut down on false alerts.
📖 Answer
If the SLO is 99.9%, the budget is 0.1% errors. At a burn rate of 1, the budget runs out exactly at the end of the month. At a burn rate of 14.4, 2% of the 30-day budget burns in one hour.
The problems with a plain threshold alert: it wakes you up even when 1% errors lasts only 2 minutes (the budget is barely touched), but if 0.5% errors continue all day, it never fires, even though that eats the budget in a few days.
The classic scheme from the Google SRE workbook:
| Severity | Long window | Short window | Burn rate | Action |
|---|---|---|---|---|
| page | 1h | 5m | 14.4 | immediately |
| page | 6h | 30m | 6 | immediately |
| ticket | 3d | 6h | 1 | during working hours |
- alert: PaymentsErrorBudgetFastBurn
expr: |
(job:slo_errors_ratio:rate1h{service="payments"} > 14.4 * 0.001)
and
(job:slo_errors_ratio:rate5m{service="payments"} > 14.4 * 0.001)
labels:
severity: page
Why you need the short window: the long window stays "red" for an hour even after the problem is over. The short window confirms that the problem is still going on right now, and the alert clears quickly once it is fixed.
On the practical side: precompute expressions like rate1h as recording rules, otherwise alert evaluation gets heavy. On very low-traffic services (50 requests an hour), a single error sends the burn rate through the roof; there I add a minimum request count condition or synthetic traffic.
Sign up to mark studied questions and save your progress.