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

问题描述

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

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


  • 根据策略缩减到的最小实例数

  • 要扩展的最大实例数取决于政策

但是,我从来都没能绕过什么

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

我一直只是将期望设置为等于 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(当然!)-您无法为所需的选择一个值。

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.

用例是什么?换成另一个所需实例数量及其有何不同?如果您希望AWS扩展规模小于您的所需(如果需要)大于 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支持中最小,期望和最大值的说明:

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

期望:如果您按比例触发CloudWatch警报up事件,则
会通知自动缩放器将其更改为更高的指定
金额,并且自动缩放器将启动一个实例来满足该数字
。如果您触发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组:我得到的是Min和Max,但是所需的实例限制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-16 02:52