Let’s look at the third way to save money in Amazon Web Services: AWS Auto Scaling groups.
If you prefer, check out the video version of this post:
How do AWS Auto Scaling Groups Work?
In an Auto Scaling group, you can scale the number of instances up or down automatically. To the right is a diagram of a very simple web application that leverages several web servers, which is sitting behind an elastic load balancer.
When setting up Auto Scaling groups, you provide a launch configuration, which consists of one or more AMIs. You also set the minimum, desired, and maximum number of instances you want to run in this group. In this example, this group has the minimum set to 2 nodes, the desired at 4, and the maximum at 10 nodes. Right now, it’s running at the desired number of nodes.
Additionally, you provide metrics, which could be based on CPU, disc I/O, or schedule, for example. Then, you set a threshhold for this group to scale up, or when it’s not being used to scale down automatically. You specify this in the number of nodes or in the percentage of the cluster you want to run.
The interesting thing about Auto Scaling groups is that they leverage all purchasing options, making them quite flexible. You can use Auto Scaling groups with On Demand instances (although you don’t how many of those are backed up by Reserved Instances), and you can use them with Spot Instances.
They can be used to keep costs down while providing the ability to quickly scale up and meet demand. For example, Amazon.com and other web commerce providers need to scale up quickly during the holiday season. They can also be used to improve fault tolerance for applications.
Where are Auto Scaling Groups Best Used?
While they can help save money in both production and non-production environments, the amount of savings is hard to pin down because it depends heavily on what types of instances or purchasing options they’re using, how many nodes you have, your configuration, and the policies and roles in place. With so much variability, I’m not going to attempt to estimate the savings.
That said, the best use for Auto Scaling groups in production is in conjunction with On Demand instances that match Reserved Instances you’ve bought. For non-production, it’s with already-inexpensive Spot Instances to achieve maximum savings.
In the next post, we’ll talk about in-house scripting.