Definition
- Error budget – The amount of unreliability a service is permitted over a window, derived as 100% minus the SLO target.
- Consumable resource – As long as budget remains, the team can spend it on deployment risk and feature velocity.
- Feature freeze trigger – When the budget is exhausted, risky feature work is frozen and the team prioritizes reliability.
- Burn rate alerting – Alert on how fast the budget is being consumed, not on individual failures.
- Decision tool – Resolves the product-vs-ops tension with data instead of opinion or seniority.
Think of the National Bank of India giving each service a monthly allowance of "allowed mistakes." If the promise is that 99.9 out of every hundred transfers succeed, the allowance is the 0.1: a small pot of permitted failures. Every failed transfer spends a little from the pot. While there is money left, the team is free to try new things. But if the pot runs empty, the rule is clear: stop shipping risky features and spend all effort making the service reliable again until the next month's allowance refills.
Understanding the Concepts
What is an error budget?
The error budget follows mechanically from the SLO. If the availability SLO is 99.9% over 30 days, then 0.1% of valid requests are allowed to fail in that window, and that 0.1% is the budget. You can express it as a fraction of requests or as downtime.
# Error budget calculation:
# SLO = 99.9%
# Error budget = 100% - 99.9% = 0.1%
# In requests (1,000,000 requests/month):
# Allowed failures = 1,000,000 * 0.001 = 1,000 failures
# In downtime (30-day month):
# Allowed downtime = 30 days * 24 hours * 0.001 = 0.72 hours = ~43 minutes
# Track budget consumption in Prometheus
# Budget consumed = observed failures / allowed failures
# PromQL:
(
sum(increase(http_requests_total{app="transfer-api",status=~"5.."}[30d]))
/
(sum(increase(http_requests_total{app="transfer-api"}[30d])) * 0.001)
) * 100
# Result: percentage of error budget consumed (e.g., 45%)
How do teams use the error budget?
The budget resolves the natural tension between product (ship fast) and operations (stay stable). When budget remains, change is acceptable. When it is exhausted, reliability takes priority.
# Error budget policy at National Bank of India:
#
# Budget consumed < 50%:
# -> Ship features freely, take reasonable deployment risk
# -> Run experiments, A/B tests
#
# Budget consumed 50-80%:
# -> Ship only low-risk changes
# -> Tighten canary analysis, extend pause durations
# -> Review recent incidents for patterns
#
# Budget consumed > 100%:
# -> FEATURE FREEZE: only reliability fixes and critical security patches
# -> Mandatory postmortem for each incident that consumed budget
# -> Focus: fix root causes, improve tests, harden pipeline
# -> Resume features only when rolling window restores budget
How does burn rate alerting work?
Alert on burn rate (how fast the budget is being consumed relative to the window) rather than on individual failures, because a transient blip should not page anyone, but spending a day's budget in an hour is an active incident.
# Multi-window burn rate alerts
# Fast burn: consuming 14.4x the sustainable rate over 1 hour -> PAGE
- alert: TransferApiFastBurn
expr: |
(
1 - sum(rate(http_requests_total{app="transfer-api",status=~"2.."}[1h]))
/ sum(rate(http_requests_total{app="transfer-api"}[1h]))
) > (14.4 * 0.001)
for: 2m
labels:
severity: critical
annotations:
summary: "Error budget burning 14x faster than allowed (1h window)"
# Slow burn: consuming 3x the sustainable rate over 3 days -> TICKET
- alert: TransferApiSlowBurn
expr: |
(
1 - sum(rate(http_requests_total{app="transfer-api",status=~"2.."}[3d]))
/ sum(rate(http_requests_total{app="transfer-api"}[3d]))
) > (3 * 0.001)
for: 1h
labels:
severity: warning
# Burn rate alerting tiers:
# 14.4x burn over 1h -> page on-call immediately (active incident)
# 6x burn over 6h -> page within 30 minutes
# 3x burn over 3 days -> ticket, investigate during business hours
# 1x burn over 30 days -> everything is fine, budget is sustainable
How does the error budget resolve product-vs-ops tension?
Instead of an argument settled by opinion, the budget settles it with data. Both sides agree to the policy up front.
# Without error budget:
# Product: "Ship the new loan feature NOW!"
# Ops: "No, the service is fragile, we need stability!"
# Result: whoever has more authority wins. No data.
# With error budget:
# Budget remaining: 60%
# Product: "Ship the loan feature."
# Ops: "Budget is healthy. Go ahead."
# Both sides agree because the data says it is safe.
# Budget exhausted: 105%
# Product: "Ship the loan feature."
# Ops: "Budget is spent. Policy says feature freeze until restored."
# Product: "Understood. Let us fix reliability first."
# The decision is made by data, not authority.
What is the relationship between error budget and deployment risk?
Every deployment consumes some error budget because it carries risk of failure. When budget is healthy, you can afford to deploy more frequently. When budget is low, you slow down.
# Deployment risk budget model:
# Each deployment has an expected failure rate (e.g., 2% of canary requests fail)
# With 60% budget remaining (600 allowed failures left):
# A canary affecting 5% of 1M requests = 50,000 requests
# Expected failures: 50,000 * 2% = 1,000 failures
# Budget after deploy: 600 - 1,000 = OVER BUDGET
# Decision: this deploy is too risky. Fix the failure rate first.
What are common mistakes?
# WRONG: Treating the error budget as a stick to punish people
# "Your team exhausted the budget, so you are in trouble."
# Result: teams hide incidents and under-report failures.
# CORRECT: Treat the budget as a steering tool
# Exhausting the budget is a signal, not a punishment.
# Consistently exhausting it means: invest in reliability or relax the SLO.
# WRONG: Setting the SLO so tight that the budget is always exhausted
# SLO = 99.99% but infrastructure only supports 99.95%
# Budget is permanently spent. Team is always in feature freeze.
# Morale drops. Nobody ships anything.
# CORRECT: Set the SLO to match what users need and infrastructure supports.
# If 99.9% is sufficient for users, do not set 99.99%.
# A realistic SLO gives a usable budget.
What should a senior engineer know?
The budget should match user-perceived reliability. Consistently exhausting it signals either under-investment in reliability or an over-strict SLO. A senior engineer also tracks error budget trends across sprints, correlates budget consumption with deployments, and uses the budget to justify reliability investment to leadership.
What are common interview follow-up questions?
- "What happens if the error budget is not spent at all?" -- It may mean the SLO is too loose and can be tightened, or the team is not shipping fast enough.
- "Can different services have different SLOs?" -- Yes. A payments API needs 99.9%; a report generator may need only 99%.
- "How often do you review SLOs?" -- Quarterly, adjusting based on user feedback, business needs, and actual consumption patterns.
Visual Overview
Error Budget Lifecycle
======================
┌─────────────────────────────────────┐
│ SLO = 99.9% │
│ Error Budget = 0.1% = 1,000 fails │
│ Window: 30 rolling days │
└──────────────┬──────────────────────┘
│
┌────────┴────────┐
│ Budget healthy │
│ (< 80% used) │
└────────┬────────┘
│
▼
Ship features, deploy frequently, run experiments
│
incidents consume budget
│
┌────────┴────────┐
│ Budget low │
│ (80-100% used) │
└────────┬────────┘
│
▼
Tighten canary, low-risk changes only
│
┌────────┴────────┐
│ Budget spent │
│ (> 100% used) │
└────────┬────────┘
│
▼
FEATURE FREEZE: reliability fixes only
Wait for rolling window to restore budget
Key Takeaway
An error budget is the amount of unreliability a service is allowed over a window, derived as 100% minus the SLO target. If the SLO is 99.9%, the error budget is 0.1%, which over a month of one million requests means one thousand allowed failures. The power of the idea is that it turns reliability into a consumable resource: while budget remains, the team can spend it on deployment risk and feature velocity, and when it is exhausted, risky feature work is frozen and the priority shifts to reliability.
The budget resolves the natural tension between product wanting to ship fast and operations wanting stability, and it resolves it with data instead of opinion. Teams operationalize it with an explicit policy: when budget is healthy, ship freely; when it gets low, tighten canary analysis; when it is spent, institute a feature freeze. Alerting is based on burn rate, so a fast burn that spends days of budget in an hour pages immediately, while a slow burn only raises a ticket. At the National Bank of India, the transfer service had a monthly budget of one thousand allowed failures, and when a bad deploy burned 60% of the budget in one interval, the burn-rate alert paged on-call immediately.
Remember one sentence: the error budget is the allowed unreliability derived from the SLO, spent on feature risk while it lasts and triggering a reliability freeze when it is gone.
---