Canary Deployment
Canary Deployment is a release strategy that routes a small fraction of traffic to a new version first, observes its behaviour against the old version, and gradually expands the new version's share if metrics stay healthy. The name comes from "canary in a coal mine": the small early group surfaces problems before the rest of the population is exposed.
How it works
- Deploy the new version alongside the existing one.
- Route a small percentage of traffic (1%, 5%) to the new version.
- Compare key metrics (error rate, latency, business KPIs) between the two cohorts.
- Gradually shift more traffic if healthy; roll back instantly if not.
- Once 100% is on the new version, retire the old.
Traffic routing options
- Random percentage. Hash request IDs to a bucket and route based on that.
- Sticky. Once a user lands on a version, keep them there for session consistency.
- Targeted. Internal employees first, then beta users, then a percentage of all users.
Common tools
- Argo Rollouts, Flagger, Istio, Linkerd, AWS App Mesh, LaunchDarkly (for feature-flag-driven canaries)
🔗