tech, developers, and the code underneath

issue 256· essay·

The 3am runbook

A runbook written for a calm reader is not a runbook. It is documentation with a misleading filename.

Most runbooks are written by the person who understands the system, for a reader who also understands the system. They are useless at the moment they are needed, because the reader at 3am is frightened, half asleep, and has never seen this alert before.

Write for that reader. It changes everything about the format.

what the 3am reader can and cannot do#

Cannot: reason about architecture, hold five facts in working memory, follow a link chain, interpret "should be obvious from the logs."

Can: copy and paste a command. Compare a number to a threshold. Follow a numbered list. Recognise a screenshot.

Every runbook decision follows from that.

the shape#

ALERT: checkout-p99-latency

WHAT IT MEANS
Checkout requests are taking >2s at p99 for 5 minutes.
Users see a slow spinner. They can still complete orders.
Severity: page. Not a full outage.

FIRST: IS IT REAL?
1. Open <dashboard link>
2. Look at the "checkout p99" panel, last 30 min.
   - Still elevated? continue.
   - Recovered? note in the channel, no action, close.

MOST LIKELY CAUSES  (in the order they have actually happened)
1. A deploy in the last 30 min  → check <deploy log link>
   If yes → roll back: `deployctl rollback checkout`  (takes ~90s)
2. Database connection pool saturated → check <panel link>
   If pool_wait_ms > 200 → scale: `deployctl scale checkout +4`
3. Upstream payment provider slow → check <status page link>
   If yes → nothing to do. Post in #incidents. Wait.

IF NONE OF THOSE
Escalate to <team> via <how>. It is fine to escalate. Do it at 15 minutes.

DO NOT
- Do not restart the database.
- Do not clear the Redis cache; it will cause a stampede and make it worse.

the properties that make it work#

It says what the alert means in user terms. "p99 latency above threshold" is the alert. "Users see a slow spinner but can still order" is what lets a responder judge urgency and decide whether to wake someone else.

It has a "is it real?" step. A large fraction of pages are the alert being wrong. Checking takes thirty seconds and prevents a panicked response to nothing.

Causes are ordered by observed frequency, not by architectural elegance. Update the order after every incident. Whatever it actually was last time moves up.

Commands are literal and copy-pasteable. Not "scale the service" — deployctl scale checkout +4. Not "check the pool metrics" — a link that opens the exact panel with the right time range.

It includes expected durations. "Takes ~90s" stops someone from running the rollback three times because nothing appeared to happen.

It has a DO NOT section. This is the highest-value part of any runbook and the rarest. Every system has a plausible-looking action that makes things worse, and 3am is precisely when someone reaches for it.

It gives explicit permission to escalate, with a time. Responders wait too long because they feel they should be able to handle it. A written "escalate at 15 minutes" removes that judgement call entirely.

keeping them true#

Runbooks rot faster than code, because nothing breaks when they are wrong.

  • Link the runbook from the alert itself. If it is not one click from the page, it will not be read.
  • Update it during the incident, not after. The person following it has just discovered exactly which step was wrong. That is the moment of maximum knowledge and it evaporates by morning.
  • Delete runbooks for alerts that no longer exist. A stale runbook is worse than none, because it will be trusted.
  • Test one per month. Pick a runbook, have someone who did not write it follow it against a staging failure. Every single time, something in it is wrong.

The measure of a runbook is whether the newest person on the rota can resolve the incident without waking you. If the honest answer is no, it is a document about the system, not a runbook.

get README in your inbox

One dispatch, no noise. Tech and developer news, plus the occasional long piece on the craft.

subscribe →