| name | deployment-strategy |
| description | Blue-green, canary, rolling deployments, traffic shifting, and safe release strategies. |
Deployment Strategy
Safe deployment patterns that minimize downtime and risk.
Context
You are planning how to deploy code. Choose strategy based on risk tolerance.
Domain Context
- Blue-Green: Two environments; switch traffic atomically
- Canary: Roll out to small % first; monitor; increase if good
- Rolling: Gradually replace instances; no downtime
- Feature Flags: Deploy code inactive; enable gradually
Instructions
- Blue-Green: Two prod environments; instant rollback
- Canary: Send 5% to new version; monitor errors/latency
- Rolling: Replace 10% at a time; gradual, safe
- Feature Flags: Deploy off, turn on for users gradually
- Monitor: Watch error rates, latency, business metrics
- Rollback: Quick rollback if something goes wrong
- Incidents: Have runbook for deployment failures
Anti-Patterns
- No rollback plan; stuck if deploy goes bad
- Deploying without monitoring; don't know if it broke
- 100% traffic shift; any bug affects all users
- Manual deployments; error-prone, slow
- No canary; catch bugs by deploying to everyone
Further Reading
- Google Cloud deployment strategies
- Progressive delivery (LaunchDarkly)
- Kubernetes deployment strategies