Amazon EC2 Auto-Scaling Concepts: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(24 intermediate revisions by the same user not shown)
Line 11: Line 11:
''Auto-scaling'' is an Amazon EC2 functionality that insures that an optimal number of EC2 instances are started and maintained running, to handle the load of a specific application. The EC2 instances whose number is controlled this way are part of an [[Amazon_EC2_Auto-Scaling_Concepts#Auto-Scaling_Group|auto-scaling group]].
''Auto-scaling'' is an Amazon EC2 functionality that insures that an optimal number of EC2 instances are started and maintained running, to handle the load of a specific application. The EC2 instances whose number is controlled this way are part of an [[Amazon_EC2_Auto-Scaling_Concepts#Auto-Scaling_Group|auto-scaling group]].


Auto-scaling allows for scaling plans', which control the number of active instances as the demand on the application increases or decreases.
Auto-scaling allows for [[#Scaling_Plans|scaling plans]], which control the number of active instances as the demand on the application increases or decreases.
 
With auto-scaling, an application gets better ''fault tolerance'':  auto-scaling can detect instance failure, terminate it and launch a new instance to replace it. Auto-scaling uses [[Amazon AWS Concepts#Availability_Zone|availability zones]]: if one availability zone becomes unavailable, auto-scaling will launch instances in another one, to compensate.
 
The application also gets better ''availability'': the right amount of capacity is brought on-line (or shut-down) via auto-scaling.


=Auto-Scaling Group=
=Auto-Scaling Group=


An auto-scaling group is a [[Infrastructure_Concepts#Server_Cluster|server cluster]] implementation on AWS. It contains a set of equivalent EC2 instances that share similar characteristics, and that are managed by the auto-scaling machinery. Auto-scaling ensures that the number of EC2 instances in an auto-scaling group does not go below a ''minimum size'' and above a ''maximum size''. The group has a ''desired capacity''.
Typically, a web application tier (web tier, app tier, database tier, cache tier) is implemented as an auto-scaling group.
Amazon EKS also can use auto-scaling groups to perform [[Amazon_EKS_Concepts#Autoscaling|node auto-scaling]].
An auto-scaling group must specify a [[#Launch_Configuration|launch configuration]].
==Auto-Scaling Groups and Availability Zones==
An auto-scaling group can span multiple [[Amazon AWS Concepts#Availability_Zone|availability zones]], within a  [[Amazon AWS Concepts#Region|region]]
=Auto-Scaling Life Cycle=
http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html
=Launch Configurations=
A ''launch configuration'' is a template for the EC2 instances created as part of an [[#Auto-Scaling_Group|auto-scaling group]].
The launch configuration includes the ID of the [[Amazon_EC2_Concepts#AMI_.28Amazon_Machine_Image.29|Amazon Machine Image (AMI)]], the [[Amazon_EC2_Concepts#Instance_Type|instance type]], a key pair, one or more [[Amazon_AWS_Security_Concepts#Security_Group|security groups]], and a [[Amazon_Elastic_Block_Store_Concepts#Block_Device_Mapping|block device mapping]].
One, and only one, launch configuration must be specified on creation of an auto-scaling group. The same launch configuration can be specified with multiple auto-scaling groups. The launch configuration cannot be modified after creation. Therefore, if you want to change the launch configuration for your Auto Scaling group, you must create a launch configuration and then update your Auto Scaling group with the new launch configuration. When you change the launch configuration for your Auto Scaling group, any new instances are launched using the new configuration parameters, but existing instances are not affected.


Auto-scaling ensures that the number of EC2 instances in an auto-scaling group does not go below a ''minimum size'' and above a ''maximum size''. The group has a ''desired capacity''.
=Scaling Plans=
=Auto-Scaling Operations=
{{Internal|Amazon_EC2_Operations#Auto-Scaling_Operations|Auto-Scaling Operations}}

Latest revision as of 04:12, 31 December 2021

External

Internal

Overview

Auto-scaling is an Amazon EC2 functionality that insures that an optimal number of EC2 instances are started and maintained running, to handle the load of a specific application. The EC2 instances whose number is controlled this way are part of an auto-scaling group.

Auto-scaling allows for scaling plans, which control the number of active instances as the demand on the application increases or decreases.

With auto-scaling, an application gets better fault tolerance: auto-scaling can detect instance failure, terminate it and launch a new instance to replace it. Auto-scaling uses availability zones: if one availability zone becomes unavailable, auto-scaling will launch instances in another one, to compensate.

The application also gets better availability: the right amount of capacity is brought on-line (or shut-down) via auto-scaling.

Auto-Scaling Group

An auto-scaling group is a server cluster implementation on AWS. It contains a set of equivalent EC2 instances that share similar characteristics, and that are managed by the auto-scaling machinery. Auto-scaling ensures that the number of EC2 instances in an auto-scaling group does not go below a minimum size and above a maximum size. The group has a desired capacity.

Typically, a web application tier (web tier, app tier, database tier, cache tier) is implemented as an auto-scaling group.

Amazon EKS also can use auto-scaling groups to perform node auto-scaling.

An auto-scaling group must specify a launch configuration.

Auto-Scaling Groups and Availability Zones

An auto-scaling group can span multiple availability zones, within a region

Auto-Scaling Life Cycle

http://docs.aws.amazon.com/autoscaling/latest/userguide/AutoScalingGroupLifecycle.html

Launch Configurations

A launch configuration is a template for the EC2 instances created as part of an auto-scaling group.

The launch configuration includes the ID of the Amazon Machine Image (AMI), the instance type, a key pair, one or more security groups, and a block device mapping.

One, and only one, launch configuration must be specified on creation of an auto-scaling group. The same launch configuration can be specified with multiple auto-scaling groups. The launch configuration cannot be modified after creation. Therefore, if you want to change the launch configuration for your Auto Scaling group, you must create a launch configuration and then update your Auto Scaling group with the new launch configuration. When you change the launch configuration for your Auto Scaling group, any new instances are launched using the new configuration parameters, but existing instances are not affected.

Scaling Plans

Auto-Scaling Operations

Auto-Scaling Operations