简体   繁体   English

如何自动缩放EC2节点

[英]How to auto scale EC2 nodes

I'm new in AWS, but I want to auto scale my application servers as following requirement: 我是AWS的新手,但我想按以下要求自动扩展应用程序服务器:

  • I may want to deploy 5 instances on Sunday night 我可能想在周日晚上部署5个实例
  • Then 10 instances on Tuesday 然后星期二有10个实例
  • 15 on Friday 星期五15
  • Then back down to 2 instances on Sat 然后回落到星期六的2个实例

I've create Auto Scaling Group, but I could not find where I can setup the above scaling configuration. 我已经创建了Auto Scaling Group,但是找不到在哪里可以设置上述缩放配置。

The Auto Scaling feature of Amazon EC2 can be used to launch or terminate Amazon EC2 instances to meet desired capacity. Amazon EC2的Auto Scaling功能可用于启动或终止Amazon EC2实例,以满足所需的容量。

In its simplest form, Auto Scaling maintains a given number of instances (eg 5 instances). Auto Scaling以最简单的形式维护给定数量的实例 (例如5个实例)。 If an instance fails, an the Availability Zone fails, then Auto Scaling will automatically launch replacement instances to maintain the given count. 如果实例失败,则可用区失败,则Auto Scaling将自动启动替换实例以维持给定的计数。

The Desired Capacity can be modified via the execution of a Scaling Policy or a Schedule . 可以通过执行扩展策略计划来修改所需容量

Scaling Policies tell Auto Scaling to modify the number of instances. 扩展策略告诉Auto Scaling修改实例数。 For example, +1 or +100% . 例如, +1+100% These scaling policies are typically triggered by an Amazon CloudWatch Alarm based on metrics such as CPU Utilization or the number of jobs waiting in a queue. 这些扩展策略通常由Amazon CloudWatch警报根据诸如CPU利用率或队列中等待的作业数量之类的指标触发。

However, your use case involves Schedule Scaling of instances. 但是,您的用例涉及实例的Schedule Scaling This is where you can specify a schedule for modifying: 您可以在此处指定修改时间表:

  • The Desired Capacity (the number of instances) 所需容量 (实例数)
  • The Minimum number of instances 最小实例数
  • The Maximum number of instances (both used to set limits on the number of instances in the Auto Scaling group) 最大实例数(均用于设置Auto Scaling组中实例数的限制)

Your use-case would involve creating four scheduled actions . 您的用例将涉及创建四个计划的操作

See: Scheduled Scaling documentation 请参阅: 计划扩展文档

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

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