The idea is simple: rather than risk every user at once, expose only a small share — one percent is enough for the new version to prove itself on real traffic. The name comes from mining practice: a canary was taken into the mine and warned of gas before people were.
How the release works
| Stage | Share of traffic | What to watch |
|---|---|---|
| Trial | 1–5% | error rate, latency, logs — any obvious failures |
| Observation | 5–25% | the same metrics over an hour or a day, compared with the old version |
| Widening | 25–100% | gradually move all traffic across, or roll back if things degrade |
Traffic is split by a router — a load balancer, an ingress controller or a service mesh: each request gets a random or rule-based chance of reaching the new version. Splitting need not go by shares: first send one region or one user group, then widen. If the metrics dip, the share is cut back to zero — rolling back amounts to reconfiguring the routing, and anyone not yet on the new version will not notice a thing.
Deciding on metrics
The heart of a canary release is not the rollout but the decision criterion. Metrics of the new and old versions are compared: the share of 5xx responses, p95 latency, memory use, conversion or another business indicator. The criterion is fixed in advance, for example “a 5xx share above 0.5% for ten minutes — roll back”.
steps: - setWeight: 5 - pause: {duration: 10m} - setWeight: 25 - pause: {duration: 1h} - setWeight: 50 - pause: {duration: 1h}The analysis can be automated: Argo Rollouts and Flagger compare Prometheus metrics at every step on their own and roll the version back once a threshold is exceeded. The release then runs without anyone on duty, and a human only investigates the rollbacks.
How it differs from other strategies
A canary release differs from blue-green deployment in the size of the risk: blue-green keeps two identical environments and switches all traffic at once, while a canary goes gradually, starting from a small share. From a rolling update in Kubernetes it differs in that traffic is split by version rather than by shares of pods, and the decision is made by metric analysis, not by a count of ready pods.
Martin Fowler described the canary release in his bliki in 2014, noting that the practice had long been in use by then. The same technique is also called a phased or incremental rollout; it is covered in detail in the book Continuous Delivery by Jez Humble and David Farley.
Sources
the term is written from these pagesVerified 9 Nov