What is Blue-Green Deployment
Instant switch between environments
Blue-Green Deployment
Blue-Green Deployment — a deployment strategy with two identical production environments to minimize downtime and risks.
How It Works
| Stage | Blue (current) | Green (new) | |-------|----------------|-------------| | Before deploy | Serves traffic | Inactive | | Deploy | Serves traffic | New version deploys | | Testing | Serves traffic | Smoke tests | | Switch | Goes offline | Receives traffic | | Rollback (if needed) | Receives traffic | Goes offline |
Advantages
- Zero downtime — instant switching
- Fast rollback — return to old version in seconds
- Production testing — verification on real infrastructure
- Confidence — can test before switching traffic
Strategy Comparison
| Strategy | Downtime | Risk | Resources | |----------|----------|------|-----------| | Blue-Green | None | Low | 2x | | Canary | None | Low | 1.1x | | Rolling | Minimal | Medium | 1x | | Recreate | Yes | High | 1x |
Tools
- Kubernetes (Service, Deployment)
- AWS (ALB, Route 53)
- Nginx, HAProxy