AWS Auto Scaling (Amazon Auto Scaling)学习笔记

Auto Scaling is a service that allows you to scale your Amazon EC2 capacity automatically by scaling out and scaling in according to criteria that you define.

Auto Scaling Plans

Auto Scaling has several schemes or plans that you can use to control how you want Auto Scaling to perform.

Maintain Current Instance Levels
You can configure your Auto Scaling group to maintain a minimum or specified number of running instances at all times.

Manual Scaling
You only need to specify the change in the maximum, minimum, or desired capacity of your Auto Scaling group.
Manual scaling out can be very useful to increase resources for an infrequent
event, such as the release of a new game version that will be available for download and require a user registration. For extremely large-scale events, even the Elastic Load Balancing load balancers can be pre-warmed by working with your local solutions architect or AWS Support.

Scheduled Scaling
Sometimes you know exactly when you will need to increase or decrease the number of instances in your group, simply because that need arises on a predictable schedule.
Recurring events such as end-of-month, quarter, or year processing, or scheduled and recurring automated load and performance testing, can be anticipated and Auto Scaling can be ramped up appropriately at the time of the scheduled event.

Dynamic Scaling
Dynamic scaling lets you define parameters that control the Auto Scaling process in a scaling policy.

Auto Scaling Components

Auto Scaling has several components that need to be configured to work properly: a launch configuration, an Auto Scaling group, and an optional scaling policy.

Launch Configuration
A launch configuration is the template that Auto Scaling uses to create new instances, and it is composed of the configuration name, Amazon Machine Image (AMI), Amazon EC2 instance type, security group, and instance key pair. Each Auto Scaling group can have only one launch configuration at a time.

The default limit for launch configurations is 100 per region. If you exceed this limit, the call to create-launch-configuration will fail.

Auto Scaling may cause you to reach limits of other services, such as the default number of Amazon EC2 instances you can currently launch within a region, which is 20. When building more complex architectures with AWS, it is important to keep in mind the service limits for all AWS Cloud services you are using.

Auto Scaling Group
An Auto Scaling group is a collection of Amazon EC2 instances managed by the Auto Scaling service.

An Auto Scaling group is a collection of Amazon EC2 instances managed by the Auto Scaling service.

Scaling Policy
You can associate Amazon CloudWatch alarms and scaling policies with an Auto Scaling group to adjust Auto Scaling dynamically.
You can associate more than one scaling policy with an Auto Scaling group.

A recommended best practice is to scale out quickly and scale in slowly so you can respond to bursts or spikes but avoid inadvertently terminating Amazon EC2 instances too quickly, only having to launch more Amazon EC2 instances if the burst is sustained. Auto Scaling also supports a cooldown period, which is a configurable setting that determines when to suspend scaling activities for a short time for an Auto Scaling group.

猜你喜欢

转载自blog.csdn.net/pg_edb/article/details/87886261