How it works
The explanation, with examples you can run.
SLI, SLO, SLA
- An SLI (indicator) is a ratio of good events to all events, measured where users feel it: the share of HTTP requests that return non-5xx in under 300 ms, the share of jobs that finish within an hour.
- An SLO (objective) is a target for an SLI over a window: 99.9% over a rolling 28 or 30 days.
- An SLA (agreement) is a contract with refunds or penalties. Set it looser than the SLO, so you notice trouble before it costs money.
Pick SLOs from what users need, not from what the system happens to do today. Few users notice the difference between 99.99% and 99.999%, but the second costs far more.
The error budget
Press Run to see what your code prints, in order.
Runs in this browser, in an isolated frame with no access to this page. console.log, info, warn and error are shown; code runs as a classic script, so use an async function for await.
A burn rate of 1 uses exactly the whole budget by the end of the window. The SRE Workbook suggests paging at fast burns (around 14.4× over an hour, which spends 2% of a 30-day budget in that hour) and filing a ticket for slow ones, using two windows so alerts both fire quickly and stop quickly.
An error budget policy
Agree in writing, before anything goes wrong, what happens as the budget runs down. For example: if the budget is exhausted, pause feature releases except security fixes, and put the next sprint into the top causes of failure; if a single incident burns more than a fifth of the budget, it gets a postmortem. The policy turns arguments about "are we being too risky?" into a shared rule.
On-call that people can sustain
- Page on symptoms, like SLO burn, and route causes (disk filling, CPU) to tickets and dashboards.
- Every page should need a human now. If the right response is "wait and see", it shouldn't page.
- Runbooks for each alert: what it means, how to check, how to mitigate, and how to roll back the last deploy.
- Blameless postmortems that end in actions on the system, not on a person.
- Watch the load. Too many pages per shift is itself an incident to fix.
Check yourself
3 questions. Get them all right to finish this topic.
0 of 3 right so far. Get all three to finish this topic.