本文介绍了AWS EC2 Auto Scaling 组:我得到了最小值和最大值,但什么是所需实例限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在 AWS EC2 中设置 Auto Scaling 组时 MinMax 界限似乎很有意义:

When you setup an Auto Scaling groups in AWS EC2 Min and Max bounds seem to make sense:

  • 根据政策缩减到的最小实例数
  • 根据政策扩展的最大实例数

然而,我一直无法理解 Desired 到底要影响什么.

However, I've never been able to wrap my head around what the heck Desired is intended to affect.

我总是将 Desired 设置为等于 Min,因为一般来说,我想向亚马逊支付尽可能少的什一税,除非您需要一个实例来处理负载它应该是 Min 实例数.

I've always just set Desired equal to Min, because generally, I want to pay Amazon the minimum tithe possible, and unless you need an instance to handle load it should be at the Min number of instances.

我知道如果您使用 ElasticBeanstalk 并将 Min 设置为 1 并将 Max 设置为 2,它会设置一个 Desired> 到 2(当然!)--您不能为 Desired 选择值.

I know if you use ElasticBeanstalk and set a Min to 1 and Max to 2 it sets a Desired to 2 (of course!)--you can't choose a value for Desired.

对于不同的 Desired 实例数量有什么用例,它有什么不同?当您希望 AWS 的扩展能力低于您的 Desired(如果需要)大于 Min 时?

What would be the use case for a different Desired number of instances and how does it differ? When you expect AWS to scale lower than your Desired if desired is larger than Min?

推荐答案

以下是 AWS 支持中对min、desired 和 max"值的解释:

Here are the explanations for the "min, desired and max" values from AWS support:

MIN:这将是可以在您的系统中运行的最小实例数自动缩放组.如果您的缩减 CloudWatch 警报被触发,您的自动缩放组永远不会终止低于此数量的实例

期望:如果您因扩展事件触发 CloudWatch 警报,则它将通知自动缩放器将其更改为指定的更高的数量,自动缩放器将启动一个实例来满足那个数字.如果您触发 CloudWatch 警报以缩小规模,那么它将所需的自动缩放器更改为指定的较低数字,并且自动缩放器将终止实例以达到该数字.

DESIRED: If you trip a CloudWatch alarm for a scale up event, then it will notify the auto scaler to change it's desired to a specified higher amount and the auto scaler will start an instance/s to meet that number. If you trip a CloudWatch alarm to scale down, then it will change the auto scaler desired to a specified lower number and the auto scaler will terminate instance/s to get to that number.

MAX:这将是您可以运行的最大实例数您的自动缩放组.如果您的纵向扩展 CloudWatch 警报仍然存在触发,您的自动缩放组将永远不会创建超过指定的最大金额.

MAX: This will be the maximum number of instances that you can run in your auto scale group. If your scale up CloudWatch alarm stays triggered, your auto scale group will never create instances more than the maximum amount specified.

这篇关于AWS EC2 Auto Scaling 组:我得到了最小值和最大值,但什么是所需实例限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 07:51