Blue-green or canary? How do you choose for a specific service?
BeginnerScenarioDeployments and releases
Answer
Situation read → Both reduce risk; they trade cost and speed of switch against how gradually you get exposure.
What I'd do →
- Blue-green when: you need an instant, all-or-nothing switch and instant rollback, you can afford double capacity briefly, or the release must be verified as a whole (smoke tests on green before the switch).
- Canary when: traffic is high enough to get a statistically useful signal from 1–5%, and you want to limit blast radius gradually.
- Neither works cleanly with a non-backward-compatible DB change, since both versions run at the same time; fix that with expand-and-contract.
- For low-traffic internal services, a rolling update plus good probes is usually enough.
Why → A canary at 5% of 10 requests per minute tells you nothing; blue-green is simpler there.
Interview tip → Mention traffic volume as the deciding factor for canaries.
More on Deployments and releases
A deploy went out and p99 latency doubled. Walk me through it.IntermediateYou deployed a new version and half the pods are in CrashLoopBackOff. What do you do?BeginnerA release passed every test in staging but broke in production. How do you investigate?IntermediateHow would you design a zero-downtime deployment for a stateless API on Kubernetes?BeginnerEvery deploy causes a short spike of 502 errors from the ALB. Why, and how do you fix it?IntermediateHow would you set up a canary release, and what decides whether it gets promoted?Intermediate