ECS 中的最小任务数和所需任务数有什么区别?

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

如果这个问题听起来很短视,我很抱歉,但我无法理解这两个参数之间的区别。

A​​WS 文档也没有给我答案:

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.

谁能帮我理解一下。我正在使用 Fargate 顺便说一句启动类型。

这两个值看似相似,但实际上存在很大差异。

最小任务数是应该永远存在的少量任务。如果这是 3 并且低于 3 任务,则存在大问题(例如 AZ 故障或主机故障)。这个值应该能够应付你期望的最小负载量,另外尽量确保它是高可用的以支持单节点故障。

所需的任务数量是 ECS 想要的任务数量 运行,这将在最小和最大范围之间,但永远不会超过边界。这不等于任务数 运行,它只是应该 运行 的任务数(您可能会在自动缩放操作开始之前看到这个数字增加)。