Blue-Green Deployment
Problem
Replacing production version 1 with version 2 directly creates a dangerous transition.
If version 2 is broken, rollback may take time.
Solution — Blue-Green
Maintain two environments: Blue → v1 ← users Green → v2 ← test When Green is ready, switch traffic: users → Green
To check Green with real users before sending everyone, a router that supports weighted traffic can send it 5% while Blue receives 95%. Increase Green's share after checking errors and response times.
Blue-green describes the two separate environments; canary describes testing a release with a small share of production traffic before expanding it. You can combine both by using a canary rollout between Blue and Green.
Core idea: blue-green deployment makes release switching and rollback largely a traffic-routing decision.