简体   繁体   English

AWS ECS fargate 自动扩展 - 它如何扩展选择要终止的任务?

[英]AWS ECS fargate auto-scaling - how does it scale-in selects which tasks to terminate?

I am running java process inside ecs fargate containers and have set-up auto scaling to scale-out when memory utilization is above 60% and scale-in accordingly.我在 ecs fargate 容器内运行 java 进程,并设置了自动缩放以在 memory 利用率高于 60% 时进行横向扩展,并相应地进行缩减。 This setup is working fine but i am not able to figure out the criteria based upon which ecs determines which tasks it should shutdown as part of the scale-in events ie how does it distinguishes between different tasks and picks one to shutdown?此设置工作正常,但我无法弄清楚基于哪个 ecs 确定应关闭哪些任务作为缩减事件的一部分的标准,即它如何区分不同的任务并选择一个关闭? Does it check if there any active requests on the tasks or not and then if there are multiple such tasks then picks randomly?它是否检查任务是否有任何活动请求,然后如果有多个此类任务则随机选择?

There is a years long open issue about that on github:在 github 上有一个关于该问题的多年未决问题

From the issue and its comments you can infer the following:从问题及其评论中,您可以推断出以下内容:

Does it check if there any active requests on the tasks它是否检查任务上是否有任何活动请求

No.不。

if there are multiple such tasks then picks randomly ?如果有多个这样的任务然后随机选择?

Its random.它的随机。

There is actually an update of this, now you can make your running task to be protected.实际上有一个更新,现在你可以让你的运行任务受到保护。 Check this one for more details检查这个以获取更多详细信息

https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-service-auto-scaling/ https://aws.amazon.com/premiumsupport/knowledge-center/ecs-fargate-service-auto-scaling/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM