Question

Difficulty: MediumDeployment Strategies

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?

  1. Set the minimum healthy percent to 50% and the maximum percent to 100%.Answer
  2. B
    Set the minimum healthy percent to 100% and the maximum percent to 200%.
  3. C
    Set the minimum healthy percent to 100% and the maximum percent to 150%.
  4. D
    Set 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

1
Analyze the service configuration and constraints.
Current tasks = 4. Target minimum capacity = 50% (2 tasks). Additional EC2 capacity = 0.
To ensure no extra EC2 capacity is used, the maximum percent must not exceed 100%.
2
Evaluate the rolling update deployment parameter mathematical constraints.
Maximum percent of 100% means the service cannot exceed 4 concurrent tasks. Minimum healthy percent of 50% means at least 2 tasks must remain active.
This forces ECS to stop 2 tasks first, freeing up slot capacity on existing instances, and then start 2 new tasks.
3
Select the matching configuration option.
Minimum healthy percent = 50%, Maximum percent = 100%.
This is the only configuration that maintains the baseline service capacity without requiring extra EC2 instances.

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
Rate this question