SRE Error Budgets: Calculate, Alert and Enforce
How to calculate an SRE error budget, alert on burn rate and write an error budget policy that balances reliability with feature releases.
An SRE error budget is the amount of failure a service may have before it misses its SLO. For a 99.9% availability SLO over 30 days, that is 0.1% of requests, or about 43 minutes of full downtime. Teams spend the budget on releases and experiments, and a written policy says what changes when it runs out.
This guide is about the mechanics: how to calculate an error budget, how to alert on it with burn rates, and how to write the policy that turns the number into release decisions. If your question is who sets the number in the first place, read who should define error budgets in SRE-led DevOps teams. For the wider role of SRE, start with the role of SREs in DevOps teams.
Key takeaways
- An error budget is 1 minus the SLO, measured over a fixed window such as 28 or 30 days.
- Count it in requests (bad events divided by total events) where you can. Time-based budgets hide partial outages.
- Burn rate tells you how fast the budget is being used. A burn rate of 1 uses exactly the whole budget by the end of the window.
- The Google SRE Workbook recommends paging at a burn rate of 14.4 over 1 hour and 6 over 6 hours, and opening a ticket at a rate of 1 over 3 days, for a 99.9% SLO.
- The budget only balances reliability and feature work if a written error budget policy says what happens when it is spent, and leadership has agreed to it in advance.
What an error budget is, in one formula
Start with a service level indicator (SLI): a ratio of good events to valid events. For an HTTP API, a common SLI is the share of requests that return a non-5xx response within 300 ms. The service level objective (SLO) is the target for that ratio over a window, for example 99.9% over 30 days.
The error budget is what is left over:
error budget = 1 - SLO
allowed bad events = (1 - SLO) x total valid events in the window
If the API served 50 million valid requests in the last 30 days and the SLO is 99.9%, the budget is 0.001 x 50,000,000 = 50,000 failed or slow requests. Once those 50,000 are used up, the service has missed its objective for the window.
The Google SRE book chapter on embracing risk describes this as the main reason error budgets exist: product teams want to ship and SRE wants stability, and a shared, measured budget replaces arguments about opinion with a number both sides accept.
Error budget by SLO: the numbers to remember
When the SLI is time based (minutes the service was "up"), the budget converts to minutes. These figures are plain arithmetic on a 30-day window (43,200 minutes):
| SLO | Error budget | Downtime per 30 days | Bad requests per 1 million |
|---|---|---|---|
| 99% | 1% | 432 minutes (7.2 hours) | 10,000 |
| 99.5% | 0.5% | 216 minutes (3.6 hours) | 5,000 |
| 99.9% | 0.1% | 43.2 minutes | 1,000 |
| 99.95% | 0.05% | 21.6 minutes | 500 |
| 99.99% | 0.01% | 4.32 minutes | 100 |
Read the table from the bottom up before choosing a target. At 99.99% you get a little over four minutes a month. A single bad deploy that takes five minutes to roll back spends the whole month. Most teams that pick four nines discover they cannot ship at the pace they want, which is exactly the trade-off the budget is designed to expose.
Request-based versus time-based budgets
A time-based budget counts a minute as "down" only if the whole service failed. A partial outage where 20% of requests fail for an hour may never show up. A request-based budget counts every failed request, so the same incident consumes 20% of an hour's traffic from the budget. The SRE Workbook recommends event-based SLIs for this reason. Use time-based budgets only where you cannot count events, such as a batch system that either ran or did not.
Rolling windows versus calendar windows
A rolling 28- or 30-day window always looks at the most recent period, so a big incident stays on the books for four weeks and then drops off. A calendar window (the month of November) resets on the first day of each month, which is easier for reporting but lets teams "spend it all" at the end of a month. Rolling windows are the more common choice for alerting. A 28-day window has the advantage that it always contains the same number of weekends.
Burn rate: how fast the budget is being spent
Knowing the remaining budget is not enough to page someone. You need to know how fast it is going. Burn rate is the ratio of the current error rate to the error rate the SLO allows:
burn rate = observed error ratio / (1 - SLO)
Example for a 99.9% SLO:
observed error ratio over the last hour = 1.44%
burn rate = 0.0144 / 0.001 = 14.4
A burn rate of 1 means you will use exactly 100% of the budget by the end of the window. A burn rate of 14.4 sustained for one hour consumes 2% of a 30-day budget. Sustained for two days, it would use the entire month.
Multiwindow, multi-burn-rate alerts
The SRE Workbook chapter on alerting on SLOs recommends these starting parameters for a 99.9% SLO. Each alert fires only when both the long and the short window exceed the burn rate, which stops a recovered incident from paging for the next hour.
| Severity | Long window | Short window | Burn rate | Budget consumed |
|---|---|---|---|---|
| Page | 1 hour | 5 minutes | 14.4 | 2% |
| Page | 6 hours | 30 minutes | 6 | 5% |
| Ticket | 3 days | 6 hours | 1 | 10% |
Here is the fast-burn page written as a Prometheus alerting rule. It assumes you already record the error ratio over each window with recording rules named job:slo_errors_per_request:ratio_rate1h and job:slo_errors_per_request:ratio_rate5m. The names are examples; use your own.
groups:
- name: checkout-api-slo
rules:
- alert: CheckoutErrorBudgetFastBurn
expr: |
job:slo_errors_per_request:ratio_rate1h{job="checkout-api"} > (14.4 * 0.001)
and
job:slo_errors_per_request:ratio_rate5m{job="checkout-api"} > (14.4 * 0.001)
labels:
severity: page
annotations:
summary: "checkout-api is burning its 30-day error budget at 14.4x"
The slow-burn ticket uses the same shape with the 3-day and 6-hour windows and a threshold of 1 * 0.001. If you want the background on Prometheus and Grafana themselves, see our top SRE practices for DevOps teams, which covers SLO dashboards alongside other habits.
Why error budgets balance reliability and feature work
Without a budget, reliability arguments tend to go one of two ways. Either operations blocks releases because "the system feels fragile", or product pushes releases because "the customers are waiting". Neither side has a number. The error budget gives both sides the same number and a rule for what it means.
- When the budget is healthy, the team is allowed to take risk: ship more often, run experiments, try canary releases of bigger changes. Reliability above the SLO is not rewarded, because users do not notice the difference between 99.95% and 99.99% on a service promised at 99.9%.
- When the budget is nearly spent, the team slows down on risky change and spends time on the causes of the burn.
- When it is gone, the policy takes over. Usually that means a release freeze on everything except fixes and security patches until the window recovers.
The point is that the decision is made in advance, by people who are not in the middle of an incident. That is why the budget reduces conflict between developers and SRE instead of adding another meeting.
Writing an error budget policy
The Google SRE Workbook publishes an example error budget policy that is worth reading in full. A policy that works usually answers five questions:
- Which services and SLOs does it cover? Name them. A policy for "all services" is never enforced.
- What happens when the budget is exhausted? For example: no feature releases until the service is back within SLO for the trailing window; P0 bugs and security fixes are exempt.
- What happens when a single incident consumes a large share? A common rule is that any incident using more than 20% of the budget in four weeks requires a postmortem with at least one P0 action item to address the root cause.
- What is excluded? Outages caused by a dependency outside the team's control, or by a customer misusing the API, may be excluded, but say so explicitly and decide who rules on disputes.
- Who signs it, and who arbitrates? The policy needs agreement from the product owner, the development lead and the SRE lead, with a named escalation path (often the CTO) for disagreements.
A short policy you can adapt
Service: checkout-api
SLO: 99.9% of valid requests succeed (non-5xx, under 300 ms), rolling 28 days
1. Budget remaining > 25%: normal release cadence.
2. Budget remaining 0-25%: releases need SRE review; no risky migrations.
3. Budget exhausted: feature freeze. Only reliability fixes, security
patches and rollbacks ship until the 28-day SLI is back above 99.9%.
4. Any single incident consuming > 20% of budget: postmortem within
5 working days, with at least one P0 action item.
5. Disputes about exclusions: decided by the engineering director.
Signed: product owner, dev lead, SRE lead. Review: every quarter.
Spending the budget on purpose
A budget that is never used is a sign that the SLO is too loose or that the team is too cautious. Planned spending is legitimate. Common uses:
- Faster release cadence, with each release consuming a little budget when something goes wrong.
- Progressive delivery. A canary release limits how much budget a bad change can use, because only a slice of traffic sees it. Our guide to canary testing in continuous delivery covers the rollout side.
- Planned maintenance, such as a database version upgrade that needs a short write pause.
- Chaos experiments in production, run deliberately to find weaknesses before an unplanned failure does.
Common mistakes with error budgets
| Mistake | What goes wrong | Fix |
|---|---|---|
| SLO set from current performance | A service at 99.98% gets a 99.98% SLO and has no room to change | Set the SLO from what users need, then check that you can meet it |
| No written policy | The freeze is negotiated during every incident | Sign the policy before you need it |
| Alerting on raw error rate | Pages for short spikes that barely touch the budget | Use multiwindow burn-rate alerts |
| One SLO for every endpoint | A failing checkout hides inside healthy search traffic | Separate SLOs for critical user journeys |
| Measuring at the server only | Load balancer or DNS failures never count | Measure as close to the user as you can, such as at the load balancer |
| Treating budget as a target to hit | Teams "use up" budget at month end | Use a rolling window and review spending trends |
Error budgets, SLAs and incident metrics
An SLO and its budget are internal. An SLA is a contract with customers, usually with financial consequences, and it should be looser than the SLO so that the team notices a problem before the contract is breached. Our guide on how SRE teams handle SLA breaches covers what happens when the external promise is broken.
Error budgets also connect to incident metrics. Every minute of time to restore is budget spent, so cutting restore time directly protects the budget. See why time to restore service is a key SRE metric, and for automating the first minutes of response, automating incident response with runbooks.
How to start with one service this month
- Pick one user-facing service and one journey that matters, such as login or checkout.
- Define one SLI as a ratio of good events to valid events, measured at the load balancer or API gateway.
- Look at four weeks of history. Choose an SLO a little below what you achieved, unless users are already unhappy.
- Build a dashboard showing SLI, budget remaining and burn rate.
- Add the two page alerts and the ticket alert from the table above.
- Write a one-page policy and get it signed by product, development and SRE.
- Review after one month: did the alerts fire for real problems, and did the policy get used?
SLOs, Prometheus alerting and incident practice are part of the SRE and monitoring modules in our DevOps training in Pune, available in the Kharadi classroom or live online. If you want to go deeper on the tooling, the Prometheus and Grafana course covers recording rules and alerting in practice.
Frequently asked questions
What is an error budget in SRE?
It is the amount of unreliability a service may have in a window before it misses its SLO. It equals 1 minus the SLO, so a 99.9% SLO gives a 0.1% budget of failed requests or downtime.
How do you calculate an error budget?
Multiply (1 minus the SLO) by the number of valid events in the window. With a 99.9% SLO and 50 million requests in 30 days, the budget is 50,000 bad requests.
How much downtime does 99.9% allow?
About 43.2 minutes in a 30-day window, or roughly 8.8 hours over a year. At 99.99% the 30-day figure drops to about 4.3 minutes.
What is a burn rate?
Burn rate is the observed error ratio divided by the error ratio the SLO allows. A burn rate of 1 uses the whole budget by the end of the window; 14.4 uses 2% of a 30-day budget in one hour.
What happens when the error budget runs out?
Whatever the signed error budget policy says. Most policies freeze feature releases and allow only reliability fixes, security patches and rollbacks until the SLI recovers within the window.
Should every service have an error budget?
Every user-facing service with a meaningful SLO benefits from one. Internal tools with no users waiting on them may not justify the alerting and policy overhead, so start with the services customers notice.
Is an error budget the same as an SLA?
No. The SLA is an external contract, often with penalties. The SLO and its error budget are internal targets, set tighter than the SLA so the team reacts before the contract is at risk.
References
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0