简体   繁体   English

亚马逊ECS服务中的任务“期望计数”是什么?

[英]What is 'desired count' of tasks in amazon ecs service?

I'm configuring aws ecs service auto scaling. 我正在配置AWS ECS服务自动缩放。 And when i try to load my service, alarm executes action to create new task. 当我尝试加载服务时,警报会执行操作以创建新任务。 But in service tab 'Tasks' i can't see some new task. 但是在服务标签“任务”中,我看不到一些新任务。 But 'Desired count' value increases. 但是“所需计数”值增加了。 Does it mean that new task is created or not? 这是否意味着创建了新任务?

The desired count is the count of the task by your service at that moment. 所需的计数是您的服务当时的任务计数。 That does not essentially means that your all that's will be in running state. 从本质上讲,这并不意味着您所有的一切都将处于运行状态。

Let me quote from AWS doc. 让我引用AWS文档。

Your Amazon ECS service can optionally be configured to use Service Auto Scaling to adjust its desired count up or down in response to CloudWatch alarms. 您可以将您的Amazon ECS服务配置为使用Service Auto Scaling来向上或向下调整其所需的计数,以响应CloudWatch警报。 Service Auto Scaling leverages the Application Auto Scaling service to provide this functionality. Service Auto Scaling利用Application Auto Scaling服务来提供此功能。

Ref: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html 参考: https : //docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html

There might be 2 situations. 可能有2种情况。

  • Your task might be in stopped because of multiple reasons with your application. 由于多种原因,您的任务可能已停止。 You can see the task status under the services section. 您可以在“服务”部分下查看任务状态。

  • Your task was not able to run because of the insufficient underlying container instance resources if you are using EC2 Type in the cluster. 如果您在集群中使用EC2 Type,则由于底层容器实例资源不足,您的任务无法运行。

I suggest you check events sections of the services and let me know what exact information you are able to see there. 我建议您检查服务的事件部分,并让我知道您可以在其中看到的确切信息。

ECS -> Cluster Name -> Service Name -> Event Tab ECS->群集名称->服务名称->事件选项卡

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

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