Skip to content
tezvyn:

Blue/green vs canary release: differences and when to choose each.

Source: Wikipedia: Blue–green deploymentEasyHow cards are made

This tests release-automation risk mitigation. A strong answer contrasts instant full-environment swaps with gradual traffic shifts, pairing blue/green with hotfixes and canary with risky changes. A red flag is calling them identical or ignoring blast radius.

What's really being asked

This question evaluates whether you understand deployment strategies as risk-management tools rather than buzzwords. The interviewer wants to see that you can distinguish between all-at-once environment swaps and incremental traffic shifting, and that you choose patterns based on rollback speed, blast radius, infrastructure cost, and observability maturity.

The full answer

Four things in order. First, define blue/green deployment as maintaining two identical production environments where traffic is cut over entirely from the current live environment to the idle one after validation, allowing instant rollback by switching back. Second, define canary release as routing a small percentage of real user traffic to the new version while monitoring health metrics, then progressively increasing traffic if signals remain good. Third, compare them on blast radius, with blue/green affecting all users immediately but enabling sub-second rollback, and canary limiting impact to a small cohort but requiring more time to detect issues and roll back. Fourth, give a concrete scenario for each: choose blue/green when a critical security patch must deploy with zero downtime and immediate revert capability, and choose canary when launching a new recommendation algorithm whose latency or correctness can only be validated against real traffic patterns.

The mistakes people make

A red flag is saying blue/green and canary are the same thing or that blue/green is just a special case of canary. Another mistake is ignoring infrastructure cost, since blue/green doubles resource footprint while canary runs both versions on shared pools. Candidates also err by omitting monitoring and automated rollback, describing canary as merely a manual smoke test or blue/green as a simple DNS flip without health checks.

What usually comes next

The interviewer may ask how to handle database schema changes during blue/green cutover, or how you would design canary analysis with automated promotion and rollback based on error-rate and latency thresholds. They might also probe cost reduction for blue/green, such as using containers or serverless to spin down the idle environment, or ask how feature flags interact with canary releases.

A concrete example

Imagine you need to deploy a fix for a payment-processing bug that is causing checkout failures. A blue/green deployment lets you validate the fix in the green environment, switch traffic entirely, and if charge success rates drop, instantly revert to blue while engineers investigate. Conversely, if you are rolling out a new search ranking model, a canary release routes five percent of queries to the new model, compares click-through rates and median latency against the baseline for thirty minutes, then promotes to fifty percent and finally one hundred percent only if no regression triggers fire.

Interview question

You need to deploy a payment-processing bug fix that requires instant rollback capability if success rates drop. Which strategy and rationale fit best?

  • a.Canary release, because it maintains two identical production environments so the old version remains fully warm
  • b.Blue/green deployment, because it gradually routes five percent of real traffic to the new version while monitoring health metrics
  • c.Canary release, because it limits the blast radius to a small cohort while providing sub-second rollback via shared infrastructure
  • d.Blue/green deployment, because you can validate in the idle environment and swap all traffic instantly, reverting just as quickly if neededCorrect
Why?

The card explicitly pairs blue/green with scenarios requiring immediate full cutover and sub-second rollback, such as the payment bug example. Option C is tempting because it combines canary's limited blast radius with blue/green's rollback speed, but canary inherently requires more time to drain traffic during a rollback.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on ci/cd — each one lists the topics its interview covers.

See open roles