DVA-C02 Question 312
Single answerYou are deploying a new version of your application hosted on Amazon ECS using AWS CodeDeploy. The application must be updated with minimal risk of downtime, and you want to gradually shift traffic to the new version while monitoring for errors. What deployment strategy should you choose?
- A
Blue/Green deployment
- B
Canary deployment
- C
Rolling deployment
- D
All-at-once deployment
Show answer and explanation
Correct answer: B
Explanation
Canary deployment is the best option for this scenario because it allows you to gradually shift traffic from the old version to the new version while monitoring for errors. This minimizes risk and ensures a smooth transition with minimal downtime. Blue/Green deployments and Rolling deployments have their use cases but do not meet the specific requirement for gradual traffic shifting described in the scenario.
- A. Incorrect.
Blue/Green deployment involves creating a completely separate environment for the new version of the application and switching traffic to it all at once. While this minimizes downtime, it does not gradually shift traffic, as required in the scenario.
- B. Correct.
Canary deployment incrementally shifts traffic from the old version of the application to the new version, allowing you to monitor for errors before completing the rollout. This meets the requirement for gradual traffic shifting and error monitoring.
- C. Incorrect.
Rolling deployment updates a subset of instances at a time, but it does not typically involve the gradual traffic shifting described in this use case. Instead, it updates the application in place on existing instances.
- D. Incorrect.
All-at-once deployment involves deploying the new version of the application to all instances simultaneously, which carries a higher risk of downtime and does not meet the requirement for gradual traffic shifting.