Question

Difficulty: MediumDeployment Strategies and Execution

A company runs a critical microservice on Amazon ECS with an EC2 launch type. The service has a desired task count of 1010. Due to strict budget constraints, the underlying Auto Scaling group of EC2 instances is configured to not scale out, and there is no spare capacity in the cluster to run additional tasks. The SysOps Administrator needs to update the service to a new task definition. The deployment must guarantee that at least 55 tasks are always running and healthy to handle baseline traffic. Which combination of minimum healthy percent and maximum percent settings will achieve this deployment goal?

  1. Minimum healthy percent: 50%50\%, Maximum percent: 100%100\%Answer
  2. B
    Minimum healthy percent: 100%100\%, Maximum percent: 150%150\%
  3. C
    Minimum healthy percent: 50%50\%, Maximum percent: 150%150\%
  4. D
    Minimum healthy percent: 0%0\%, Maximum percent: 100%100\%

Answer

Minimum healthy percent: 50%50\%, Maximum percent: 100%100\%
The correct answer specifies a minimum healthy percent of 50%50\% and a maximum percent of 100%100\%. In Amazon ECS rolling updates, setting the minimum healthy percent to 50%50\% allows ECS to stop up to 55 tasks (leaving 55 tasks, or 50%50\% of the desired 1010, running and healthy). Setting the maximum percent to 100%100\% ensures that the service does not attempt to launch more than 1010 tasks at any point during the deployment. This prevents the need for additional EC2 host resources, ensuring the deployment succeeds within the current capacity constraints while meeting the requirement of keeping at least 55 tasks active.

Step-by-Step Solution

1
Determine the resource constraints of the ECS cluster.
The cluster is running at maximum capacity with no spare resources, and the underlying Auto Scaling group cannot scale out.
This constraints the maximum percent to 100%100\% to ensure that the deployment does not attempt to provision additional tasks (which would require extra container instances) before stopping old ones.
2
Calculate the required minimum healthy percent to maintain service availability.
Since at least 55 out of 1010 desired tasks must remain active, the minimum healthy percent must be 50%50\% (5/10×100%5 / 10 \times 100\%).
This guarantees that the application retains enough active tasks during the rolling update to handle baseline traffic.
3
Combine the parameters and select the corresponding configuration.
Minimum healthy percent of 50%50\% and maximum percent of 100%100\%.
This combination successfully meets both the capacity constraint (no extra tasks run concurrently) and the availability constraint (at least half the tasks remain healthy).

Key Concept

Amazon ECS rolling update deployment settings (minimum healthy percent and maximum percent) control the capacity envelope during service updates.
Rate this question