Increase Efficiency with Auto Scaling
After completing this unit, you’ll be able to:
- Describe the features of Amazon EC2 Auto Scaling.
- Describe the benefits of Amazon EC2 Auto Scaling.
- Differentiate between Amazon EC2 Auto Scaling and AWS Application Auto Scaling.
Imagine you have an application that enables employees to search for conference rooms. During the beginning and end of the week, usage of this application is minimal. During the middle of the week, more employees are scheduling meetings, so demand on the application increases significantly.
In a traditional data center, you need to anticipate periods of heavy use and have enough physical servers to handle the anticipated peak load. However, this means that during periods of minimal use, the servers will sit idle in the data center.
Know the Importance of Scale
Scaling is the ability to increase or decrease the compute capacity of your application. To understand why scaling is important, compare the above example to this model.
Rather than working with physical servers, a company has built its application in the cloud. The company experiences the same traffic in which resources are most needed on Wednesdays, and least needed on Sundays. The application is able to add and remove servers on-demand. The company pays only for what it uses, making its application more cost-effective.
In the AWS Cloud, Amazon EC2 Auto Scaling allows you to automatically provision EC2 instances when demand spikes and terminate them when they’re no longer needed. Because Amazon EC2 Auto Scaling uses EC2 instances, you pay for only the instances that you use when you use them. You now have a cost-effective architecture that provides the best customer experience while reducing expenses.
Get to Know Amazon EC2 Auto Scaling
Amazon EC2 Auto Scaling monitors your applications and automatically adjusts capacity to maintain steady, predictable performance at the lowest possible cost.
Provision Amazon EC2 Capacity Through Fleet Management
If your application runs on Amazon EC2 instances, you have what is called a fleet of EC2 instances. Amazon EC2 Auto Scaling fleet management ensures that your application is able to receive traffic and that the instances are working properly. When Amazon EC2 Auto Scaling detects a failed health check, it can replace the instance automatically.
Dictate Your Capacity with Auto Scaling Groups
With Amazon EC2 Auto Scaling, you can create collections of EC2 instances called Auto Scaling groups. You can specify the minimum, maximum, and desired number of EC2 instances in a group. Amazon EC2 Auto Scaling then ensures that your group will never go below or above the sizes that you have specified.
The group can then be treated as a single unit for you to manage.
Amazon EC2 Auto Scaling Options
Amazon EC2 Auto Scaling provides several ways to scale your Auto Scaling group.
|Maintain the current instance levels at all times
||Amazon EC2 Auto Scaling performs a periodic health check on running instances within the Auto Scaling group. If it finds an unhealthy instance, it terminates that instance and launches a new one.
||You manually change the maximum, minimum, or desired capacity, and Amazon EC2 Auto Scaling creates or terminates instances to maintain the updated capacity.
||Scaling actions are performed automatically based on a time and date you set.
||Using scaling policies, you define parameters that control the scaling process in response to changing conditions.
||AWS uses machine learning algorithms and dynamic scaling to adjust capacity based on trends and forecasts.
Control Resources with Dynamic Scaling
The dynamic scaling capabilities of Amazon EC2 Auto Scaling automatically increase or decrease capacity based on load or other metrics that you specify. For example, if your CPU utilization spikes above 80% and you have an alarm set up, Amazon EC2 Auto Scaling can add a new instance dynamically. You can also set a condition to remove instances in the same increments when CPU utilization is low.
Get More Efficiency with AWS Application Auto Scaling
AWS Application Auto Scaling is a separate service that provides application scaling across multiple AWS services, such as:
- Amazon EC2 Spot Fleets
- Amazon Elastic Container Service tasks
- Amazon DynamoDB tables and indexes
- Amazon Aurora read replicas
The Application Auto Scaling interface provides recommendations for how to optimize performance, costs, or balance between them. With AWS Application Auto Scaling, your applications have the right resources at the right time.
Both EC2 Auto Scaling and Application Auto Scaling are available at no additional charge. You pay only for the AWS resources needed to run your applications and any CloudWatch monitoring fees. You will learn more about Amazon CloudWatch in a later unit.
The next unit explores Elastic Load Balancing.