[英]AWS ECS Capacity providers
I created a capacity provider for a particular ecs cluster(t2.small) and it got attached to auto-scaling-group also.我为特定的 ecs 集群 (t2.small) 创建了一个容量提供程序,它也附加到了 auto-scaling-group。 Now I am running 2 tasks with similar resource which utilizes t2.small completely.
现在我正在运行 2 个具有类似资源的任务,它们完全利用了 t2.small。 This is a batch job which runs for max 5 seconds.
这是一个批处理作业,最多运行 5 秒。 Now when I set desired count of tasks in service to 4 or 6 my cluster never scales out.
现在,当我将所需的服务任务数设置为 4 或 6 时,我的集群永远不会扩展。 According to https://aws.amazon.com/blogs/containers/deep-dive-on-amazon-ecs-cluster-auto-scaling/ , my CapacityProviderReservation should go 200% when desired count increases to 4. But average and maximum CapacityProviderReservation is not going beyond 100%.
根据https://aws.amazon.com/blogs/containers/deep-dive-on-amazon-ecs-cluster-auto-scaling/ ,当所需计数增加到 4 时,我的CapacityProviderReservation应该达到 200%。但是平均值和最大值CapacityProviderReservation 不会超过 100%。
I have already set autoscaling policy for service, but still I am not able to scale instances using capacity providers.我已经为服务设置了自动扩展策略,但我仍然无法使用容量提供程序扩展实例。 Can anyone explain me how to implement it
谁能解释我如何实现它
In that deep dive article, it explains:在那篇深入探讨的文章中,它解释了:
CapacityProviderReservation = M / N * 100 CapacityProviderReservation = M / N * 100
Where:在哪里:
one of the factors to calculate "M", is the current number of tasks plus the tasks in the "PROVISIONING" state.计算“M”的因素之一是当前任务数加上处于“PROVISIONING”状态的任务。
In order for a service to go into the "PROVISIONING" state, the service has to also be configured to use a capacity provider.为了使服务进入“PROVISIONING”状态,还必须将服务配置为使用容量提供程序。
Once I converted a bunch of services over and scaled them up, there was no capacity for them and instead of failing instantly, they went into the "PROVISIONING" state.一旦我转换了一堆服务并对其进行了扩展,它们就没有容量了,而不是立即失败,它们进入了“PROVISIONING”状态。
At this point, CapacityProviderReservation went above 100% and the cluster scaled to meet the needs.此时,CapacityProviderReservation 超过 100%,集群扩展以满足需求。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.