Module 7
Change Safely
How good does it have to be, and how do we change it quickly when mistakes are expensive?
If you only do one thing: Propose your next rollout on one page, with the level where you’d stop it, then ask whoever leads on call for their view.
Last time
Two questions on Module 6: Design for Change. Answer in your head, then check.
Stewart Brand says “Fast learns, slow remembers.” Why not push a slow layer to move at a fast layer’s pace?
Two parts of a system are coupled “with respect to a particular change.” What does that let you do as a PM?
Why this matters
On a ticketing app, the worst time to fail is an on-sale, the morning a big tour’s tickets are released. When a failure would be that expensive, the usual answer is more sign-offs and bigger, rarer releases. That feels careful.
DORA, a research program on software delivery, points the other way. In its research on change approval, teams that needed a change board or a senior manager to approve changes were far more likely to be low performers, and it found no sign that the approvals made changes fail less often. Its five delivery measures count how fast changes get out and how often one fails, and across more than a decade of its surveys, teams that do well on speed tend to do well on stability. It all rests on what teams report about themselves.
Richard Cook, from Module 2: See the System, gives part of the reason: “Change introduces new forms of failure.” So a big, rare release brings many of them at once. A small one brings few, and you’ll find them sooner, while the change is fresh. Where nobody can tell ahead of time what a change will do, run what Dave Snowden and Mary Boone call “experiments that are safe to fail” (Harvard Business Review, 2007).
Before you change anything, know how good the service has to be, in words engineers can test: “When 50,000 fans try to buy in the first minute of an on-sale, checkout confirms 99 in 100 orders within 3 seconds.” An average hides the customers who wait, so when someone quotes you one, ask for the 99th percentile.
That’s harder to say when the output varies, as a model’s does. Google’s People + AI Guidebook, in its chapter “Errors + Graceful Failure,” says a recommender that’s useful 60 percent of the time “could be seen as a failure or a success, depending on the user and the purpose of the system.” It also names the failure that’s hardest to catch: one where “neither the user nor the system register an error.”
So decide what the model judges and what stays a plain rule. On your ticketing app, a model can score how likely each buyer is to be a bot, a rule can say what happens at each score, and a person can review the orders it holds back. The model sees patterns nobody could write down, and the rule keeps what happens to a fan predictable and easy to explain. Keep checking after launch: a model’s choices can shape the data it learns from next, and a change to one input can shift everything it does (Sculley and colleagues, 2015).
The short path
-
Google SRE book, “Embracing Risk”
Look for: Why 100 percent is the wrong target, and who sets the reliability target, the service level objective (SLO).
Why this source
- Why trust it
- Experience. Google’s site reliability engineers describe their own practice.
- What you’ll get
- One shared number to settle arguments between product and reliability.
-
Pete Hodgson, “Feature Toggles (aka Feature Flags)”
Look for: How deploying a change differs from releasing it: one puts it into production switched off, the other turns it on for customers, a few at first. Then how an ops toggle switches it off fast.
Why this source
- Why trust it
- Experience. Hodgson, a software delivery consultant long at Thoughtworks, writes from his work with teams. He’s frank that every toggle adds complexity.
- What you’ll get
- The mechanics behind “released to 1 percent of customers,” enough to ask your engineers sharp questions.
-
Read the Errors First
Look for: Why you read a model’s mistakes before you trust it, and how to tell what a change did.
-
Propose one rollout, and log it
Look for: The level at which you’d stop, for the customers it could hurt most.
-
Check yourself
Look for: What an error budget buys, how fast a seat record should change, and why you’d stop a test that’s winning.
Do
Propose one rollout (30 minutes). Pick a change coming up on your product, such as a new way to pay or a redesigned sign-up. Write a one-page proposal that answers five things. If you have no say over rollouts, write what you’d set, and bring it later to whoever does.
- The cohort: who gets it first, and how many.
- The goal measure you hope it moves.
- The guardrail metrics, which must not get worse, such as failed payments per thousand checkouts, and the level at which you’d stop. Or a hard line, where one case stops it, such as a customer charged twice. Break each down for the customers the change could hurt most, such as people on older phones or using a screen reader: a guardrail can hold on average while it fails them.
- Who can switch it off with a feature toggle, and how fast. In an app, the toggle has to ship in the version people installed.
- The error budget it might spend. No target yet? Note it, and ask later who sets one.
How much risk a change can take, and who gets it first, is product’s call. Engineering proposes how fast it ramps and how it’s switched off, within those limits, so give your view of those as a start.
Outside the 30 minutes, show it to your tech lead and whoever leads on call, and ask, “What do you fix by hand that this could break?” Then accept the plan they propose, or say which limit it misses.
For your decision log. Write whether you expect the rollout to reach all your users without being switched off, how sure you are, and why. You’ll have your answer when the last group has it.
What a good one looks like
Try yours first. Judgment comes from trying, then calibrating against an example.
Change: pay by bank, approved in the bank’s app.
- Cohort: 1% of buyers on quiet days, then 10%, 50%, and everyone, each step through a bigger on-sale.
- Goal: more checkouts end in orders, up from 62%.
- Guardrails: payment errors, not counting a bank’s declines, run 0.4 per thousand. Stop at 0.8, overall or in social apps’ browsers, where redirects break. The hard line is one payment with no ticket or refund after 15 minutes.
- Off switch: payments on-call switches it off within 10 minutes of an alert. In an on-sale it switches off automatically, in seconds.
- Error budget: the 99.9% target allows 1 failed checkout per thousand, or 43 minutes down a month at normal traffic. A 10-minute break for 1% of buyers spends six seconds of it. One on-sale minute down for everyone, at 45 times normal traffic, spends it all.
Decision log:
- Expect: it reaches everyone and is never switched off.
- Confidence: 65%, because it’s untested at on-sale load.
- Know by: June 10, when the last group has it.
What makes it good:
- Its breakdown and its hard line come from how this change breaks: bank redirects in social apps’ browsers, and money taken with no ticket.
- It prices a break by when it lands as well as how wide, and lets that price argue for an off switch that’s automatic during an on-sale.
- Its log says why it might fail, untested at on-sale load, and its ramp tests just that, each step through a bigger on-sale.
Optional: read one incident write-up (15 minutes). Find your team’s latest postmortem, or post-incident review. If there’s none, read “What happened” and “What went wrong” in Cloudflare’s account of its July 2019 outage, where one rule change went everywhere at once. Note when customers were first hurt, when the team knew, and how long switching it off took. Does it name one root cause, or the several that Module 2: See the System told you to expect? Outside the 15 minutes, ask your tech lead if you can sit quietly in the next incident review.
To bring to engineers
Bring what your next change must not make worse, and for whom. Say when a break would cost most, such as your busiest hour.
- How long do our slowest 1 in 100 customers wait today, at the step this change touches?
- What are our numbers on DORA’s five delivery measures, and which would you fix first?
- What can go wrong, and what are we going to do about it?
- If a model this release relies on were quietly wrong next month, what would tell us?
Check yourself
Answer in your head, then check.
Your team has error budget left this month. What does that let you do, and what happens once it’s spent?
Module 6: Design for Change said the records everything depends on, like a school’s grades, move slowly on purpose. This module says small, frequent releases are safer than big, rare ones. Which holds for your record of which fan has which seat?
Both, at different layers. Ship the code around the seat record in small steps, behind a toggle. Change its data and its contracts slowly, since every sale depends on them, and a toggle can’t undo a seat sold twice.
On your ticketing app, a test of a new seat map raises orders per visit, the goal it was meant to move. Why might you still stop the test?
Beyond this module. Most of this module guards against honest mistakes. What about someone breaking your product on purpose?
Go deeper: the full path
Optional, and not counted in the time above.
If you read one: Trustworthy Online Controlled Experiments. It covers the two calls here you’ll make most often: what an experiment answers to, and how fast a change reaches everyone.
-
Trustworthy Online Controlled Experiments, Ron Kohavi, Diane Tang, and Ya Xu
Read chapters 6 and 7, on the measures an experiment answers to, then chapter 15, on ramping a change to everyone.
Why this source
- Why trust it
- Experience. Between them, the authors built experimentation at Microsoft, Google, and LinkedIn, and wrote their practical guide from inside large online businesses.
- What you’ll get
- How to choose the measures an experiment answers to, guardrails among them, and fold those you want to move into one overall evaluation criterion. Then how to ramp a change to everyone without trading safety for speed.
-
Threat Modeling, Adam Shostack
Read Part I, “Getting Started.” The Threat Modeling Manifesto, which Shostack wrote with other practitioners, puts threat modeling in four questions: “What are we working on?” “What can go wrong?” “What are we going to do about it?” and “Did we do a good enough job?”
Why this source
- Why trust it
- Experience. Shostack spent nearly a decade at Microsoft, where he led the design of its threat modeling tool.
- What you’ll get
- Those four questions worked through at length, with no security training needed, so you can start the conversation with a security engineer while the design can still move.
-
AI Engineering, Chip Huyen
Read chapters 3 and 4, “Evaluation Methodology” and “Evaluate AI Systems.”
Why this source
- Why trust it
- Experience. Huyen taught machine learning systems design at Stanford and writes from real cases, many of them her own. She sticks to the fundamentals rather than any one tool.
- What you’ll get
- How to tell whether output that varies is good enough, and stays so: graded examples, models as judges and their limits, and checks on each part of the system.
-
Ford v Ferrari, directed by James Mangold (20th Century Fox, 2019)
Carroll Shelby and the driver Ken Miles build a car to beat Ferrari by testing it, lap after lap. Yarn taped to the body shows the front lifting at speed, and a brake failure in testing ends in a crash and a fire before they find a fix the rules allow. Meanwhile every change has to pass up through Ford. “You can’t win a race by committee,” Shelby tells Henry Ford II. The film makes more of a villain of one executive, Leo Beebe, than history does.
Why this source
- What you’ll get
- Speed that comes from many small tests, each cheap to fail, set against a company trying to make change safe by adding sign-offs.
Answers
Last time
- The slow layer holds what the rest depends on, such as a school’s record of grades or a contract. Forced to another layer’s pace, it ends badly, whichever way the push goes.
- Learn which kinds of change make both parts move, and why, to tell costly requests from cheap ones. You often know better than anyone which changes are coming.
Check yourself
- You can keep releasing, because the budget is room you’ve already agreed to spend. Once it’s spent, releases slow or stop until reliability recovers.
- Both, at different layers. Ship the code around the seat record in small steps, behind a toggle. Change its data and its contracts slowly, since every sale depends on them, and a toggle can’t undo a seat sold twice. Sidenote: There’s rarely clean, simple answers — that’s why you have this job.
- A guardrail metric got worse. A goal can rise for a bad reason: a map that flatters seats sells more of them, and refunds and complaints follow. Page load time can slip too, overall or for one group of customers.
- Abuse and attack, where a feature works as designed for someone you never designed it for, like a bot that buys the best seats to resell. Adam Shostack’s Threat Modeling, on the full path below, starts there.
Why these sources
Google SRE book, “Embracing Risk”
- Why trust it
- Experience. Google’s site reliability engineers describe their own practice.
- What you’ll get
- One shared number to settle arguments between product and reliability.
Pete Hodgson, “Feature Toggles (aka Feature Flags)”
- Why trust it
- Experience. Hodgson, a software delivery consultant long at Thoughtworks, writes from his work with teams. He’s frank that every toggle adds complexity.
- What you’ll get
- The mechanics behind “released to 1 percent of customers,” enough to ask your engineers sharp questions.
Trustworthy Online Controlled Experiments, Ron Kohavi, Diane Tang, and Ya Xu
- Why trust it
- Experience. Between them, the authors built experimentation at Microsoft, Google, and LinkedIn, and wrote their practical guide from inside large online businesses.
- What you’ll get
- How to choose the measures an experiment answers to, guardrails among them, and fold those you want to move into one overall evaluation criterion. Then how to ramp a change to everyone without trading safety for speed.
Threat Modeling, Adam Shostack
- Why trust it
- Experience. Shostack spent nearly a decade at Microsoft, where he led the design of its threat modeling tool.
- What you’ll get
- Those four questions worked through at length, with no security training needed, so you can start the conversation with a security engineer while the design can still move.
AI Engineering, Chip Huyen
- Why trust it
- Experience. Huyen taught machine learning systems design at Stanford and writes from real cases, many of them her own. She sticks to the fundamentals rather than any one tool.
- What you’ll get
- How to tell whether output that varies is good enough, and stays so: graded examples, models as judges and their limits, and checks on each part of the system.
Ford v Ferrari, directed by James Mangold (20th Century Fox, 2019)
- What you’ll get
- Speed that comes from many small tests, each cheap to fail, set against a company trying to make change safe by adding sign-offs.