Skip to main content
networking

Canary Release

A canary release routes a small percentage of production traffic (1-10%) to the new version while the majority stays on the current version. If the canary shows elevated errors or latency, it is rolled back before affecting most users. Less infrastructure cost than blue-green but requires traffic splitting capability.

Definition

Canary releases progressively shift traffic from the old version to the new version while monitoring for regressions. The name comes from coal mine canaries – the small deployment detects problems before the full rollout. Typical progression: 1% traffic for 10 minutes (catch crashes), 10% for 30 minutes (catch performance issues), 50% for 1 hour (catch edge cases), then 100%. Automated canary analysis compares error rates, latency percentiles, and business metrics between canary and baseline – tools like Kayenta (Netflix/Spinnaker), Flagger (Kubernetes), and Argo Rollouts automate promotion/rollback decisions. Traffic splitting methods: weighted load balancer rules, Istio VirtualService weight, Kubernetes Ingress canary annotations, or CDN-level split (Cloudflare Workers). Canary releases require: observable differences between versions (version header, metric labels), defined success criteria, and automatic rollback on failure.

Examples

  • Istio: VirtualService weight: [{destination: v2, weight: 10}, {destination: v1, weight: 90}]
  • Argo Rollouts: steps: [{setWeight: 10}, {pause: {duration: 10m}}, {setWeight: 50}]
  • Nginx: split_clients $request_id $variant { 10% canary; * stable; }

Related Protocols

Related Terms