Service Level Agreements and Error Budgets
How SLIs, SLOs and SLAs differ, and how an error budget turns a reliability goal into decisions.
Key takeaways
- An indicator measures performance, an objective sets the target, and an agreement attaches contractual consequences.
- An error budget equals one minus the objective, and it tells a team how much risk it can still take.
- Internal objectives should be stricter than any promise made to customers.
- Provider SLAs often compensate with service credits that are far smaller than the cost of an outage.
- Read the definitions and exclusions, because they decide what counts as downtime.
A service level agreement, or SLA, is a promise in a contract about how well a service will perform, with consequences if it falls short. An error budget is the flip side of a reliability goal: the amount of failure you've decided is acceptable over a period. Together they replace arguments about whether a service is "reliable enough" with numbers people have agreed on in advance.
You'll meet SLAs as a customer of hosting and cloud providers, and you may set targets for your own services. This article explains the terms, the arithmetic and the traps.
SLI, SLO and SLA
A service level indicator, SLI, is a measurement. A common form is a ratio of good events to all events: successful requests divided by total requests, or requests answered faster than a threshold divided by total requests.
A service level objective, SLO, is a target for that indicator over a window, such as "99.9 percent of requests succeed over 30 days." It's an internal commitment.
A service level agreement is the external version, written into terms, usually with a remedy such as a credit on your bill.
Keeping the objective tighter than the agreement gives you warning. You find out you're slipping while there's still room before a contract is breached.
Choosing good indicators
Measure what users experience. A server's processor load is useful for diagnosis but isn't something customers care about. Whether their request worked, and how long it took, is.
Typical choices include:
- Availability: the share of requests that get a correct response.
- Latency: the share answered within a set time.
- Freshness: how recent the data shown is.
- Correctness: the share of results that are right.
- Durability: the chance stored data stays intact.
For latency, avoid averages. An average can look fine while a noticeable slice of users waits many seconds. Percentiles help: if the 95th percentile is 800 milliseconds, 95 percent of requests were that fast or faster, and 5 percent were slower.
Decide where you measure. Server logs miss requests that never arrived. External probes catch that but sample only a few paths. Measurements from users' browsers reflect reality, including problems you can't fix.
Windows: rolling or calendar
Every objective needs a time window. A calendar window, such as each month, matches billing and reports, and the budget resets on the first. That reset can encourage odd behavior, like holding risky releases until the new month.
A rolling window, such as the last 30 days, moves forward continuously. A bad day stays in the count until it's 30 days old, which better matches how users remember problems. Many teams use rolling windows for engineering decisions and calendar periods for contracts.
Length matters too. Short windows react quickly and forgive quickly. Long ones smooth out noise but can leave a team penalized for months over one event. Four weeks or 30 days is a common starting point, and counting whole weeks keeps the number of weekends in each window steady.
A worked example
Say a booking service gets 3,000,000 requests in 30 days and has a 99.9 percent success objective. The budget is 3,000 failed requests. These numbers are invented for illustration.
In the first week, a faulty release causes 1,200 errors before it's rolled back. That's 40 percent of the budget gone. Background noise adds about 20 errors a day, another 600 over the month. The total so far points to 1,800, leaving 1,200.
The team now has a concrete question for its next database migration, which carries some risk: can it be done in a way that couldn't plausibly cost more than 1,200 requests, with margin to spare? If not, they can split it into smaller steps, schedule it for a quiet hour or wait.
The error budget
If your objective is 99.9 percent success, the budget is the remaining 0.1 percent. Over 30 days, expressed as time, that's about 43 minutes of full outage. Expressed as requests, with a made-up volume of 10 million per month, it's 10,000 failed requests.
Basis: Arithmetic on 43,200 minutes in a 30-day window.
The request-based view is often fairer. An outage at 3 a.m. that hits a few hundred requests spends less budget than one at the busiest hour. The uptime percentage guide shows other time periods.
Using the budget to make decisions
The budget's value is in what it permits. While budget remains, a team can release features, run migrations and try experiments. When it's nearly spent, effort shifts to reliability: fixing causes, adding tests, slowing risky changes.
This works only if the policy is agreed before trouble starts. A short written policy might say:
- Who reviews budget status and how often.
- What happens when it's mostly consumed, such as extra review for releases.
- What happens when it's gone, such as pausing nonurgent changes.
- Which changes are exempt, such as security fixes.
- Who can override, and how that gets recorded.
A budget that is never spent can be a signal too. The target may be looser than users need, or the team may be moving more cautiously than necessary.
Burn rate and alerting
Burn rate describes how fast you're using the budget. A rate of 1 would use exactly the whole budget by the end of the window. A rate of 10 would exhaust a 30-day budget in about three days.
Alerting on burn rate focuses attention sensibly. A very high rate over a short window should wake someone. A mild but persistent rate can wait for working hours. This produces fewer alerts than paging on every error spike. Monitoring with logs, metrics and traces provides the data underneath.
Reading a provider's SLA
Provider agreements deserve a careful read. Terms differ widely and change, so use the current document. Look for:
- The definition of unavailable. It may require a certain error rate for several consecutive minutes, so short failures might not count.
- Scope. One service, one region, or only deployments spread across multiple zones.
- Exclusions. Scheduled maintenance, your own configuration, third-party networks, attacks or events beyond the provider's control.
- The remedy. Often a percentage credit on that service's fees.
- The claim process. You may have to request the credit within a deadline and supply evidence.
A credit rarely resembles your loss. If a service costing a modest monthly fee halts your sales for a day, a partial refund of the fee does little. An SLA tells you what the provider will pay, which isn't the same as how reliable the service will be. For that, look at its track record, its status page and incident reports, and your own measurements.
Writing your own agreement
If you offer a service to customers, promise only what you can measure and meet. Set the contractual figure below your internal objective and check both against several months of history.
Spell out what counts: which functions are covered, how availability is calculated, where it's measured from, what's excluded, how customers report a problem and what they receive. Vague wording leads to disputes. Contract law differs from place to place, so have a lawyer review terms that carry real money.
Don't forget response promises for support. A commitment to answer a severe report within a set time is separate from uptime, and you can only keep it if someone is actually on call. Responding is also different from resolving, so say which one you mean.
Common mistakes
- Too many objectives. A dozen targets per service means nobody knows which matters. Start with two or three.
- Measuring what's easy. A health endpoint that returns success while checkout fails produces a perfect and useless score.
- Objectives without consequences. If nothing changes when the budget runs out, it's only a chart.
- Using budgets to assign blame. The point is to guide priorities. Punishing teams for spending budget encourages hiding failures.
- Never revisiting. User expectations and systems change, so review targets a few times a year.
Dependencies multiply
Your service can't easily be more reliable than the things it requires in sequence. If your app needs a host promising 99.9 percent and a payment service promising 99.9 percent, and failures are independent, the combination works about 99.8 percent of the time before counting your own bugs.
Redundancy, caching, retries and graceful fallbacks can beat that limit. Making a dependency optional is often cheaper than finding a better one. See high availability and failover.
Starting small
You don't need an elaborate program. Pick one user journey, such as signing in or placing an order. Define one availability indicator and one latency indicator for it. Look at the past few weeks to learn what's realistic. Set objectives slightly ambitious but achievable, and review them after a couple of months.
Avoid aiming for 100 percent. It leaves no room for change, costs enormously and exceeds what users can perceive, since their own devices and networks fail more often than that. The right objective is the point below which people are noticeably unhappy.
Common questions
Is an SLA required for an SLO?
No. Many internal services have objectives and no contract at all.
Does planned maintenance count against the budget?
Decide explicitly. Users experience it as downtime, so counting it is the more honest choice, though contracts often exclude it.
What if one big incident spends the whole budget?
Review the cause, apply your policy and fix what would prevent a repeat. A rolling window recovers gradually as old failures age out.