By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
Step 25 taught the mechanics of a canary: send a slice of traffic to the new version, watch guardrails, ramp or roll back. By now the mechanics are the easy part. The hard part is that a canary without a pre-registered decision becomes a debate after the fact: someone saw a better number, someone else saw a worse slice, and no one agreed in advance what would count as a stopping condition.
Experiment design is how you keep the canary honest. Write the hypothesis and the decision rule before the first request moves. Assign cohorts with a stable key. Put hard guardrails ahead of the quality average. Define what evidence would make you stop, extend, promote or roll back, and record the decision with the evidence that produced it.
The one-page plan has eight fields: hypothesis, primary metric, hard guardrails, cohort key, minimum volume and window, expected effect or the smallest change worth acting on, stopping rules, and the named decision owner. If the team cannot fill in the "smallest change worth acting on" field, the experiment cannot produce a decision and is really a staged rollout with extra statistics.
"Five percent of requests" is not an experiment on its own. If the assignment is random per request, the same customer sees both arms, spend is split across manifests, and a complaint cannot be traced to the version that caused it. A percentage is the size of the exposure, not the design of the comparison.
Assign at the tenant boundary with a salted hash: bucket = hash(tenant_id + experiment_salt) % 100. Every request for that tenant stays in the same arm, the assignment is reproducible without a lookup table, and the salt keeps the same tenant from landing in the same relative position across unrelated experiments. Do not hash the raw tenant identifier into anything that leaves the service; the salted hash is the key, not the customer name.
Exclusions are part of the design. Tenants in an open incident, under a legal hold or in their first week of onboarding do not belong in a quality comparison. Write them down before launch, because an exclusion invented after the result is indistinguishable from excluding an inconvenient result.
Guardrails are stop conditions, not metrics to average. A canary can be significantly better on quality and still be halted by a single safety event; that is the design working, not an overreaction. The inverse is the dangerous case: a guardrail averaged away by a good week is how a release ships with a known authority defect.
A canary small enough to be safe is usually too small to detect a subtle quality regression. That is not a reason to skip evaluation; it is a reason to use the right instrument: the offline eval on the pinned golden set measures quality, and the canary measures operational guardrails on real traffic. Report the uncertainty plainly instead of implying that "no significant difference" means "no difference".
Compare like with like. Match the hours, weekdays and shift patterns of the control window; a canary that runs through a quiet weekend against a busy weekday control is measuring the calendar. Watch for contamination — shared caches, a shared retrieval index, or a customer who appears in both arms through a partner account — and note it in the result rather than discovering it after promotion.
Key takeaways
A canary is an experiment: write the hypothesis, primary metric, hard guardrails, minimum volume, stopping rules and decision owner before traffic moves.
Assign at a stable salted tenant key so each tenant stays in one arm, and document exclusions before launch.
Guardrails are stop conditions before they are metrics; one safety event halts a canary regardless of the quality average.
A safe canary is usually too small to prove quality: pair it with the offline eval, report uncertainty and compare like windows.
Every run ends in promote, extend, rollback or stop, recorded with its evidence and fed into the weekly review.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.