Progressive rollouts

Canary analysis against SLIs, feature flags as kill switches, staged rollouts by region/cohort. Most outages are triggered by a change; make change cheap to undo.

About 28 min read3-question knowledge check

The mental model

A power grid operator does not flip the whole city onto a new transformer at once. They energise one substation, watch the meters for a few minutes, and only then bring the next one online — because if the new transformer has a fault, they want it to trip one neighbourhood, briefly, not black out the whole city. And critically, they keep the old transformer warm and one switch-throw away, so undoing the change is a second, not an hour.

Safe rollouts are that operator's discipline applied to shipping software. The foundational statistic that justifies the entire practice: the large majority of production outages are triggered by a change — a deploy, a config push, a flag flip, a schema migration. Steady-state systems that nobody touches rarely fall over on their own; they fall over when we change them. So the highest-leverage reliability work isn't making changes perfect (impossible) — it's making change cheap to undo and small in blast radius when it goes wrong.

That reframes the goal. You are not trying to prevent bad changes from ever shipping — you're trying to guarantee that when a bad change ships (and it will), it affects the fewest users for the shortest time. Two levers do this:

  • Small blast radius — expose the change to a tiny fraction first (one instance, 1% of traffic, one region, an internal cohort), so a bad change hits few users while you find out it's bad.
  • Fast, cheap rollback — the ability to undo the change in seconds, not a re-deploy — which usually means separating deploy (ship the code, dormant) from release (turn it on), so the undo is a flag flip, not a rebuild.

The three techniques that implement this — canary analysis against SLIs, feature flags as kill switches, and staged rollouts by region/cohort — are all variations on "expose it to a little, measure, and be able to pull it back instantly."

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision