Compute: EC2 Auto Scaling

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.

svg viewer

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
...