Compute: EC2 Auto Scaling
Explore how EC2 Auto Scaling works and when it is beneficial. Understand how to set capacity headroom, manage cost versus usage, and use secondary features like replacing unhealthy instances. This lesson helps you decide if Auto Scaling fits your AWS compute needs for better cost management and reliability.
Amazon will tell you that Auto Scaling allows you to automatically add or remove EC2 instances based on the fluctuating demands of your application. This sounds great in theory, and while we’ve certainly seen that work successfully in a few places, it’s almost never useful except in very specific situations. You will almost never need to use the auto part of Auto Scaling for the reason it exists.
When to use Auto Scaling?
Let’s start by seeing how you should decide how many EC2 instances to run.
Capacity headroom
You obviously need to have enough instances to meet your expected peak demand. But you probably don’t want your capacity to exactly match the demand with no leeway. You will want to have some headroom too. This headroom is not waste—it will act as a safety buffer that can absorb many types of unpredictable events. For example:
- If an