On-call and runbooks
Pages worth waking up for, a real runbook for a real failed deploy, toil turned into automation, incident roles, and rotations people survive.
On-call is the arrangement that makes sure someone will respond when production breaks at 3am. Done well, it is a quiet week with a phone that rarely rings. Done badly, it is how good engineers burn out and leave — and that is not a figure of speech; it is one of the most common reasons people give for leaving operations-heavy teams.
The difference is almost entirely in things decided before the page arrives.
Every page must be worth waking up for
The rule that matters most, and the one broken most often: an alert that pages a human must be urgent, real and actionable. If the right response is "look at it in the morning", it is not a page — it is a ticket. If the right response is "nothing, it recovers", it should not exist.
Each unnecessary page costs twice. Once in the sleep it took, and again in what it teaches: a person paged for nothing ten times learns to acknowledge and go back to sleep, and on the eleventh night the page is real.
The observability course's alerting lesson covers how to build alerts on SLOs and burn rates. From the on-call side, the test is simpler. After every page, ask:
- Was a user affected, or about to be?
- Did the person paged have to do something?
- Could they tell what to do?
Three yeses is a good page. Anything else is a change to the alert, made that week.
A runbook is the answer written down in daylight
A runbook is the page's instructions, written by someone rested who understood the system, for someone tired who may not. It does not have to be long. It has to answer, in order:
- What does this alert mean? In one sentence, in terms of users.
- How bad is it? How to tell a blip from an outage.
- What do I check first? The dashboard, the log query, the command — exact, copyable.
- What are the known causes, and the fix for each?
- When do I escalate, and to whom?
Here is a real one, for a real failure on this site. The deploy printed:
✗ fix-the-race-condition — THE STARTER PASSES EVERY CASE
deploy failed before the switch — removing /srv/code10x/releases/20260912-204250A runbook entry for it:
MEANING A pre-switch step failed. The live site is still serving the
previous release. No user impact.
SEVERITY Low. Do not roll back — nothing was switched.
CHECK Which step failed: the line above "deploy failed before the switch".
A guard name (✗ ...) means a check failed, not the server.
KNOWN A concurrency fixture whose starter passed: a race that did not
CAUSES manifest on that run. Re-run the one guard locally; if it fails
locally too, the fixture is wrong, not flaky.
Anything at "Building" — read .build.log in the release directory.
ESCALATE Only if the site health check itself fails.Notice the most useful line: "Do not roll back — nothing was switched." The instinct during a failed deploy is to roll back, and here that would change a working site for no reason. A runbook's job is often to stop the wrong action as much as to prompt the right one.
Runbooks decay; automate the stable parts
A runbook step that says "run this command, and if it prints X, run that one" is a script that has not been written yet. The Google SRE book calls repetitive manual operational work toil, and recommends capping it — its teams aim to spend no more than half their time on operational work, so the rest can go into removing it.
The progression is healthy: an incident teaches you the steps, the runbook records them, and the steps that never needed judgement become automation. What is left in the runbook is the part that does need a human.
This site has an example of the last step. Mirroring the curriculum into the database used to be a manual command after every deploy — a step that was easy to forget and silent when forgotten. It is now part of the deploy script, run before the switchover, and a deploy that cannot run it fails rather than going live half-done.
Running an incident
When a page turns out to be a real incident, the failure is rarely technical skill. It is coordination: three people investigating the same theory, nobody telling customers, a fix applied that nobody else knew about.
The roles that fix it, from the incident command systems that emergency services use:
| Role | Does | Does not |
|---|---|---|
| Incident commander | decides, assigns, keeps the timeline | debug — their hands stay free |
| Operations lead | investigates and makes changes | talk to stakeholders |
| Communications | updates users and the business on a schedule | change production |
On a small team one person may hold two roles. The point is that someone is explicitly the one deciding, and that every change to production is announced before it is made — so that when the graph moves, everyone knows why.
Two habits worth keeping from the first minute:
- Mitigate first, diagnose second. Roll back, fail over, turn the feature off. Users care that it works again, not why it broke. The root cause can be found from logs and dumps tomorrow.
- Write the timeline as you go. Times, what was seen, what was changed. Reconstructing it from memory afterwards produces a tidy, wrong story.
Sustainable rotations
- Handoffs are written. What is in flight, what is flapping, what was changed. A new on-call engineer inheriting a half-finished incident with no notes is how the same mistake happens twice.
- Being paged has a cost that is paid back — time off after a bad night, or compensation. A rotation that treats it as free is one that loses people.
- Every page is reviewed weekly. Not the incidents — the pages. Noisy alerts are fixed or deleted; that review is what keeps the phone quiet.
Under the hood: burn-rate alerting, the arithmetic behind "worth waking up for"
"An alert that pages a human must be urgent, real and actionable" is a design principle. The mechanism most production teams actually use to satisfy it is burn-rate alerting on an error budget, and the arithmetic is worth doing once by hand, because it explains both why naive threshold alerts page too much and why a good alert still needs two windows.
Start from an SLO: say 99.9% of requests succeed over a rolling 30 days. That means the error budget for 30 days is 0.1% of requests — the number of failures you are allowed before you have burned the whole budget. The burn rate is how fast you are consuming that budget relative to a sustainable pace: a burn rate of 1 means "consuming the budget exactly on schedule to run out right at 30 days if this rate holds"; a burn rate of 10 means "consuming it ten times faster than sustainable — at this rate the whole month's budget is gone in three days."
A single-window alert — "page if the error rate over the last 5 minutes exceeds X%" — has an unavoidable trade-off: a short window catches real incidents fast but pages on brief blips that recover on their own (false positives), and a long window filters out blips but takes hours to notice a real outage (slow detection). The fix used by Google's SRE workbook is two windows evaluated together: a long window (say 1 hour) to require the burn to be sustained, and a short window (say 5 minutes) nested inside it to confirm the burn is still happening right now, not just that it happened earlier in the long window and has since stopped. Only when both agree does the alert page. A common concrete pairing pages on a 14.4x burn rate sustained over 1 hour (which would exhaust a 30-day budget in about 2 days) confirmed by the same burn rate over the last 5 minutes, and separately pages a lower-urgency ticket on a 6x burn rate over 6 hours — fast, real problems get a human immediately; slow leaks get a ticket for daylight hours.
This is the same test the lesson already gives — was a user affected, did the page require action, could the person tell what to do — turned into a number a computer can evaluate at 3am without a human's judgement in the loop.
Try it yourself
Work out whether a burn rate deserves a 3am page
A service has a 99.9% availability SLO over 30 days (an error budget of 0.1% of requests). Over the last hour, 2% of requests have failed — a burn rate of 20x the sustainable pace (2% ÷ 0.1% = 20). Over the last 5 minutes, the error rate has dropped back to 0.05%.
Should this page a human right now, using the two-window rule above? What would you want to know before deciding, and what does the short window disagreeing with the long window most likely mean?
Reasoning through the two windows
The long window (1 hour, 20x burn) alone says "something bad happened and, if sustained, would exhaust a month's budget in under two days" — urgent on its own. But the short window (5 minutes, back down to roughly sustainable) disagreeing with the long window is exactly the signal the two-window design exists to catch: the problem was real, but it has already recovered. Paging now would wake someone for something that is no longer happening — the "look at it in the morning" case from the top of this lesson, except the morning conversation should specifically be "what caused that hour-long spike", since a 20x burn for an hour is worth a ticket and a graph annotation even though it does not deserve a page tonight. If the short window still showed an elevated rate, both windows would agree and it should page immediately.
Misconceptions
- "A lower alert threshold makes the team more responsive." Past a point it does the opposite — the "boy who cried wolf" effect is not a metaphor, it is what a person paged for nothing ten times actually does on the eleventh page. A burn-rate alert tuned to the SLO pages less often than a naive threshold and catches the incidents that matter more reliably, because it separates "unsustainable rate, sustained" from "brief noise".
- "The incident commander should be the most senior engineer available." The IC's job is coordination — deciding, assigning, keeping the timeline — not the deepest technical knowledge of the failing system. Making the most senior debugger also the IC takes your best diagnostician out of the investigation and puts them on the radio instead; the roles are deliberately separated so the person who understands the system fastest stays free to look at it.
Sources
- Google, Site Reliability Engineering and The Site Reliability Workbook — the alerting-on-SLOs and multiwindow, multi-burn-rate alerts chapters.
- PagerDuty, "Incident Response Documentation" — incident commander and role definitions.