How do you implement Blue-Green Deployment?
⚡
Quick Answer
Run two identical environments — Blue (current live) and Green (new version). Deploy and test on Green, then switch traffic (via load balancer or DNS) from Blue to Green. Roll back instantly by switching back.
Detailed Answer
Blue-green gives near-zero-downtime releases and a fast rollback path because the old version stays warm. Costs: double the infrastructure during the switch and care with stateful concerns (database migrations, in-flight sessions). It pairs well with smoke tests on Green before the cutover.
💡
Interview Tip
Call out instant rollback as the big benefit and database migrations as the main gotcha.
blue-greendeploymentrelease