What is the difference between Minimum number of tasks and Desired number of tasks in ECS?

Viewed 2902

I'm sorry if this question sounds shortsighted but I cannot get my head around the difference between these two parameters.

AWS docs don't give me the answer either:

For Minimum number of tasks, enter the lower limit of the number of tasks for Service Auto Scaling to use. Your service's desired count is not automatically adjusted below this amount.

For Desired number of tasks, this field is pre-populated with the value that you entered earlier. You can change your service's desired count at this time, but this value must be between the minimum and maximum number of tasks specified on this page.

Can someone help me understand this please. I'm using Fargate launch type BTW.

1 Answers

These two can appear to be similar values, however there's quite a major difference.

Minimum number of tasks is the small number of tasks that should ever exist. If this is 3 and it falls below 3 task then there are big problems (such as an AZ failure or host failure). This value should be able to cope with the minimal amount of load that you expect, in addition try to ensure it is highly available to support a single node failure.

Desired number of tasks is the amount of tasks ECS would like to be running, this will be in between the range of min and maximum but never exceeding the boundaries. This is not equal to the number of tasks running, it is simply the amount tasks that should be running (you may see this number increase before the autoscaing action kicks in).

Related