DOP-C02 Question 295
Select 2A DevOps team is implementing a CI/CD pipeline for deploying a containerized application on Amazon ECS using Fargate. The team needs to ensure that the pipeline can deploy updates seamlessly with zero downtime. Which combination of strategies should the team use to achieve this?
- A
Use an Application Load Balancer with ECS service to route traffic dynamically during deployments.
- B
Enable ECS service auto-scaling to automatically adjust the number of tasks based on traffic.
- C
Use the 'Rolling update' deployment strategy to replace running tasks incrementally.
- D
Use the 'Blue/Green' deployment strategy with AWS CodeDeploy to shift traffic between the old and new versions.
- E
Configure ECS tasks to use Spot Instances to reduce costs during deployments.
Show answer and explanation
Correct answers: A, D
Explanation
To achieve zero downtime during deployments on Amazon ECS using Fargate, the best strategies are to use an Application Load Balancer to dynamically route traffic during the deployment process and to implement the 'Blue/Green' deployment strategy. These approaches ensure seamless transition between old and new versions of the application while maintaining service availability.
- A. Correct.
Correct: An Application Load Balancer can dynamically route traffic between old and new ECS tasks during deployments, ensuring zero downtime.
- B. Incorrect.
Incorrect: While auto-scaling is useful for handling traffic spikes, it does not directly facilitate zero-downtime deployments.
- C. Incorrect.
Incorrect: The 'Rolling update' strategy replaces tasks incrementally, but it may cause interruptions in service during updates if not carefully configured.
- D. Correct.
Correct: The 'Blue/Green' deployment strategy with AWS CodeDeploy ensures traffic can be shifted seamlessly between old and new versions, minimizing downtime.
- E. Incorrect.
Incorrect: Using Spot Instances can reduce costs, but it doesn't directly ensure zero-downtime deployments, as Spot Instances can be interrupted at any time.