After this lesson you can define a canary decision, compute its observation budget and explain which effects a rollback can and cannot reverse.
Hypothetical scenario. Priya reviews Northwind’s supported answers while Dev checks the action boundary and Sam tests the recovery decision.
A deployment changes a contract between components
A deployment makes a new application configuration serve work. The configuration includes executable artifacts, schema expectations, model and prompt versions, tool permissions and the interpretation of stored state. Northwind can keep the same URL while changing a response in a way that breaks its consumer. Reachability and compatibility are therefore separate release conditions.
A canary exposes a bounded population to a candidate while a baseline remains available for comparison. Its purpose is to collect decision evidence before wider exposure. A rollout percentage describes the exposure limit; it does not establish that the selected requests represent the workload or that enough observations have arrived to make the next decision.
Rollback directs future handling back to an earlier compatible release. It cannot unsend a customer message or erase a payment already committed at a provider. Those effects need recorded identities and their own recovery. Treating a release switch as an undo button confuses control of future requests with reversal of external history.
Why a successful health check is insufficient
A health endpoint can remain green while the assistant returns an unsupported exception or a malformed action. Choose checks from the user journey. For Northwind, a supported current policy, parseable structure and authorized tool proposal are part of a useful result. A low HTTP error rate says little about those semantic requirements.
The obvious response is to run every test against every release and then deploy everything at once. That improves pre-release evidence, but a finite test set still misses workload differences and serving-environment failures. A bounded release adds another observation point. It is especially useful when the possible consequence justifies limiting exposure while real traffic supplies missing evidence.
Define the release unit before comparing it. If Dev changes the prompt, model and schema together, that combined candidate can be evaluated, but a regression cannot automatically be attributed to the model. The manifest should identify each dependency so the team can reproduce the relevant configuration and choose a compatible recovery set.
Expand and contract a schema over separate releases
Suppose a new consumer expects a policy revision field that old records lack. An expand step first makes readers accept both forms and adds the field without removing the old path. Writers can then populate it while a backfill updates older records. A later contract step removes the obsolete representation after every dependent reader and rollback configuration can tolerate that change.
This sequence preserves room for a rollback during the transition. Dropping a required column at the same moment a new binary begins using its replacement can make the previous binary unusable. Keeping an old executable artifact is not sufficient when its assumed data shape no longer exists. Record schema and data compatibility explicitly in the release manifest.
For a model-backed response, the same reasoning applies to parsers and tool schemas. A candidate can introduce a new optional field while consumers remain tolerant. A mandatory field or changed meaning needs a coordinated migration. Type-valid JSON with a different interpretation is still an incompatible contract change.
Derive the observation window from admitted work
Hypothetical worked example: Northwind receives 100 eligible requests per second and routes 5% to a canary. Candidate traffic is 100 × 0.05 = 5 requests per second. Over a chosen 10-minute observation window, 10 × 60 = 600 seconds, so the expected candidate population is 5 × 600 = 3,000 requests when the rate and routing share remain constant.
Assume a deliberately chosen stop rule: halt expansion if more than 1% of that completed cohort has a parser failure. One percent of 3,000 is 30. A count above 30 triggers the rule; exactly 30 does not under this wording. This is an illustrative operational threshold, not a statistical claim or a recommended universal error budget.
Compare the baseline on the same task categories and time interval. A sale changes the input mix, so yesterday’s average is a weak control. Track the denominator for each slice, including abstentions and rejected work. Waiting for 3,000 completions also differs from waiting ten minutes if some requests are still queued or unresolved.
The canary needs a minimum-information condition as well as a maximum-exposure condition. A rare permission failure can matter before enough ordinary requests accumulate to estimate an average. Northwind should stop immediately on a confirmed forbidden disclosure rather than let a numerical aggregate excuse it until the observation window closes.
Keep shadow traffic from duplicating effects
A shadow receives eligible input and produces a candidate result without becoming the source of business actions. It helps compare answers, schemas and latency under a realistic input population. Disable consequential writes in the shadow path. A second refund is not an acceptable price for a more realistic comparison.
Preserve the evidence revision and task identity for each paired comparison. If the baseline saw yesterday’s policy while the candidate saw today’s, the result confounds source freshness with model behavior. A comparison record should identify the prompt, selected passages, permissions and configuration without copying unnecessary private content into broadly accessible logs.
A human reviewer can inspect disagreements, but the review queue needs ownership and a spending limit. If every disagreement sits indefinitely, the release decision has merely moved into an unbounded backlog. Decide which differences block expansion, which require investigation and which are acceptable wording changes before the first canary cohort begins.
In the wild: a bounded command can still have broad dependencies
Amazon’s public account of the February 2017 S3 disruption describes a command intended to remove a small number of servers that removed a larger set than intended. The report explains recovery dependencies and subsequent safeguards. This is a real published incident; it is not a claim about Northwind’s operations or a forecast of a similar outage.
The transferable issue is the relationship between operator intent and enforced scope. A release control should bound the actual population affected, not merely display a reassuring percentage beside a command. Validate scope, establish a stop path and understand which shared dependency can make an apparently small change affect unrelated traffic.
Google’s canarying guidance develops release comparisons and automation around observable signals. The mechanism is a decision process, not a certificate attached to a deployment tool. Northwind can use a small manually approved canary when it has low volume, provided the cohort, evidence and stop conditions remain explicit.
Regional failover needs its own acceptance test
A second region changes routing, data freshness, available capacity and sometimes dependency behavior. An endpoint that accepts a probe is not evidence that it can serve the entire workload. Derive the admitted rate and inspect replication lag before moving writes. Region count alone does not establish an availability claim.
For read-only policy answers, a stale replica can quote a superseded rule. For payments, two regions must not independently create effects for the same approved action. Keep the authoritative operation identity and fencing arrangement clear. A regional failover test should include recovery and reconciliation, not only the first successful response from the alternate location.
A rollback during regional recovery can be constrained by both data compatibility and capacity. If the previous region is still unavailable, reverting the binary there is not an immediate service-restoration option. Record which recovery actions remain executable under each failure condition rather than assuming every arrow in the diagram is always available.
Misconceptions that make a release look safer than it is
A small traffic percentage does not bound impact when the candidate writes shared state read by everyone. A saved old image does not prove a working rollback after an incompatible migration. An apparently clean error-rate graph does not prove that private evidence remained private. Each promise needs a measurement or an enforcement point that matches the consequence.
Another misconception is that a canary must eventually expand. A candidate can remain blocked or be discarded when the evidence does not support it. Returning to a known compatible configuration is a valid outcome. Preserve the failed candidate’s observations so the next release addresses the actual regression rather than repeating a slightly different guess.
Choose the release mechanism by reversibility
Use a direct small change when its scope is narrow, its consequences are understood and recovery is straightforward. Use shadowing and canaries when behavior depends on real input distribution or consequences justify bounded exposure. Use staged data migration when old and new components must coexist. The appropriate process follows the failure and recovery contract.
Northwind assigns Dev the manifest and compatibility checks, Priya the policy-support rubric and Sam the rollout and stop controls. An expansion requires all three views to agree. This keeps a fast technically successful deployment from overriding a product-level failure that another owner can already demonstrate.
After a rollback, review the failed cohort against the original manifest. Record which signal stopped expansion and whether the recovery preserved the expected customer state. That short decision record makes the next attempt a targeted repair rather than another unexamined deployment.
Limits of a green canary
A finite cohort cannot certify future traffic, and a quiet interval can miss a rare important task. A regional incident can also remove the baseline needed for a clean comparison. State those limits in the release decision, retain a usable compatible recovery configuration and continue monitoring the same acceptance conditions after expansion.
Check yourself: release decisions
A 5% canary receives 100 eligible requests/s for ten minutes. How many candidate requests are expected?
Five per second over 600 seconds gives 3,000, assuming the arrival rate and allocation stay constant. Count completed and unresolved work separately.
The old image exists, but its required column was dropped. Is rollback ready?
No. The artifact and stored-state contract are incompatible. Preserve an expand/contract transition or provide a separately evaluated recovery path.
The shadow proposes a refund. Should it execute to test realism?
No. Keep the comparison non-effecting; inspect the proposal against the actual authorization contract without creating another business action.
Northwind decision log
- Bind the release to a versioned configuration and acceptance rubric.
- Expand only while the canary’s evidence supports the contract.
- Keep schema-compatible recovery and action reconciliation separate.
Go deeper: releasing compatible changes
- Book chapter: The Site Reliability Workbook, Canarying Releases — Google SRE contributors. Read this source to inspect the mechanism and its operating assumptions described above.
- Book chapter: Software Engineering at Google, chapter 23: Continuous Delivery — Google engineering contributors. Read this source to inspect the mechanism and its operating assumptions described above.
- Video lecture: Distributed Systems 2.1: The two generals problem — Martin Kleppmann. Watch first to reason about incomplete observations and coordinated state.
- Primary documentation: Amazon S3 February 2017 disruption summary — Amazon. Read this source to inspect the mechanism and its operating assumptions described above.