A DevOps team is implementing a new release strategy for a critical microservice. The team wants to ensure that the microservice is deployed to a staging environment, tested by QA, and then, only if all automated and manual checks pass, promoted to production. The promotion to production should happen without redeploying the application bits, but rather by simply routing traffic to the already deployed and validated version. Which deployment strategy best fits these requirements?
- ARecreate Deployment
- BCanary Deployment
- CBlue/Green Deployment
- DRolling Deployment
Show answer & explanationAnswer & explanation
Correct answer: C. Blue/Green Deployment
Blue/Green deployment involves maintaining two identical production environments (Blue and Green). The new version is deployed to the inactive environment (e.g., Green), fully tested, and then traffic is instantly switched from the old (Blue) to the new (Green). This allows for zero-downtime promotion and immediate rollback by switching traffic back, aligning with the requirement to promote without redeploying bits.
Why the other options are wrong
- A. Recreate deployment involves taking down the old version and bringing up the new, causing downtime and redeploying bits.
- B. Canary deployment gradually rolls out to a subset of users, which is different from switching traffic to a fully validated environment.
- D. Rolling deployment replaces instances one by one, which involves redeploying bits over time, not an instant traffic switch.
Blue/Green Deployment
A deployment strategy that minimizes downtime and risk by running two identical production environments (Blue and Green). New releases are deployed to the inactive environment, tested, and then traffic is switched instantly.
- Zero-downtime deployments.
- Instant rollback capability by switching traffic back.
- Requires double the infrastructure resources during deployment.
Memory trick: Switching traffic is like changing a light from blue to green.