Canary vs blue-green
Compare canary and blue/green deployments. When is each appropriate?
Answers use simple, clear English.
Quick interview answer
Blue/green: two full environments; switch traffic at once (or weighted). Fast rollback by switching back; higher infra cost. Canary: send a small % of traffic to the new version, ramp while watching SLOs; cheaper than dual full stacks, needs good metrics and compatible schemas.
Detailed answer
Blue/green: two full environments; switch traffic at once (or weighted). Fast rollback by switching back; higher infra cost. Canary: send a small % of traffic to the new version, ramp while watching SLOs; cheaper than dual full stacks, needs good metrics and compatible schemas. Use blue/green for hard cutovers; canary for gradual risk reduction on APIs.
Real example & use case
Payments API canary 5%→100% with automated rollback on error-rate spike.
Pros & cons
Pros: controlled releases. Cons: both need expand-contract data changes.