What Is Blue-Green Deployment?
Blue-Green Deployment Strategy
Blue-green deployment runs two identical production environments: Blue (current) and Green (new version). You deploy to Green, test it, then switch traffic from Blue to Green. If something goes wrong, you instantly switch back to Blue.
How Blue-Green Deployment Works
The key benefit is zero-downtime deployments with instant rollback. Your load balancer or DNS points to Blue. You deploy to Green, run smoke tests, then flip the switch. If the new version has issues, flip back to Blue in seconds.
Key Concepts
- Zero-Downtime Deploy — Users never experience downtime because traffic switches between two live environments
- Instant Rollback — If the new version fails, switching back to the old environment is as fast as changing a DNS record or load balancer rule
Frequently Asked Questions
What's the difference between blue-green and canary deployment?
Blue-green switches all traffic at once. Canary gradually shifts traffic (1%, 5%, 25%, 100%). Canary is safer for detecting issues that only appear under load; blue-green is simpler.