Blue/green versus canary deployments
deployment-strategy fluency.
blue/green flips all traffic between two full environments; canary shifts a small slice gradually while watching metrics.
confusing the two or ignoring cost, rollback, and observability trade-offs.
What's really being asked
The interviewer checks whether you can match a release strategy to risk tolerance, cost, and the observability your platform provides.
The full answer
Blue/green keeps two complete environments. Blue serves production while green holds the new release; once green is verified, you flip all traffic to it in a single switch, and rollback is simply flipping back. Canary releases the new version to a small slice of traffic, say one to five percent, then gradually increases the percentage while watching error rates and latency, promoting only if the metrics stay healthy. The core difference is granularity: blue/green is an all-at-once cutover, canary is incremental exposure.
The mistakes people make
Reversing the definitions. Saying canary requires two environments, or that blue/green exposes only a subset of users. Ignoring that canary fundamentally depends on good real-time metrics to decide whether to proceed.
What usually comes next
How do you handle database schema changes under each strategy. What signals trigger an automatic canary rollback. How does session affinity complicate either approach.
A concrete example
On a PaaS that supports traffic splitting, a canary deploy might send five percent of requests to the new revision, watch the error budget for ten minutes, then ramp to twenty-five, fifty, and one hundred percent. Blue/green on the same platform spins up a full second environment, runs smoke tests, then repoints the router. The trade-offs: blue/green gives the fastest, cleanest rollback and simple reasoning, but you pay for double capacity during the cutover and a bad release hits everyone the instant you flip. Canary limits blast radius to a small fraction of users and avoids duplicate full environments, but it requires reliable per-revision metrics, traffic-splitting support, and longer total rollout time. Choose blue/green when you value instant rollback and can afford the duplicate footprint; choose canary when you want to catch regressions on a small audience first.
Interview question
Your PaaS lacks fine-grained traffic-splitting metrics but can run two full environments cheaply and switch a router instantly. Which strategy fits best and why?
- a.Canary, because it limits blast radius
- b.Blue/green, because instant cutover and rollback suit the available toolingCorrect
- c.Canary, because it avoids duplicate environment cost
- d.Blue/green, because it requires no second environment
Why? this is the answer
Blue/green relies on a clean instant switch and easy rollback, which matches the available router and cheap duplicate environment. Canary needs strong real-time metrics the platform here lacks.
Just read this? Test yourself on what you have been reading.
- #deployments
- #blue-green
- #canary
- #paas
- #release-strategy
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.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles