SAP-C02 Question 632
Single answerYour organization runs a critical microservices application using Amazon ECS with the EC2 launch type. The application requires high availability and minimal downtime during deployments. Recently, you noticed that some services experience downtime when updating tasks to a new version. You are tasked with improving the deployment strategy to ensure zero-downtime deployments. Which deployment strategy should you choose?
- A
Rolling update
- B
Blue/green deployment using AWS CodeDeploy
- C
Recreate deployment
- D
Canary deployment
Show answer and explanation
Correct answer: B
Explanation
Blue/green deployment with AWS CodeDeploy is the most appropriate strategy for ensuring zero-downtime deployments in Amazon ECS. This approach allows you to test the new version in a separate environment and only shift traffic once the new tasks are verified to be healthy. Additionally, it simplifies rollback in case of any issues.
- A. Incorrect.
Rolling update replaces tasks incrementally but can cause downtime if the new tasks fail before the old ones are terminated. It does not guarantee zero downtime.
- B. Correct.
Blue/green deployment using AWS CodeDeploy creates a separate environment for the new version and switches traffic only after the new version is verified. This ensures zero downtime and rollback capability, making it ideal for the requirement.
- C. Incorrect.
Recreate deployment stops all old tasks before starting new ones, causing downtime during deployments. It is not suitable for high availability requirements.
- D. Incorrect.
Canary deployment is not a native ECS deployment type. While you can implement it manually, it would require significant effort and does not directly address zero-downtime requirements in this scenario.