Rehearse the failure
Imagine tomorrow’s incident while you can still change today’s release.
“Can you look up my order? The money’s gone out, but I never got a receipt.”
At 9:12 on Tuesday morning, support pastes the message into the incident channel. By the time you open the dashboard, three more customers have said the same thing. Checkout is returning successful responses. The payments went through. The receipt worker is quietly moving failed jobs into a separate queue.
Then someone says, “What changed this morning?” And you look back at Monday’s release plan.
Monday, before the page
Tuesday hasn’t happened yet. It’s Monday afternoon, and someone in the change review has just asked the team to imagine that tomorrow’s release failed and to tell the story from the first sign of trouble. That’s the premortem. Give the team one real change and ask them to work backwards from a plausible failure.
The change is a new format for the event that tells the receipt worker an order has been paid. The release plan says the two versions of the worker will overlap for a few minutes. Both versions have passed their own tests. Then someone asks whether the old worker has ever tried to read an event written by the new checkout service. The team pulls up the test results. Each worker was tested with events from its own version.
Now the opening scene has a cause the team can check. Checkout records the payment and publishes an event. An older worker picks it up and can’t find a field it expects. After several attempts the event lands in the dead-letter queue, where the system keeps jobs it couldn’t process. The customer’s inbox stays empty, and the checkout error chart stays flat.
Donald Robertson describes a Stoic practice of imagining adversity and considering how you would respond. Monday’s team takes that practice one step further. They can test the story while the release is still in their hands.
Follow one order
Someone opens a test inbox. Another engineer places a test order in staging with the new checkout service and the old receipt worker. The payment succeeds. The inbox stays empty. In the worker logs they find the missing field.
Google’s Site Reliability Engineering distinguishes between observing a symptom from the outside and looking inside the system to understand it. The test inbox shows what a customer would experience. The worker log explains why. The team adds an end-to-end check for the test receipt and a rollout chart showing the share of paid orders in each group whose receipt was accepted by the email provider within the expected window. That chart tracks the handoff to the provider. The test inbox checks what actually arrives.
“Then we turn the new format off,” someone says.
“What happens to the orders already in the queue?”
They try it. The switch sends subsequent orders through the old format, while the failed events stay where they are. The team tests replaying those events through a worker that can read both formats. They submit the same order twice during the recovery test and verify that the email provider honours the same per-order idempotency key on both attempts. One receipt arrives. They rework the release so the compatible worker ships first and enable the new format only once they’ve verified that every worker reading from the queue can handle both formats.
Before leaving, they run a short tabletop exercise like the disaster role-playing sessions described in Google’s SRE book. The engineer who wrote the change sits out. The on-call engineer gets the alert and has to find the right chart, locate the switch, and explain what will happen to events already written. She has permission to pause the rollout. She finds the switch. The instructions for recovering queued events are still in somebody’s notes, so the team puts them in the runbook and tries the handover again.
Tuesday, during the release
The new format goes to a small group of orders first. The team compares receipt timeliness with orders still on the old path. They’ve agreed to pause if the new group falls below their release threshold or if a new-format event lands in the dead-letter queue. They’ll wait for enough orders to come through and give those receipts time to arrive before expanding. Peak volume is still an open question, so they record it in the release notes and keep the next stage small.
A checkout returns successfully. A few seconds later, a receipt appears in the test inbox. The on-call engineer knows which chart to watch, what would make her pause, and what she can do for an order that’s already been paid.
Reading notes
- Site Reliability Engineering: How Google Runs Production Systems, edited by Betsy Beyer, Chris Jones, Jennifer Petoff, and Niall Richard Murphy (O’Reilly, 2016). See chapter 3 on canary size and duration, p. 34, chapter 6 on symptom-oriented and internal monitoring, pp. 58–59, and chapter 28 on disaster role-playing, pp. 401–402. Page numbers are from the print pagination in the supplied PDF.
- Donald J. Robertson, A Guide to Marcus Aurelius and Stoicism, “Premeditation of Adversity,” p. 6. The checkout scenario is fictional.
Continue reading: Accountability without blame