gpt4 book ai didi

amazon-web-services - 尽管没有可用的 Spot 实例,AWS ECS 任务仍在运行

转载 作者:行者123 更新时间:2023-12-04 10:41:22 25 4
gpt4 key购买 nike

在学习 AWS ECS 时,我创建了一个 Fargate Spot 集群并定义了一个带有单个任务的服务。我可以看到 EC2 实例的 Spot 请求是根据我在启动 Fargate 集群时提供的配置自动创建的。

现在我仍然可以访问应用程序,即使 Spot 请求的历史记录指定 MaxSpotInstanceCountExceeded从我的实例激活后 1 秒开始 - 在过去 6 小时内每隔几分钟就会出现一次错误。

我读到如果终止通知发送到我当前正在使用的实例,Fargate Spot 将尝试启动另一个 Spot 实例,但我不明白我的应用程序怎么可能仍在运行,因为 Spot 请求在error地位。

  • Fargate 是否使用与我想象的不同的策略来保持 Spot 实例的运行?我没有为我的集群提供任何额外的容量提供程序
  • 除了第一个问题,使用 Fargare 点发射类型时是否有任何可用性保证?
  • 如何验证我的集群是否确实在使用 Spot 实例?我无法在 AWS 控制台中识别此信息,也无法使用 aws-cli .我能找到的唯一指标是 Spot 请求和我的 ECS 集群使用的公共(public)子网
  • 为什么我收到 MaxSpotInstanceCountExceeded错误?我没有旋转任何其他 Spot 实例,所以我很惊讶 Fargate 用尽了 Spot 实例限制。或者这个问题可能有不同的原因?
  • 我是否可以修改我的 Fargate Spot 集群以扩展所需的 EC2 类型以最大程度地减少点实例不可用问题?
  • 最佳答案

    如果您可以分享更多关于您正在运行的命令或您在哪里看到此信息的数据,这将很有帮助,但只是为了澄清一些事情:

    Does Fargate use a different strategy for keeping the spot instances running than I thought? I didn't provide any additional capacity providers to my cluster



    Fargate 维护 Spot 容量池以运行 Fargate Spot 任务。这些池由 Fargate 服务维护,而不是您在帐户中看到的内容。当客户想要运行 Spot 任务时,会从池中分配一个实例来运行相关任务。

    此实例的行为与任何其他 Spot 实例一样,可以随时由 EC2 Spot 回收,并在任务终止并将实例返回到 Spot 之前提供 2 分钟警告。当然,如果任务在 EC2 Spot 回收实例之前完成,则任务将照常运行直至完成。

    In addition to the first question, are there any availability guarantees when using Fargare spot launch type?



    不,以任何形式(EC2 或 Fargate)使用 Spot 时都没有可用性保证。 Spot 的全部意义在于您可以访问其他未使用的计算容量 如果有可用的并且可以随时回收计算容量,并发出 2 分钟的警告。这就是 Spot 比常规按需使用便宜得多的原因。

    Why am I getting the MaxSpotInstanceCountExceeded error? I didn't spin any other spot instances so I'm surprised that Fargate exhausted the spot instance limit. Or maybe there is a different cause to this issue?



    你在哪里得到这个错误。如上所述,Fargate 管理用于运行所有 Fargate 任务(按需和 Spot 类似)的计算容量,因此您运行的 Fargate Spot 任务的数量不会影响您可以在 Fargate 之外运行的 EC2 Spot 实例的数量。运行 Fargate Spot 任务时,您也不会在您的账户中看到任何 EC2 Spot 实例,因为相应的 Spot 实例位于 Fargate 服务账户中。

    Can I modify my Fargate Spot cluster to extend the desirable EC2 types to minimize the spot-instance-unavailability issue?



    不,您无法影响使用 Fargate 时使用的实例类型。

    由于 Spot 容量不可用而导致 Fargate Spot 任务无法启动的情况非常罕见(查看服务指标),如果您可以向我发送相应的任务 ID 和有关您看到此内容的区域的信息,我可以让团队查看它。

    关于amazon-web-services - 尽管没有可用的 Spot 实例,AWS ECS 任务仍在运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59912611/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com