Interview Prep/Real-World Interview/Deployments and releases

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 →

  1. 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).
  2. Canary when: traffic is high enough to get a statistically useful signal from 1–5%, and you want to limit blast radius gradually.
  3. Neither works cleanly with a non-backward-compatible DB change, since both versions run at the same time; fix that with expand-and-contract.
  4. 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.

All Real-World Interview questions Roadmap: Interview readiness

More on Deployments and releases