-
Minimum Healthy Percent:
This setting defines the minimum number of tasks that must remain in service during an update. It ensures that a specified portion of tasks stays active, preventing service downtime. -
Maximum Healthy Percent:
This parameter defines the maximum number of tasks allowed to run concurrently during an update. It specifies how many tasks can be temporarily added to maintain overall capacity.
Example 1: Update With Balanced Capacity
Consider a scenario where four tasks are running version 1 of your application with the following configuration:- Minimum Healthy Percent: 25%
- Maximum Healthy Percent: 100%
- A minimum healthy percent of 25% means that at least one task (25% of 4) must always remain running.
- A maximum healthy percent of 100% ensures that at no time does the number of running tasks exceed four.
- ECS removes up to three tasks at a time, ensuring that at least one task remains active.
- New tasks are deployed to replace the terminated tasks.
- Initially, you might have one task running the old version and three tasks running the new version.
- Once the new tasks are verified as healthy, the remaining old task is terminated and replaced by a new version.

Example 2: Update With Maximum Availability
Now, consider a configuration with these parameters:- Total tasks: 4
- Minimum Healthy Percent: 100%
- Maximum Healthy Percent: 125%
- A minimum healthy percent of 100% guarantees that all four tasks remain running at all times.
- A maximum healthy percent of 125% permits the total number of tasks to temporarily increase to five during the update process.
- ECS launches an additional task, increasing the count to five.
- Once the new task is confirmed healthy, ECS terminates one of the original tasks running version 1.
- This cycle continues until every task is updated to version 2 while ensuring uninterrupted service availability.
By carefully configuring the minimum and maximum healthy percentages, you can balance service availability with an efficient rollout of new task versions. This flexibility ensures that updates can be performed with minimal impact to your application’s performance.