Canary deployment gradually shifts production traffic from the old version to the new version — starting with a small percentage (1-5%) and increasing as confidence grows. If metrics degrade, the rollout is automatically halted and rolled back.

How Canary Deployment Works

Named after canaries in coal mines. You deploy the new version alongside the old, route 5% of traffic to it, and monitor error rates, latency, and business metrics. If everything looks good, increase to 25%, then 50%, then 100%. If metrics dip, roll back automatically.

Key Concepts

  • Progressive Rollout — Gradually increasing traffic to the new version while monitoring for problems
  • Automated Rollback — Monitoring systems automatically revert to the old version if error rates exceed thresholds

Frequently Asked Questions

When should I use canary deployments?

For high-traffic applications where bugs in the new version could affect millions of users. Canary limits the blast radius of any issue to a small percentage of traffic.