A development team needs to deploy an update to an Amazon ECS service running on an EC2-backed cluster. The service currently runs 4 tasks. Due to strict budget limits, the cluster has no additional EC2 instance capacity to run extra tasks during the deployment. However, the service must maintain at least 50% of its capacity at all times to handle the baseline request volume. Which ECS service deployment configuration should the developer specify to meet these requirements?
- Set the minimum healthy percent to 50% and the maximum percent to 100%.Answer
- BSet the minimum healthy percent to 100% and the maximum percent to 200%.
- CSet the minimum healthy percent to 100% and the maximum percent to 150%.
- DSet the minimum healthy percent to 0% and the maximum percent to 100%.
Answer
Set the minimum healthy percent to 50% and the maximum percent to 100%.
The correct option sets the minimum healthy percent to 50% and the maximum percent to 100%. This ensures that at least 2 tasks remain running at all times to handle baseline traffic. Because the maximum percent is 100%, ECS will not attempt to exceed 4 tasks at any point, meaning it will first terminate 2 old tasks to free up space on the existing EC2 hosts before launching 2 new tasks.
Step-by-Step Solution
Key Concept
Amazon ECS Rolling Update deployment parameters (minimumHealthyPercent and maximumPercent) control the task lifecycle and capacity requirements during a deployment.
Estimated Time:1m 30s