Terminology (6)Terms used in this lesson
Term on the front, definition on the back. Paste with tabs between fields and a new line between cards, or import the download in Anki as Basic.
- SLO
- A service level objective: the share of eligible requests that must be good over a window, such as 99.9% over 30 days.
- SLI
- The measured share of good requests that the SLO is judged against.
- Error budget
- The bad requests the SLO allows over its window: eligible requests × (1 − target).
- Burn rate
- How many times faster than allowed the budget is being spent: a window’s error rate divided by 1 − target.
- Basis point
- One hundredth of a percent; 99.9% is 9,990 basis points.
- Page
- An alert that wakes the on-call engineer, as opposed to a ticket handled in working hours.
Why this matters
An availability target sounds like a grade: 99.925% is above 99.9%, so things are fine. Read as a budget it says something else. For a given eligible-request count, the target allows a corresponding number of failures; and the question on call is how fast they are being spent and how long the rest will last.
This lesson assumes percentages, ratios and rates per hour.
From a target to an error budget
A service-level indicator (SLI) measures the fraction of eligible requests that are good. A service-level objective (SLO) sets the target for that fraction over a period. The allowed bad fraction gives an error budget for the eligible-request count.
Budget used compares failures with that allowance. Burn rate compares a recent bad fraction with the allowed bad fraction, so windows with different request counts can be assessed against the same target. Converting burn into time left also needs a traffic assumption; the worked estimate freezes the allowance and carries the recent failure rate forward.
01An SLO is a budget
An SLO is a budget
A photo-backup app’s upload API has a 99.9% objective over 30 days. This evening uploads are failing more often than usual, but the 30-day dashboard tile still reads 99.925%, above target. A teammate suggests looking at it in the morning. Work out what the budget says.
A 99.9% target over 12,000,000 eligible uploads allows 12,000 to fail. 9,000 have failed, so 75% of the budget is gone and 3,000 remain. The dashboard tile shows the same counts as 1 − 9,000 / 12,000,000 = 99.925%, which looks comfortably green.
const allowed = 0.001; // a 99.9% SLO
const budget = 12_000_000 * allowed; // bad uploads allowed in 30 days
console.log(((9_000 / budget) * 100).toFixed(2)); // % of the budget used
console.log((30 / 1_500 / allowed).toFixed(2), (270 / 18_000 / allowed).toFixed(2)); // 5-minute and 1-hour burn
console.log(((budget - 9_000) / 270).toFixed(2)); // hours left at the last hour's rate
02Burn rate
Burn rate
Burn rate compares a window’s error rate with the rate the target allows. In the last hour 270 of 18,000 uploads failed, 1.5%, against an allowed 0.1%: a burn of 15. For the table below, assume constant eligible-request traffic matching the period’s average and a fixed full-budget allowance. Then burn b spends that allowance b times as fast: duration720/b hours, and an hour spends100b/720 percent. Without that traffic assumption, burn remains a normalized bad fraction but does not alone determine hours or failure count.
| Burn | A full budget lasts | One hour spends |
|---|---|---|
| 1 | 30 days | 0.14% |
| 6 | 5 days | 0.83% |
| 14.4 | 50 hours | 2% |
| 20 | 36 hours | 2.78% |
prom-client’s Counter, labelled by outcome, gives the bad and total counts. The burn is usually computed in the monitoring system from rates over each window.
03Two windows and a minimum
Two windows and a minimum
The page rule here is a burn of at least 14.4 over both the last 5 minutes and the last hour, with at least 100 uploads in each. The short window tests recent behavior; the long window integrates the bad fraction over a longer span. Both being high does not prove the degradation was continuous for an hour, and budget consumed also depends on traffic volume.
| Case | Last 5 minutes | Last hour | Decision |
|---|---|---|---|
| This evening | 30 / 1,500 → 20 | 270 / 18,000 → 15 | page |
| A brief blip | 12 / 600 → 20 | 40 / 20,000 → 2 | no page |
| Few uploads | 3 / 50 → 60 | 300 / 18,000 → 16.7 | no page: 50 < 100 |
04Time left in the budget
Time left in the budget
Freeze the current12,000-failure allowance for this planning estimate. At270 failures/hour, remaining 3,000/270=11.1 hours. This warns against waiting until morning if that rate persists. A real request-based budget changes with eligible traffic, and a rolling window also ages old successes and failures out; its actual exhaustion time needs those flows. Dividing the full 12,000 by 270 would say 44 hours, because it ignores the 9,000 already spent.
05What the counts mean
What the counts mean
06Make the evening page decision
Make the evening page decision
The upload API report first measures failures against the allowance, then applies the chosen short-and-long-window response rule. Its final request needs the unspent allowance and the actual recent window duration: using the full budget or failures per minute as failures per hour makes a reassuring but wrong time estimate.
An upload API on call
Budget used, the paired-window page rule, then the hours left.
In the frontend A budget status panel in Next.js and Svelte Optional
A status panel can show burn and hours left instead of a single availability figure. The same basis-point target and eligible/bad counts derive remaining allowance and the recent-window burn. No recent traffic leaves burn unavailable; an already exhausted allowance is still reported. Zero observed recent failures does not prove a zero future failure rate.
type Window = { bad: number; total: number; minutes: number };
// Valid bounded counts/basis points as in the lesson; freeze the allowance for this estimate.
function describe(targetBp: number, eligible: number, bad: number, recent: Window) {
const remainingUnits = eligible * (10000 - targetBp) - bad * 10000;
const burn =
recent.total === 0
? null
: recent.bad / recent.total / ((10000 - targetBp) / 10000);
const perHour = (recent.bad * 60) / recent.minutes;
const hours =
remainingUnits <= 0
? 0
: perHour === 0
? Infinity
: remainingUnits / 10000 / perHour;
return { burn, hours };
}
export async function BudgetPanel() {
const {
targetBp,
eligible,
bad,
recent
}: { targetBp: number; eligible: number; bad: number; recent: Window } = await fetch(
"https://status.example/api/slo/uploads",
{ cache: "no-store" }
).then((r) => r.json());
const { burn, hours } = describe(targetBp, eligible, bad, recent);
return (
<p>
{burn === null
? "No recent uploads; burn unavailable"
: `Burning at ${burn.toFixed(1)}×`}
;{" "}
{hours === 0
? "budget exhausted"
: hours === Infinity
? "no failures observed in the recent window"
: `about ${hours.toFixed(1)} h at this failure rate with a fixed allowance`}
.
</p>
);
}
Check this idea later
Sources
- Google SRE workbook: alerting on SLOs
- Google SRE book: service level objectives
- Prometheus: client libraries
Values above were computed in Node 22 and run in Go 1.27, Rust 1.99 and Apple clang 17. The upload API is a worked model.
Sign in to keep your read marks on every device. Sign in
Was this helpful?