The idea in one minute#
An error budget is useful only if something happens when it runs out. The error budget policy is a short document, agreed in advance by product, engineering and SRE, that says what: for example, “if the service has exceeded its error budget for the trailing 28 days, release only fixes and reliability work until it is back within budget.”
Agreeing in advance is the whole point. Decisions made calmly before an incident are fair; decisions made in the middle of one are politics.
An analogy#
A household budget with a rule written on the fridge: “if we overspend this month, no eating out until we are back under.” Nobody argues about it on the day, because everyone agreed to the rule when they were not hungry.
A picture#
flowchart LR
B[":i-coins: <b>Budget remaining</b><br/><small>trailing 28 days</small>"] --> G{"How much?"}
G -->|"> 50%"| GREEN["Normal<br/><small>ship freely, run experiments</small>"]
G -->|"0–50%"| AMBER["Caution<br/><small>riskier launches need SRE sign-off</small>"]
G -->|"exhausted"| RED["Freeze<br/><small>fixes and reliability only</small>"]
RED --> PM["Postmortem for any incident<br/>that used > 20% of budget"]
RED -->|"budget recovers"| GREEN
RED -->|"disagreement"| ESC["Escalate to<br/>named decision-maker"]
class B memory
class G queue
class GREEN io
class AMBER compute
class RED,PM warn
class ESC neutralHow it really works#
What the policy must say#
- Scope. Which services and SLOs it covers.
- Thresholds and actions. What happens at each level of remaining budget.
- What “freeze” means. Which changes are still allowed: security fixes, fixes for the incident, reliability improvements, config changes that reduce risk. Which are not: new features, risky migrations.
- Postmortem triggers. For example, any single incident that consumed more than 20% of the budget gets a postmortem.
- Exceptions. What counts as not our fault (a cloud-provider region outage?), and who decides. Be careful: excluding dependency failures from your budget hides the fact that users still saw them.
- Escalation. The named person (usually the product or engineering director) who decides when product and SRE disagree.
- What happens if the SLO is chronically missed. The SLO might be wrong, or the service might need sustained investment — or SRE hands the pager back to the developers.
An example policy#
Error budget policy — checkout-api v3, 2026-10-01
Applies to: checkout-api availability and latency SLOs (see SLO document).
1. Budget > 50% remaining (trailing 28 days)
- Normal release cadence. Experiments allowed.
2. Budget between 0% and 50%
- Releases continue through the standard canary.
- Launches marked "high risk" need sign-off from the SRE on call.
3. Budget exhausted
- Release freeze: only P0/P1 bug fixes, security patches, and changes whose
purpose is to improve reliability. Each needs an SRE approver.
- At least one engineer per team works on the top postmortem action items.
- The freeze lifts automatically when the trailing 28-day SLI is back above SLO.
4. Any single incident consuming > 20% of the 28-day budget
- Requires a postmortem with at least one P1 action item.
5. Out-of-scope events
- None. Dependency outages count, because users felt them. They are tracked in the
postmortem and drive dependency work instead.
6. Disagreements
- Escalate to the Director of Engineering, Commerce, whose decision is final.
7. Three consecutive quarters out of SLO
- Review whether the SLO is appropriate, and whether the service should stay
SRE-supported.
Agreed: Payments engineering lead, Product manager (Checkout), SRE lead.Common mistakes#
- No owner for exceptions. Every freeze becomes a negotiation.
- Freezing everything. If fixes cannot ship either, the freeze makes reliability worse.
- A freeze that never lifts automatically. Tie it to the SLI recovering, not to a meeting.
- Using the budget as a punishment. It is a decision tool. A team that spent its budget on a big, valuable launch may have used it exactly as intended.
- Policies nobody can find. Link it from the SLO dashboard and the paging alert.
Budget recovery is slow#
With a rolling 28-day window, a large incident stays in the window for 28 days. After an outage that used 150% of the budget, the service needs many clean days before it is back in budget — which is exactly the period in which the team should be working on the causes.
A worked example#
Checkout has a 99.9% SLO over 28 days with 2 million requests a week: about 8 million requests per window, so a budget of 8,000 failed requests.
- Day 3: a bad deploy fails 12% of requests for 25 minutes (about 6,000 requests at that hour’s traffic). Budget used: 75%. Policy level 2, and the single-incident trigger (>20%) requires a postmortem.
- Day 9: a payments-provider blip costs another 2,500 failures. With the background of about 60 failures a day, the budget is now about −14% — exhausted. Freeze.
- During the freeze: the team ships the canary analysis that would have caught day 3, and a retry with a backup provider.
- Day 31: day 3 leaves the window. About 48% of the budget remains (policy level 2), and the freeze lifts on its own.
The program simulates exactly this with a rolling window, so you can see when the freeze starts and when it lifts.
Code#
// budgetpolicy.go — simulate a rolling 28-day error budget and the policy level each day.
package main
import "fmt"
func main() {
const slo = 0.999
const window = 28
const reqPerDay = 2_000_000.0 / 7
// Bad requests per day: a quiet baseline plus two incidents.
bad := make([]float64, 45)
for d := range bad {
bad[d] = 60 // background failures
}
bad[3] += 6000 // bad deploy
bad[9] += 2500 // dependency blip
budget := (1 - slo) * reqPerDay * window
fmt.Printf("budget: %.0f bad requests per %d days\n\n", budget, window)
fmt.Println("day used remaining level")
prev := ""
for d := range bad {
start := d - window + 1
if start < 0 {
start = 0
}
used := 0.0
for _, b := range bad[start : d+1] {
used += b
}
remaining := 1 - used/budget
level := "normal"
switch {
case remaining <= 0:
level = "FREEZE"
case remaining < 0.5:
level = "caution"
}
if level != prev || d%7 == 0 {
fmt.Printf("%3d %6.0f %8.0f%% %s\n", d, used, remaining*100, level)
}
prev = level
}
}The freeze begins on day 9 and lifts on day 31, when the day-3 incident leaves the window.
Remember this#
- An error budget without a policy is just a chart.
- The policy is agreed in advance by product, engineering and SRE, and names an escalation owner.
- Freezes still allow fixes and reliability work, and lift automatically when the SLI recovers.
- Large incidents trigger postmortems; chronic misses trigger a review of the SLO or the support model.
Try it#
- Run
budgetpolicy.go. Move the dependency blip to day 20. Does the freeze still happen? - Write a five-line error budget policy for a service you know. Who is the escalation owner?
- Decide: should a cloud-region outage count against your budget? Write the argument for both sides.
Check yourself#
- Why must the policy be agreed before it is needed?
- What should still be allowed to ship during a freeze?
- Why is “the freeze lifts when the SLI recovers” better than “the freeze lifts after a meeting”?
- What does it mean if a service misses its SLO three quarters in a row?