What is the difference between Blue-Green, Canary, and Rolling deployments? When would you use each?
Three deployment strategies with different trade-offs in risk, cost, and complexity.
Blue-Green Deployment
Two identical environments: Blue (live) and Green (new version).
Deploy new version to Green, test, then flip traffic from Blue to Green at the load balancer.
Pros: instant rollback (flip back). Cons: 2× infrastructure cost.
Canary Deployment
Roll out new version to a small % of users first (e.g., 1% → 10% → 50% → 100%), monitoring metrics at each step.
Pros: real production signal at low blast radius; safe for risky changes.
Cons: requires advanced traffic routing (Istio, Linkerd, Argo Rollouts) and good observability.
Rolling Deployment
Replace pods/instances gradually one batch at a time. Default for Kubernetes Deployments.
Pros: no extra infra. Cons: slower rollback; mixed-version state during rollout.
Pick by: risk tolerance (Canary safest) → cost (Rolling cheapest) → rollback speed (Blue-Green fastest).
Frame your answer around blast radius and rollback speed. Blue-Green = full prod backup, instant rollback, double cost. Canary = gradual rollout, real-user signal, complex routing.
Rolling = simplest, slow rollback. Don't forget to mention monitoring as the gating mechanism.