【问题标题】:How many minutes after the first instance is launched will Auto Scaling accept another scaling activity request?第一个实例启动后多少分钟 Auto Scaling 会接受另一个扩展活动请求?
【发布时间】:2019-08-26 12:06:46
【问题描述】:

我正在准备 AWS 解决方案架构师助理考试。我遇到了这个问题和答案,但答案对我来说并没有说服力。有人可以帮助我以简单的方式提供更好的解释吗?这是我的问题-

问题:您已经设置了 Auto Scaling 组。 Auto Scaling 组的冷却时间为 7 分钟。第一个实例在 3 分钟后启动,而第二个实例在 4 分钟后启动。在第一个实例启动后多少分钟 Auto Scaling 会接受另一个扩展活动请求?

A. 11 分钟

B. 7 分钟

C. 10 分钟

D. 14 分钟

答案:A

说明:如果 Auto Scaling 组正在启动多个实例,则每个实例的冷却期在该实例启动后开始。在启动的最后一个实例完成其冷却期之前,该组将保持锁定状态。在这种情况下,第一个实例的冷却时间从 3 分钟开始,到第 10 分钟结束(3+7 冷却),而第二个实例的冷却时间从第 4 分钟开始,到第 11 分钟结束(4+7冷却)。因此,Auto Scaling 组将在 11 分钟后收到另一个请求。

【问题讨论】:

    标签: amazon-web-services


    【解决方案1】:

    此问题与 AutoScaling 组中正在启动的多个实例有关。

    您可以将 AutoScaling 组配置为在 CloudWatch 警报触发时启动一个实例,您还可以将 AutoScaling 组配置为在 CloudWathc 警报触发时启动多个实例。这是第二种情况。

    根据AWS Documentations

    It is common for Auto Scaling groups to launch more than one instance at a time. For example, you might choose to have the Auto Scaling group launch three instances when a specific metric threshold is met.
    
    With multiple instances, the cooldown period (either the default cooldown or the scaling-specific cooldown) takes effect starting when the last instance launches.
    

    这解释了为什么答案是 11 分钟:

    1. 只要触发自动缩放,您就有两个实例要启动。
    2. 自动扩缩,第一个实例在 3 分钟启动,第二个在 4 分钟启动。
    3. 如果我们使用 AWS 文档,那么“冷却期从最后一个实例启动时开始生效。”最后一个实例在 4 分钟后启动,因此自动缩放将在 (4+ 7) 11 分钟。

    【讨论】:

    • 很好的解释。谢谢
    猜你喜欢
    • 2019-01-06
    • 2012-12-16
    • 2017-12-22
    • 2021-02-09
    • 2021-05-05
    • 2014-06-08
    • 1970-01-01
    • 2012-01-07
    • 1970-01-01
    相关资源
    最近更新 更多