Better Fault tolerance/ better availability/ better cost management/ better scalability – These must be considered while hosting a website/ App on the server to allow smooth functioning of the website/ App. Website owners have a key requirement of high uptime and great customer browsing experience. However, at times increase in traffic leads to performance issues (due to limited resources like CPU, Memory, and Processor etc). In such scenarios, bringing up a new backup server and introducing same to production may not be the best option since this activity incurs considerable time and may cause downtime. This is where Autoscaling is able to solve the issues being faced –
- AWS autoscaling helps you ensure correct number of EC2 instances (Servers) are available to handle the load of your application.
- You have the option to create collections of EC2 instances called Auto Scaling groups.
- You have option to specify the minimum number of instances in each Auto Scaling group. Further, auto scaling ensures that your group never goes below this size.
- Autoscaling ensure that you have the right number of AWS EC2 instances for your needs at all time.
- Autoscaling helps to save cost by cutting down the number of EC2 instances when not needed, and scaling out to add more instances only when it is required.
Auto Scaling Components
- Launch Configuration (what): It is a template used by the auto scaling group to launch EC2 instances. We can specify information such as the AMI ID, instance type, key pair, and security groups for your instances while creating the launch configuration.
- Groups (Where): They are the logical groups that contain the collection of EC2 instances which are having similar characteristics for scaling and management purpose. When you create a group, we can specify its minimum, maximum, and, desired number of EC2 instances.
- Scaling Plan (When): Scaling plan informs Auto scaling how and when to scale. EC2 function of auto-scaling provides the following ways for you to scale the auto scaling group.
- Maintaining current instance level at all times: With this scaling plan, the user can configure an AWS auto scaling group to maintain a fixed number of running instances at all times.
- Manual scaling:This plan allows the user to specify desired capacity of the AWS auto scaling groups, and therefore the auto scaling service manages the process of creating or terminating instances automatically.
- Scaling based on a schedule:This scaling plan comes in handy in situations where the user can predict when the traffic on the application is going to increase. In such scenarios, the user can schedule the time of executing AWS auto scaling.
- Scaling based on demand:This scaling plan lets the user define parameters that control the scaling procedure such as CPU utilization, memory, etc.