The green canary that failed a small tenant
Failure story 24, in observability and recovery.
The challenge
Section titled “The challenge”The canary’s success rate never dropped below 99.9%, so the release rolled out to everyone. Why did one customer lose every request from the moment the canary started?
The setup
Section titled “The setup”| Assumption | Value |
|---|---|
| Product | A multi-tenant invoicing service with 300 business customers (tenants) |
| Canary | The new version gets 5% of traffic for one hour, about 20,000 requests |
| Gate | Promote if the canary’s success rate is at least 99.9% |
| The release | Removes support for a legacy invoice-numbering setting, which the team believed nobody used |
| Tenant T-19 | A small accounting firm that still uses the legacy setting. It sends about 160 requests an hour, so about 8 reach the canary |
What happened
Section titled “What happened”| Step | What happens |
|---|---|
| 1 | The canary starts. Requests from 299 tenants succeed as usual. |
| 2 | All 8 of T-19’s canary requests fail with invalid numbering configuration. |
| 3 | The canary also sees its usual background of about 10 unrelated failures. |
| 4 | Success rate: (20,000 − 18) ÷ 20,000 = 99.91%. The gate passes. |
| 5 | The release goes to 100% of traffic. T-19 can’t issue any invoices. |
| 6 | Two days later, T-19 phones support. They’d assumed the problem was their own. |
Why it went wrong
Section titled “Why it went wrong”An aggregate success rate weights every request equally, so it reflects the largest tenants’ experience. A tenant that sends 0.04% of the traffic can fail completely and move the aggregate by 0.04%, well inside the noise. The release didn’t degrade everyone a little; it broke one cohort entirely, and a global average is the wrong instrument for finding that.
Two designs
Section titled “Two designs”| Aspect | Design A: a global gate | Design B: cohort checks |
|---|---|---|
| Unit of judgment | All canary traffic | Each cohort: by tenant, and by configuration such as legacy numbering |
| Compared with | A fixed threshold | The same cohort on the current version, over the same hour |
| Reported for each cohort | Nothing | Requests (denominator), failures (numerator), failure rate, and the baseline’s rate |
| Too little traffic | Not considered | An explicit outcome: insufficient observations, which holds the rollout or sends test traffic for that cohort |
For this canary, the cohort view shows the problem at once:
| Cohort | Canary requests | Failures | Failure rate | Baseline | Verdict |
|---|---|---|---|---|---|
| All tenants | 20,000 | 18 | 0.09% | 0.05% | Pass |
| Legacy numbering (T-19) | 8 | 8 | 100% | 0.0% | Fail |
| Tenant T-201 | 3 | 0 | 0% | 0.0% | Insufficient observations |
Eight failures out of eight, against a baseline of almost zero, isn’t noise even with a tiny sample. Three successes out of three, on the other hand, proves very little, which is why insufficient observations has to be an outcome of its own rather than a pass.
The check
Section titled “The check”Replay the canary hour against both gates.
- Expected: Design B fails the rollout and names the affected cohort, with its numerator (8), denominator (8) and failure rate (100%).
- Expected: cohorts with too few requests are reported as insufficient observations, not as passing.
- Expected: Design A passes, which shows why it can’t be the only gate.
This check is in the checks catalog as test templates in Java and Python.
When the simpler design is enough
Section titled “When the simpler design is enough”- Tenants are homogeneous: same configuration, same features, similar volumes. Then the aggregate is a fair summary.
- The release touches no tenant-specific configuration or code path, and you can show that with the diff rather than believe it.
For educators
Section titled “For educators”Discussion question. The team believed nobody used the legacy setting. What evidence would have been better than belief, and where would it have come from?
Exercise. You check all 300 tenants as separate cohorts, each with a test that has a 1% chance of a false alarm. What happens to a typical rollout, and how do you fix it without going back to a single global gate?
Worked answer
With 300 independent checks at 1%, you’d expect about 3 false alarms per rollout, so nearly every rollout is blocked and the team learns to ignore the gate. Fixes, which combine: cohort by configuration and features, not by tenant, which turns 300 cohorts into a few dozen that each mean something; compare each cohort with its own baseline in the same window rather than a fixed threshold; adjust for the number of comparisons, for example by requiring a stronger result from each cohort when there are many; and treat extreme results as decisive, because 8 failures out of 8 against a near-zero baseline is overwhelming evidence even with a tiny sample. The aim is a gate that’s rarely wrong, so people keep trusting it.
Further reading
Section titled “Further reading”- Google’s SRE workbook on canarying releases (opens in a new tab).
Related pages
Section titled “Related pages”- Example Lending, ADR-012: roll out by channel behind feature flags
- The shadow test that missed the dangerous requests, on aggregates that hide the cases that matter
- Platform engineering
Written and edited by Abhinav Taduka, enterprise software architect.
New pages are added regularly. Follow Abhinav on LinkedIn to see them first.