SLA vs SLO vs SLI Explained
On this page
Why SLOs: deciding how reliable is reliable enough
Product wants to ship a risky change on Friday. The on-call engineer wants a freeze. Both have opinions; neither has a number. Service level objectives turn "reliable enough" into something measurable, and the error budget turns that measurement into a decision rule both sides accept. The approach comes from Google's Site Reliability Engineering practices.
SLI vs SLO vs SLA
- SLI (service level indicator): a measurement of what users experience. "Share of checkout requests that succeeded in under 500 ms."
- SLO (service level objective): an internal target for an SLI over a time window. "99.9 percent of checkout requests succeed in under 500 ms, measured over 30 days."
- SLA (service level agreement): an external, contractual promise with consequences, usually service credits. "99.5 percent monthly availability, or the customer receives a 10 percent credit."
The SLA is looser than the SLO on purpose. The SLO is your early warning; you want to notice and fix things long before you owe customers money.
How to choose good SLIs
Measure what users feel, as close to them as you can:
- Availability: successful requests ÷ valid requests. Count 5xx errors and timeouts as failures; usually don't count 4xx, which are the client's fault.
- Latency: share of requests faster than a threshold, rather than an average.
- Freshness, correctness or durability for pipelines and data: "share of reports generated within 10 minutes of the data arriving".
Common mistakes: measuring server CPU instead of user requests; measuring at the server when users experience failures in the load balancer or CDN; and averaging latency, which hides the tail (Day 3).
Error budgets and burn-rate alerts
An SLO of 99.9 percent means 0.1 percent of requests (or time) may fail. That allowance is the error budget:
SLO 99.9% over 30 days
time-based: 30 days × 24 h × 60 min × 0.001 ≈ 43 minutes of failure allowed
request-based: 10 million requests × 0.001 = 10,000 failed requests allowedThe decision rule:
- Budget remaining: ship features, run experiments, take reasonable risks. Failure within budget is acceptable by design.
- Budget spent or burning fast: freeze risky launches and spend engineering time on reliability until it recovers.
Teams alert on the burn rate, how fast the budget is being used. A burn rate of 1 uses exactly the budget over the window; a burn rate of 14.4 uses 2 percent of a 30-day budget in one hour, which is where Google's SRE workbook suggests paging. Pair each alert with a short window, such as the last 5 minutes, so the page stops quickly once the problem is fixed. Slow burns over days open a ticket instead.
The decision rule only works if it was agreed before it's needed. Write an error budget policy with product and engineering together: what happens when the budget runs out, who can grant an exception, and when the freeze lifts. Negotiating it in the middle of an incident just restarts the Friday argument.
How to set an SLO target
Don't aim for 100 percent: it's impossible, and every extra nine costs much more (Day 4). Set the SLO from what users need and what your dependencies allow. A service that depends on three others at 99.9 percent can't promise 99.99. Start with what you achieve today, then tighten if users need it.
Watch low-traffic services. With 2,000 requests a month, a 99.9 percent SLO allows two failures, so one bad minute spends the whole month. Use a longer window, combine similar endpoints into one SLI, or add synthetic probes so the measurement has enough data to mean something.
Check yourself
An SLO is an internal target used to guide engineering; an SLA is an external promise with contractual consequences, normally set looser than the SLO.
At that volume, one failed request spends the budget, so the SLO is noise. Lengthen the window, group endpoints, or use synthetic checks.
About 22 minutes per 30-day month. A month has 43,200 minutes, and 0.05 percent of that is 21.6 minutes. That's the total budget for all failures, deploys and incidents, which is why a single slow failover can spend most of it.
The service has failed users more than the agreed target allows. Following the error budget policy, the team pauses risky releases and feature launches and focuses on reliability work, such as fixing the cause of the incidents, until the budget recovers in the next window.
It measures what users experience, such as the share of requests that succeed within 300 ms, measured as close to the user as practical. CPU usage or server uptime are poor SLIs because users can suffer while they look fine.