Services

Resources

Company

Canary deployment

A canary deployment is a release strategy that sends a small share of real traffic to a new version while the rest stays on the current one. The team compares the canary's error rate and latency with the baseline. If the canary is healthy, traffic moves up in steps. If it is not, the release rolls back.

How it works

A typical plan shifts 5%, then 25%, then 50%, then 100% of traffic, holding each step for 10 to 30 minutes. At 2,000 requests per second, the 5% step sends 100 requests per second to the new version. If the canary shows 2% errors against a baseline of 0.1%, the rollout stops and all traffic returns to the old version. Rollout controllers or a service mesh can automate the steps and the analysis.

Why it matters in production

A bad release reaches a fraction of users instead of all of them, which protects the error budget. The canary needs enough traffic and a fair comparison, or noise hides real regressions. Both versions run at once, so database changes must work with both.

See also

On the One2N blog

Further reading

Comic about canary deployment: a new app version is about to reach all 100 users at once; instead a router sends 5 of 100 users to the new version and 95 to the old; the new version fails 20 times as often as the old 1 in 1,000, so it is rolled back with only 5 users hurt; a healthy release grows step by step from 5 to 25, 50 and 100 users.