.NET Architecture & System Design Interview Question #178
What is blue-green deployment?
Deployment, Cloud Operations, SRE & Senior System Design Scenarios Senior Advanced
Quick Interview Answer
Blue-green deployment maintains two production-capable environments. One environment serves current traffic while the other receives the new version and is validated before traffic is switched.
Detailed Explanation
Blue-green deployment maintains two production-capable environments. One environment serves current traffic while the other receives the new version and is validated before traffic is switched.
It can provide fast rollback by switching traffic back, but requires additional infrastructure and careful treatment of databases, queues, and other shared state that cannot simply be rolled back with application binaries.
Code Example
Blue: v1 <- traffic
Green: v2 <- deploy/test
Switch:
Blue: v1
Green: v2 <- traffic