Scrivio Interview library
DebuggingIntermediate6 min read · updated 13 November 2026

A pipeline sends 1 percent of traffic to a canary for 10 minutes and promotes it automatically if its error rate and p99 latency are within 10 percent of the fleet's. A release passed and reached all regions; two hours later a large enterprise tenant reported that every invoice export failed.

Why did the canary not catch this, and how would you improve the canary process without making every release take a day?

The canary saw almost no invoice exports: at 1 percent of traffic for 10 minutes, a path that runs a few hundred times an hour gets perhaps one request or none, and even total failure of that path cannot move the service's overall error rate. We improve it by comparing per endpoint and per important tenant against a same-sized baseline started at the same time, using statistics suited to small counts, driving rare critical paths with synthetic checks, and baking longer in one region or cell before going global, with a fast rollback behind it.

Why this question is asked

A canary is a small group of servers that gets the new version first, so a bad release hurts a few users instead of all of them. Many teams automate the decision to promote a canary and then trust it completely. Interviewers ask this question to see whether we understand what a canary can and cannot detect, which comes down to how many requests it sees and how its metrics are compared. In this answer, we will work out why this canary was blind, then fix the comparison, the coverage of rare paths and the rollout shape, while keeping releases fast.

1A Quick Recap of How the Canary Decides

In this pipeline, 1 percent of traffic goes to the canary for 10 minutes. The pipeline then compares two numbers, the canary's error rate and p99 latency, with the same numbers for the whole fleet. If both are within 10 percent, the release is promoted to everyone.

That rule works well for problems that affect most requests, such as a crash on start, a broken common endpoint or a slow database query on the main path. It is weak for problems that affect a small, specific slice of traffic, and invoice exports for one enterprise tenant are exactly that kind of slice.

2Counting the Requests the Canary Actually Saw

Suppose invoice exports run 300 times an hour across the whole platform. In 10 minutes that is 50 exports. The canary gets 1 percent of them, so the expected number of exports it served is 0.5. Most of the time it served none; sometimes one. And if the broken export only affects one tenant's large invoices, the expected count is far below one.

Now look at the aggregate. Suppose the service handles 2,000 requests per second, so the canary handled about 12,000 requests in 10 minutes. Even if one export failed, the canary's error rate rose by 1 in 12,000, which is nothing next to normal noise. So the canary could not have caught this bug no matter how carefully the threshold was tuned. The failure was invisible both because it was rare and because it was averaged away.

What the canary saw in 10 minutes
TrafficFleet per 10 minCanary (1 percent)
All requests (2,000 per second)1,200,000about 12,000
Invoice exports (300 per hour)50about 0.5
Exports for the affected tenanta fewalmost certainly 0

3Fix 1: Compare Slices, Not Just the Whole

The first change is to compare the canary per endpoint and per important tenant or customer tier, not only for the service as a whole. A failure that is 100 percent of export requests is huge in the export slice even when it is invisible in the total. Our metrics usually already carry an endpoint tag, so this is mostly a change in the analysis queries; for tenants we tag at least the top customers and each tier.

The second change is to compare against the right thing. Comparing against the whole fleet mixes in pods that have been warm for days, that run on older nodes, or that serve a different mix. A better practice is to start a baseline group of the same size as the canary, running the old version, at the same moment. Then the only difference between the two groups is the version. Tools such as Kayenta in Spinnaker, Argo Rollouts analysis or Flagger can run this canary-versus-baseline comparison.

With small numbers, the test must suit small counts. If the canary served 4 exports and 2 failed, a percentage threshold says 50 percent errors, but is it real? A test for count data, such as a Fisher exact test or a Mann-Whitney test on latency, tells us whether the difference is likely to be real, and lets us require a minimum number of samples before a slice is judged at all.

4Fix 2: Exercise Rare Paths With Synthetic Checks

Organic traffic will never cover a path that runs a few times an hour. So we generate the traffic ourselves. A synthetic check is a scripted request that runs against the canary on purpose: export an invoice for a test tenant set up like a large enterprise customer, run the month-end job against a sample, call the admin features. These run in the first minutes of every canary, and any failure blocks promotion.

The list of synthetic checks comes from the critical but rare paths: features that big customers depend on, scheduled jobs, administrative actions and anything with special data such as very large documents. After this incident, invoice export for large tenants goes on the list, and the post-incident review should ask what else is in the same category.

Step throughCanary analysis after the changes
  1. Start canary and same-size baselinesame time, same traffic share
  2. Run synthetic checks on rare pathsexports, month-end jobs, admin
  3. Any synthetic check failed?
    YesStop and roll backNoCompare metrics
  4. Compare per endpoint and per key tenanttests suited to small counts
  5. Significant regression in any slice?
    YesStop and roll backNoPromote to the next wave

5 steps in order. Play them, or step through them one at a time.

5Fix 3: Lengthen Exposure Where It Counts Without Slowing Everything

Some problems only appear after hours, or only for traffic that comes at certain times. Making every canary run a day would make releases painfully slow. Instead we shape the rollout: after the short canary, the release goes to one region or one cell, a cell being an isolated slice of the platform with its own copies of the services, and bakes there for a few hours with full traffic before reaching the rest. Real users in that cell, including some enterprise tenants, now exercise the rare paths at full rate.

Then the remaining regions follow in waves. Because the pipeline is automated, a rollout of a few hours costs no engineer time, and a bug like this one would have affected one cell instead of everyone. Finally we keep the safety net: a rollback that takes minutes, or a flag to turn the change off, so that anything that still slips through stays small.

6Follow-up questions

How would you route a chosen tenant's traffic to the canary on purpose?

Route by a header or a tenant attribute at the gateway or in the service mesh. The gateway reads the tenant id from the token or request, and a routing rule sends that tenant's requests to the canary subset, for example an Istio VirtualService that matches a header and points to the canary subset. We would do this with internal test tenants and, with agreement, with friendly customers who want new features early, and keep everyone else on the stable version.

Why not simply send 10 percent to the canary instead of 1 percent?

It helps with counts, but it exposes ten times as many users to a bad release, and it still averages away slice failures. Ten percent of 0.5 exports is still only 5 exports in 10 minutes. The cheaper fixes are slice-level comparison and synthetic checks, which target the rare paths directly without increasing the blast radius.

Should business metrics be part of canary analysis?

Yes where they exist at a useful rate, such as orders per minute or successful payments. They catch problems where the code returns 200 but does the wrong thing. For rare actions like exports, a synthetic check that verifies the result is more reliable than waiting for business metrics to move.

7Conclusion

In this answer, we saw that the canary missed the export bug because it saw almost no exports: 1 percent for 10 minutes gives a rare path fewer than one request, and a slice failure cannot move an aggregate error rate. We improved the process by comparing per endpoint and per key tenant against a same-sized baseline with tests suited to small counts, by driving rare critical paths with synthetic checks, and by baking longer in one region or cell before going global, with fast rollback kept as the safety net.

What to say in the interviewAbout 80 seconds aloud

Open with

The canary could not have caught it, because it barely saw an invoice export. If exports run a few hundred times an hour, 1 percent of traffic for 10 minutes gives the canary maybe half a request on that path, and even if one failed it would not move the overall error rate of tens of thousands of requests.

Then, if they want more

Aggregates hide failures concentrated in one endpoint or tenant. So I would change three things.

First, the analysis: compare the canary against a baseline group of the same size started at the same time, not against the whole fleet, and compare per endpoint and per important tenant or tier, using statistical tests that work with small counts and requiring a minimum sample.

Second, coverage: run synthetic checks against the canary for critical but rare paths, such as exports for a large test tenant, month-end jobs and admin features, and block promotion if they fail. Third, the rollout shape: after the short canary, bake for a few hours in one cell or region with full traffic before going to the rest in waves.

Automated, that costs no engineer time, and fast rollback keeps anything we still miss small.

About this answer

Last updated
13 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Why did the canary not catch this, and how would you improve the canary process without...": https://scrivio-interview-library.netlify.app/architecture/high-availability/7cf634dd8c/