Distributed systems / SLIs, SLOs and SLAs

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.

Beginner7 steps~6 min
SLI — the measured value
SLO — the team’s own target
SLA — the promise in the contract
Error budget — failures allowed, with the spent part in red
// THE SHORT VERSION

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

STEPS01 / 07

Invented numbers. Real SLOs often use rolling windows and several indicators at once, and SLA terms (levels, credits, exclusions) vary by contract.

STEP 01 / 07 Count what users feel
THE MATH
SLI = good / total = 999,600 / 1,000,000 = 99.96 %
  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
VALUES SO FAR
requests1,000,000input
failed400input
SLI99.96 %measured
SLO····target
budget····rule
failed····input
SLI····measured
SLA····contract

Spotted a mistake on this page?