PRACTITIONERCHAPTER 11

Progressive delivery: canaries, flags and automatic rollback

A canary is evidence only when its size and duration are chosen on purpose: write the rollout policy that sets stages, sample floors and stop rules, and let a controller roll back faster than a person would

40 MINSRE, PLATFORM AND DEVOPSUPDATED 2026-11-21
PREDICT

A service handles 200 requests a second. A canary takes 1% of traffic. After ten minutes it shows zero errors and a clean latency graph. What have you shown?

This chapter is the SRE’s half of controlled rollout: the policy that decides how every change reaches production, and the controller that enforces it. The QA chapters cover the other half. Release management and sign-off covers go/no-go criteria, testing a flag in both states and verifying that a rollback works, and testing in production covers designing the canary experiment, its baseline and its abort criteria. Neither is repeated here. The question for the SRE is different: across every team and every route to production, what are the stages, how long does each last, what stops a rollout, and what happens with nobody watching at 03:00? The artefact is a rollout policy that answers all four.

Deploy is not release, and the policy owns the gap

Progressive delivery rests on one separation. Deploying puts new code on machines. Releasing exposes it to users. Between the two you can put as many stages as the risk justifies, and at each one you can stop and go back. The Google SRE Workbook defines a canary as a partial, time-limited deployment of a change and its evaluation. The word that matters is evaluation. A rollout that moves through 1%, 10% and 100% on a timer is a slow deploy, not a canary.

Two levers do the separating, and an SRE needs both. Traffic weighting sends a share of requests to the new version, using a load balancer, a service mesh or a rollout controller. Feature flags keep new behaviour off inside code that is already deployed, and turn it on for chosen cohorts. Weight the build, flag the behaviour; most real changes need both.

Before you choose a mechanism, list the routes. The pipeline chapter makes the point that any route to production without a partial step is one where a single mistake reaches everyone. Application code is the route most teams staged first. Configuration, policy data, flag values, certificates and data fixes are the routes that cause the surprises, as the incident above shows. A rollout policy that covers only the application build leaves the rest to habit.

The rollout ladder

A stage is a share of exposure, a question it answers and a gate to the next one. Write the question down; it stops stages being added out of ritual.

Stage Who sees the change The question it answers Typical gate
Deployed dark Nobody; synthetic and internal sends only Does it start, pass health checks and run on production config? Health checks, a smoke test
Canary slice A small share of real traffic, such as 1% Does anything break at all under real inputs? Sample and time floors met, signals within bounds
Wider waves 5%, then 25% Does it hold up across segments, and does load on dependencies stay sane? The same signals, over a longer window
Full release Everyone Is anything visible only at full scale or over a daily cycle? Bake period, with the old version still warm

The numbers are a starting point; yours will differ. Two features matter more than the percentages. First, the old version stays running until the bake period ends, so that rollback is moving traffic, not redeploying. Second, the last step is the dangerous one. Whatever was shown at 25% was shown on a quarter of the load; full scale is where connection pools, caches and shared dependencies first see everything, which is why the bake period exists.

How long is long enough

The usual stage length is whatever the pipeline defaults to, often ten minutes. Ten minutes is a unit of time, and the evidence you need is a unit of events. Use two floors and require both.

The sample floor. Zero failures in n events does not mean the failure rate is zero. The rule of three says that the true rate is probably below 3 divided by n, at about 95% confidence. Turn it around to size a stage: to rule out a failure rate of p, you need roughly 3 divided by p events. To rule out a rate above 0.1%, the allowance of a 99.9% SLO, you need about 3,000 events. This is a rule of thumb, and it is only as good as the independence of the events. It makes a point that a calendar cannot: at night, ten minutes at 1% is a handful of events and proves nothing.

The time floor. Some faults need time, not events. Four reasons recur:

  • Signal lag. If the signal that detects the fault arrives late, such as a delivery report, a settlement file or a reconciliation, the stage must outlast the lag, or you promote before the evidence exists.
  • Slow faults. Memory leaks, queue growth, retry storms, connection pool exhaustion and certificate or token expiry take tens of minutes or hours to show.
  • Cycles. A job that runs at the top of the hour, a daily peak, month-end load. A stage that never contains the event cannot see its fault.
  • Cohorts. Some paths carry little traffic. If a route carries 2% of requests, a 1% random canary sends it 0.02% of traffic. Ten minutes at 200 requests a second gives that route about 24 requests, which proves nothing about it. A bigger share makes the blast radius ten times larger to fix a sampling problem. The better fix is to choose the cohort: send all of that route’s traffic, or a named set of customers, to the new version first, and put the sample floor on that cohort.

Promote when both floors are met, not when either is. A stage can finish early on the count and be too short, or finish on time with too few events. The controller should wait for the slower of the two, and when traffic is thin it should wait longer, not promote.

Which signals decide

The design of canary metrics is covered in the testing in production chapter: compare the canary with a control running the old version at the same time, and pick metrics a broken change would move. Three points belong to the SRE.

Use the same SLIs as the SLO. A canary that watches CPU while the SLO is about request success has two definitions of healthy. The SLOs chapter shows how to choose SLIs users would notice; the canary’s job is to ask whether the new version is spending the budget faster than the old one.

Add guardrail signals for what the SLI cannot see: saturation of a dependency, queue depth, error rates on callers. A change can keep its own metrics clean while damaging the service next door.

Check for success that is wrong: a request that returns 200 and does the wrong thing, such as a message delivered twice. The testing in production chapter explains the correctness signal; the policy must name one for the worst failure you fear, or a rollback rule cannot be trusted.

Sizing stages from the error budget

The usual way to choose stage sizes is habit. A better way is to ask what a bad version can cost before the system stops it. That is exposure:

exposure = share of traffic × peak rate × time to detect and roll back

The time is detection (the number of consecutive evaluations the rule needs, times the evaluation interval) plus the rollback itself, which you measure in rehearsal. Compare the result with the error budget in the same units. A generic service with 100 requests a second at peak, a 99.9% SLO and 100 million requests in the 28-day window has a budget of 100,000 bad requests. Assume a total failure of the new version and 150 seconds from first bad request to traffic restored:

Stage Traffic to new version at peak Bad requests in 150 s Share of the 28-day budget
1% 1 a second 150 0.15%
5% 5 a second 750 0.75%
25% 25 a second 3,750 3.75%
100% 100 a second 15,000 15%

As a rule of thumb, choose stage sizes so that each stage before the last stays under a fraction of the budget you state in the policy, such as 10%. If a stage is over, you have three levers: a smaller stage, an extra stage, or faster detection. The last row shows what the arithmetic is for: no stage plan makes a total failure at full scale cheap. What limits that risk is the evidence gathered at the earlier stages, and a rollback that takes seconds because the old version is still warm. The SLO policy has a rule that one incident spending more than 20% of the budget earns a postmortem; this table shows how close a careless full rollout comes.

Automatic rollback

A person notices a failing canary in minutes if they are looking, and in an hour if it is night. A controller notices on the next evaluation. For the clear cases, automate the rollback. For the unclear cases, a person decides. The rule needs five parts.

  1. A signal, a threshold and a minimum sample, measured on the canary and compared with the control, as the testing chapter sets out for abort criteria. Fewer events than the floor give no verdict.
  2. A rollback that is rehearsed. The measured time to stop is the number in the exposure formula below.
  3. Consecutive breaches. One bad evaluation window is noise, and a rule that fires on noise rolls back good releases, until people learn to override it. Requiring two or three in a row trades a little speed for a verdict you can trust. This is the same trade as burn-rate alerting, covered in burn-rate alerts.
  4. Three outcomes, not two. Pass, fail and inconclusive. Inconclusive means too few events, or a metric provider that is not answering. It holds the rollout and tells a person; it never promotes. Argo Rollouts models this explicitly: an analysis run ends as successful, failed or inconclusive, and a failed background analysis aborts the rollout, and sets the canary weight back to zero, while an inconclusive result pauses it. It also lets analysis wait until the metric provider has had time to collect data on the canary.
  5. An action that is fast and boring. Shift traffic back to the old version, which is still running, page the owner, and block the same change from restarting without a human. Do not retry automatically.

The release chapter covers verifying a rollback, why the old version must survive the new version’s data, and listing what rollback cannot undo; the pipeline chapter does the same for infrastructure. The policy adds three things.

A compensating action per irreversible effect. Rollback stops further harm and repairs nothing. For each effect that has left the system, the policy names the action and who runs it.

A human-gated path where rollback is wrong. A change that is not reversible, such as a migration the old version cannot read, skips automatic rollback and goes to a person.

An override in both directions. On-call can force a rollback without waiting for a threshold, and hold a rollout at a stage while they investigate.

Rehearse the controller itself: break a canary on purpose in a quiet hour and confirm the rule fires and the time to stop matches the number in the policy. The chapter on chaos and resilience testing covers running such experiments.

Flags as the second lever

A kill switch is the fastest rollback you have: flipping a flag changes behaviour in seconds with no deploy. Pete Hodgson’s article on feature toggles names four categories: release, experiment, ops and permissioning toggles. Release toggles hide unfinished work and are transitional. Ops toggles give operators runtime control of behaviour; most are short-lived, though he notes that a few long-lived kill switches are common. The SRE owns the ops kind, and treats it like a production control.

  • Every risky behaviour gets a kill switch before the first stage, and the policy states how long a flip takes to reach every instance. Measure it; a flag service with a five-minute cache has a five-minute rollback.
  • Flags have an owner and an expiry. Hodgson’s article is clear that toggles accumulate and carry a cost. A release flag with no removal date becomes a permanent branch that nobody tests.
  • The flag service is a production dependency. Decide what the code does when it cannot reach the service: a safe default per flag, written down, not whatever the SDK chooses.
  • Flag changes go through the same policy. Turning a flag from 5% to 100% is a release. Give it stages and a signal like any other, or it becomes the unstaged route.

The policy itself: classes, owners and exceptions

One policy cannot fit a copy change and a payment route. Put changes in classes by what a failure would cost, and give each class its own stages.

Class Typical changes Stages and floors Rollback
Standard UI text, internal tools, reversible config Two stages; short time floor Automatic
Elevated Core request path, retries, routing, anything touching a shared dependency Four stages; sample and time floors; start only in staffed hours Automatic, owner paged
Critical Money or irreversible effects, schema changes, identity Four or more stages; cohort first; a named human approves each promotion Automatic abort, human decides the rest

Three more decisions belong in the policy. Who owns it: the SRE team writes and maintains it, product teams choose the class for a change with a short checklist, and a disputed class goes to a named person. The fast path: for an active incident, a change may skip stages with the approval of the on-call lead, logged, and reviewed within two working days. The infrastructure chapter’s rule applies, that fast paths are legitimate and should be named, narrow and rare. Gating on the budget: when a service’s budget is spent, the pipeline refuses Elevated and Critical promotions, as the error-budget policy in the SLOs chapter describes.

Where practitioners disagree

Fully automatic or human-gated promotion. Automatic promotion removes waiting and the person who forgets. Human gates add judgement and slow everything. A common compromise is automatic promotion for Standard and Elevated and a human gate only for Critical.

Canary or blue-green. A blue-green deploy flips everything at once with a fast way back and tests nothing on real traffic along the way. A canary tests with real traffic and costs a longer rollout. They combine: a blue-green environment is a convenient stable target, and a canary happens in front of it.

Statistics or thresholds. Some teams run statistical comparison of canary and control. Others use fixed thresholds with a minimum sample. Statistical tests catch small shifts and need more events and tuning; thresholds are easy to explain and to audit. Pick the one your on-call can reason about at 03:00.

Day to day

With every rollout. You do not watch most of them. The controller does, and you read the verdict. An aborted rollout pages the owning team and tells you; you check that the cause was the change and not the metric provider.

Weekly, in the delivery review. Thirty minutes with the platform team: rollouts aborted, rollouts held as inconclusive and why, rollouts that took the fast path, stages that took longest. A stage that is inconclusive every night means the floors are wrong for night traffic.

Monthly. You review the flag inventory with the owners: flags past expiry, flags with no owner, how long a flip takes to propagate. You rehearse one rollback and one kill switch in a quiet window and compare the timing with the policy.

Quarterly. You re-inventory the routes to production, because new ones appear. You recompute exposure per stage against current peak traffic and budget, since volume grows and a stage that was safe last year may not be. You review the class of every critical service with its team, and you retire any stage that has not caught anything and does not answer a question.

After an incident that a change triggered. You ask which stage should have caught it, which signal should have moved and whether the floors were met. The postmortem result is a policy edit, not a reminder to be careful. The production readiness review is the other meeting where this policy gets read: a new service should arrive with its class, its signals and its kill switches already chosen.

BY ORG SIZE
STARTUPunder 30 people

There is no controller and there should not be. Use the platform’s rolling update with health checks, deploy to one instance first, and look at the error graph before the rest. Put risky behaviour behind a flag from a hosted service so that you can turn it off without a deploy. Write the policy as a five-line checklist in the repository: what you look at, for how long, and who turns it off. The failure to avoid is staging the application and pushing configuration straight to everyone.

SCALE-UP30 to 300

Several teams ship daily and one team’s bad change reaches another’s customers. This is where the written policy and a rollout controller pay for themselves. Choose one tool, such as Argo Rollouts, Flagger or the cloud’s own, define two or three classes, and wire the metrics to the SLIs you already have. Get product teams to choose the class for each change. Expect to rewrite the floors once real night and weekend traffic shows which stages never finish.

ENTERPRISE300 and up

Several pipelines, several clouds and a change advisory board all exist. The work is consistency and permission. Publish the policy as code, so that classes, floors and rollback rules are enforced by the platform and not remembered. Negotiate with change management so that a change which passes the policy’s gates and carries its automatic record counts as a standard change. Teams with their own tooling will ask for exceptions; give them a standard to meet rather than a tool to adopt.

ARTEFACT Write the rollout policy ~90 MIN
YOU PRODUCERollout policy with stages, sample floors and automatic rollback rules

Template

# Rollout policy: <service or company>
Author · Date · Status · Reviewers: product teams, security, on-call, change management (if any)

## 1. Scope and routes
Covered routes: <application, config, flags, policy data, migrations, certificates>
Not covered, and why: <list>

## 2. Classes
| Class | What belongs in it | Who chooses | Stages used |
|---|---|---|---|

## 3. Stages
| Class | Stage | Share | Min sample | Min time | Who or what promotes |
|---|---|---|---|---|---|
Sample floor derived from: <failure rate to rule out> → 3 ÷ p = <events>
Time floor derived from: <signal lag, slow faults, cycles, small cohorts>
Old version stays running until: <end of bake>

## 4. Signals and rollback rules
| Signal (canary vs control) | Threshold | Min sample | Consecutive breaches | Verdict | Action |
|---|---|---|---|---|---|
Inconclusive means: <hold, page whom, after how long>
Rollback mechanism and measured time to stop: <traffic shift or flag; rehearsed on a date>

## 5. Exposure
Peak rate · Budget in bad requests per window · Ceiling per stage: <share of budget>
| Stage | Share × peak rate × time to stop | Bad requests | Share of budget |
|---|---|---|---|

## 6. Flags
Kill switches: <behaviour, owner, propagation time, safe default if the flag service is down>
Expiry rule for release flags: <days>

## 7. What rollback cannot undo
| Effect | Compensating action | Owner |
|---|---|---|

## 8. Fast path and exemptions
Fast path: <who approves, what it may skip, how it is logged, review within N days>
Exemptions: <named, with expiry>
Budget gate: <what is refused when the budget is spent>

## 9. Review
<What you count each quarter, and who reads it>
WORKED EXAMPLE

Wrenpost is a messaging API company in Lagos: about 180 staff, 55 engineers in seven teams, about 2,400 business customers sending SMS through one HTTP API and receiving delivery reports by webhook. Wrenpost also sends the OTPs for Owoleaf’s wallet and Northmere Bank’s customers. Uchechukwu, an SRE, wrote this policy for Routing, the eight-engineer team that owns the carrier integrations and the oldest code. Ekemini, Routing’s tech lead, reviewed it. Traffic numbers below are illustrative: 500 messages a second at peak, 8 million a day, and an SLO of 99.9% of messages handed to a carrier within 10 seconds over 28 days. The budget is 8,000,000 × 28 × 0.001 = 224,000 late or failed messages.

Classes. Routing changes are Elevated: they touch the carrier path and can carry OTPs. Config-only changes to dashboards are Standard.

Stages. 1%, 5%, 25%, then 100% with a 60-minute bake while the old version stays running. Sample floor at 1% is 3,000 messages, which rules out a failure rate above 0.1% at about 95% confidence. At 5% it is 6,000, ruling out 0.05%. Time floors: 20 minutes at 1% and 5%, 30 at 25%. The 20 minutes covers a delivery-report lag of about 10 minutes at the 95th percentile. At peak, 1% is 5 messages a second, so 20 minutes gives 6,000; at 03:00 it would give far fewer, so Elevated rollouts start between 09:00 and 15:00 Lagos time, Monday to Thursday.

Signals. Carrier handoff failures on the canary more than 0.5 percentage points above the control, over at least 1,000 messages. p99 handoff time over 1.5 times the control. Duplicate delivery-report webhooks more than 2 per 10,000 above the control, over at least 2,000 webhooks. Each needs two consecutive one-minute breaches. Inconclusive holds the rollout and pages the Routing on-call after 30 minutes.

Rollback. Two evaluations plus a 30-second traffic shift: 150 seconds, rehearsed on 12 October. Exposure at peak: 1% is 750 messages (0.33% of budget), 5% is 3,750 (1.7%), 25% is 18,750 (8.4%), all under the 10% ceiling. A total failure at 100% would be 75,000, or 33.5%; the policy accepts that only after the earlier stages and the bake.

Cannot undo. Messages already handed to carriers, including OTPs; duplicate webhooks already delivered. Support gets the list of affected customers within an hour.

Fast path. Incident fixes may start at 25% with the on-call lead’s approval, logged, reviewed within two working days.

Now you

You are the SRE for Wrenpost’s Delivery Reports team: eight engineers who own the webhooks that tell customers what happened to each message. The team wants to change how webhook retries are scheduled. Delivery reports arrive up to 10 minutes after a send, customers’ endpoints are slow or down about 3% of the time (illustrative), and the retry queue is shared with Routing, whose tech lead, Ekemini, is worried about queue growth. The worst failure is a duplicate webhook, which returns success and fools the error rate. Wrenpost had a duplicate-webhook incident on 14 September 2026 affecting 212 customers for 47 minutes. Rollback cannot recall a webhook already delivered. The pipeline today is ten minutes at 1%, then everyone. Use illustrative peak and budget numbers and say they are. Write the rollout policy for this change: its class, stages and floors, signals, exposure per stage, and what rollback cannot undo.

Self-check

DECIDE

You are Uchechukwu, an SRE at Wrenpost. Ekemini, tech lead of the Routing team, is changing how messages fall back between carriers. The pipeline default is ten minutes at 1%, then everyone, and the dashboard has been clean for ten minutes. The smallest carrier route carries about 2% of traffic (illustrative), and the fallback change matters most there. At 500 messages a second at peak, 1% of traffic gives that route roughly 0.1 messages a second. Rollback is automatic and takes about 30 seconds. The Routing team asks to promote. What do you decide?

READING
  1. HANDBOOK
    Canarying Releases (SRE Workbook, chapter 16) Google SRE, 2018

    The definition of a canary, how to choose metrics and size the canary, and the framing of a canary process as one that catches bad releases and clears good ones. The core reading for the policy in this chapter.

  2. POST
    Feature Toggles (aka Feature Flags) Pete Hodgson

    The vocabulary for release, experiment, ops and permissioning toggles, and why toggles carry a cost that grows if you do not remove them. Read it before writing the flag section of your policy.

  3. DOC
    Analysis and Progressive Delivery (Argo Rollouts) Argo Project

    How a rollout controller models analysis: background and inline runs, successful, failed and inconclusive outcomes, and what a failure does to the rollout. Useful even if you choose another tool, because the model is the one in this chapter.

  4. POST
    Automating safe, hands-off deployments Clare Liguori, 2020

    Amazon's account of pipelines that test, stage, monitor and roll back changes without human intervention. Read it as a second company's answer to the same questions.

  5. DOC
    Incident report: Google Cloud Service Control, 12 June 2025 Google Cloud, 2025

    A public report on a change that bypassed staged rollout. Read it while listing your own routes to production, and note what the report says a flag would have changed.

  6. HANDBOOK
    Release Engineering (SRE book, chapter 8) Dinah McNutt, 2016

    Google's release engineering principles, including self-service releases and the idea that teams must be self-sufficient. The background for why a policy beats a gatekeeper.

All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.

RECALL CARDS Tap to flip. They join your review deck when you mark the lesson complete.
NEXT: Platform as a product →