SLIs, SLOs and SLAs
One shop API, one million requests, three numbers: what was measured, what the team aims for, and what the contract promises. With the error budget worked through.
In 30 seconds
An SLI (indicator) is a measurement of how well users were served, such as the share of requests answered correctly and quickly.
An SLO (objective) is the internal target for that number, for example 99.9 % over 30 days. The gap up to 100 % is the error budget: how much failure is acceptable before the team stops shipping and fixes reliability.
An SLA (agreement) is a contractual promise to customers, usually looser than the SLO, with a penalty such as a refund if it is broken.
SLIs, SLOs and SLAs, step by step
Invented numbers. Real SLOs often use rolling windows and several indicators at once, and SLA terms (levels, credits, exclusions) vary by contract.
- Step 1: Count what users feel. Over 30 days a shop’s API gets 1,000,000 requests. 999,600 are answered correctly within 300 ms; 400 fail or are too slow. The share of good ones, 99.96 %, is a service level indicator (SLI): a plain measurement of how users were served.
- Step 2: Pick a good indicator. An indicator is only useful if it moves when users suffer. Count events users can feel, measured where their requests arrive, as a share of good events out of all events. Machine numbers such as CPU usage, or an average that hides the slowest requests, make poor indicators.
- Step 3: Set a target: the SLO. A service level objective (SLO) is the target the team sets for its indicator: here, at least 99.9 % good requests over any 30 days. It is internal and chosen on purpose, strict enough to keep users happy but below 100 %, which no real system reaches.
- Step 4: The error budget. If 99.9 % must be good, 0.1 % may be bad: 1,000 requests in this window. That allowance is the error budget. 400 are used, 600 remain. Measured as time instead, 0.1 % of 30 days is 43.2 minutes of complete outage.
- Step 5: Spending the budget. A bad release fails 1,100 more requests. With 1,500 failures the budget of 1,000 is overspent and the indicator drops to 99.85 %, below the objective. The team’s rule, agreed in advance: while the budget is gone, risky releases pause and reliability work comes first.
- Step 6: The SLA: a promise. A service level agreement (SLA) is a contract with customers: here, 99.5 % or part of the fee is refunded. It is usually looser than the SLO, so the internal alarm rings well before the contract is broken. At 99.85 % the objective is missed but the agreement holds.
- Step 7: Three terms, side by side. The indicator is a fact you measure. The objective is the target you hold yourself to, and what is left above it is the error budget. The agreement is the weaker promise you sign, with a penalty attached. All three are stated about the same measurement.
Try it yourself
Learn this first
Learn next
- Chaos engineeringSwitching off a server on purpose to find a weakness before a real outage does. Intermediate
- Disaster recovery (RPO and RTO)How much data you can lose, how long you can be down, and what each costs. Intermediate
- Feature flagsShip code switched off, then turn it on for a few users, then for everyone. Beginner
Spotted a mistake on this page?