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.
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.
Circuit Breaker
A circuit breaker stops calling a failing downstream service after a threshold of errors, preventing cascade failures. States: Closed (normal flow), Open (all calls fail-fast without attempting), Half-Open (limited test calls to check recovery). Prevents a slow/failing service from consuming all caller resources and propagating failure upstream.
Health Check
A health check is a periodic probe that determines whether a service instance is able to handle traffic. Load balancers, orchestrators (Kubernetes), and service meshes use health checks to route traffic only to healthy instances. Types: liveness (is the process alive?), readiness (can it serve requests?), and startup (has it finished initializing?).
Blue-Green Deployment
Blue-green deployment maintains two identical production environments. Traffic routes to 'blue' (current). New version deploys to 'green' (idle). After validation, traffic switches from blue to green instantly (DNS change or load balancer swap). Rollback is instant – switch back to blue. Doubles infrastructure cost during deployment.