TExcelTAD
Home › Site Reliability Engineering: SLOs, Incidents & Chaos › Error Budget Policies & Release Velocity

Error Budget Policies & Release Velocity

An error budget only changes behaviour if everyone agreed in advance what happens when it runs out. That agreement is the error budget policy: a short document signed by engineering and product leadership. Agreeing in a calm week is the point; nobody negotiates well in the middle of an outage.

A policy template

markdown
# Error budget policy: checkout service

Applies to the SLOs in the checkout SLO document (availability 99.9%, latency 99% < 800 ms; rolling 28 days).
Approved by: head of payments engineering, checkout product lead, SRE lead. Reviewed every quarter.

## While budget remains
- Releases follow the normal process (canary, automated analysis).
- Planned risky work (migrations, failover tests) is fine; it should not use more than 30% of the budget.

## When the budget is exhausted (remaining <= 0%)
- Feature releases stop. Only fixes for P0 bugs, security fixes, and changes that improve reliability ship.
- The team's top priority is the reliability work identified by the postmortems that spent the budget.
- The freeze ends when the 28-day SLI is back above the SLO.

## When a single incident uses more than 20% of the budget
- A postmortem is mandatory, with at least one P0 action item.

## Escalation
- Disagreements about the policy go to the CTO. Exceptions are written down, with the reason.

## Outside the team's control
- Budget spent by a dependency still counts. The response may be a fallback, a cache or a renegotiated SLO with
  the dependency's team; it is not a reason to ignore the policy.

Common variations: a softer stage at 25% remaining (extra review for risky changes), a cap on deploys per day while budget is low, and excluding incidents caused by a cloud-wide outage (decide that before it happens).

Velocity versus reliability: a simulation

The model runs a quarter of daily deploys for a team that ships one feature a day. Each feature deploy has a 6% chance of causing an incident that burns 15–35% of the 28-day budget. With the policy, the team stops feature work while the rolling budget is exhausted and spends those days on reliability fixes, each of which lowers the risk of later deploys a little:

python · try it yourself
import random

DAYS = 91
BACKGROUND = 0.006                      # share of the 28-day budget used by noise each day

def quarter(policy, seed=5):
    rng = random.Random(seed)
    risk = 0.06
    daily_spend = []                    # budget fraction spent each day
    features = fixes = frozen_days = 0
    worst = 1.0
    for day in range(DAYS):
        remaining = 1 - sum(daily_spend[-27:])          # budget left in the 28-day window so far
        spend = BACKGROUND
        if policy and remaining <= 0:
            frozen_days += 1
            fixes += 1
            risk = max(0.02, risk * 0.9)                 # reliability work makes deploys safer
            rng.random(); rng.random()                   # keep the random stream aligned
        else:
            features += 1
            if rng.random() < risk:
                spend += rng.uniform(0.15, 0.35)
            else:
                rng.random()
        daily_spend.append(spend)
        worst = min(worst, 1 - sum(daily_spend[-28:]))
    return features, fixes, frozen_days, worst, risk

for policy in (False, True):
    f, fx, frozen, worst, risk = quarter(policy)
    print(f"policy {'on ' if policy else 'off'}: features shipped {f:2}, reliability fixes {fx:2}, "
          f"frozen days {frozen:2}, worst budget remaining {worst:6.0%}, final deploy risk {risk:.1%}")
policy off: features shipped 91, reliability fixes  0, frozen days  0, worst budget remaining   -56%, final deploy risk 6.0%
policy on : features shipped 76, reliability fixes 15, frozen days 15, worst budget remaining   -28%, final deploy risk 2.0%

Without a policy the team ships every day and overspends its budget badly. With the policy it ships fewer features this quarter, keeps the overspend smaller, and ends with deploys that are safer, which will let it ship faster next quarter. The policy doesn't stop change; it ties the rate of change to the reliability users actually got.

Making it work in practice

  • Visible budgets. Put "budget remaining" for each SLO on the team dashboard and in the weekly review, so the freeze never comes as a surprise.
  • Small, reversible releases spend less budget per mistake: canaries, feature flags and fast rollbacks (Canary Releases, Feature Flags) are how a team keeps shipping on a tight budget.
  • Automate the gate. A CI step can query the budget and block non-exempt deploys when it's exhausted; exempt changes carry a label such as reliability-fix. The deployment pipeline then enforces what people agreed.
  • Use the budget. If the budget is never spent, ship faster, run that failover test, or tighten the SLO.

Test yourself

Why should the error budget policy be agreed before the budget runs out?

  1. It is a legal requirement
  2. Decisions made calmly and in advance are respected; negotiating during an outage turns into an argument
  3. Prometheus needs it
  4. It saves budget

The budget is exhausted. Which change may still ship under the template policy?

  1. A new recommendation widget
  2. A fix for the retry bug that caused last week's outage
  3. A redesign of the checkout page
  4. A marketing banner

Half of the budget was spent because a dependency was unreliable. What does the template policy say?

  1. Those errors don't count
  2. They still count; the response may be a fallback, a cache or renegotiating with the dependency's team
  3. Fire the dependency team
  4. Double the SLO