What is cheaper than a reserved instance on AWS? How about not running an instance in the first place?
AWS announced a new reserved instance model, designed to save you up to 63% per instance. Most small and mid-sized companies aren’t going to commit for 3 years, so we are looking at something closer to 40% savings. That’s a good start.
However, chances are you are over provisioning - running more and/or larger EC2 instances than you actually need. Let me illustrate this with a few charts. Suppose the traffic to your site follows the usual wave.
Here you run enough EC2 instances to cover the load, plus 10% or so for spikes. To illustrate the point even more, lets say the above is your usual load, but during the holiday period, that load almost triples. Now your server count might look like this:
Look at that area on top. That is a lot of compute capacity being sitting idle for long periods of time. Saving 40% doesn’t help much when using 70% more than you need to.
This is classic over provisioning, and exactly what we did in the old days of static data centers. Those days are over. This is how it should look.
By using Auto Scaling groups, you can eliminate 70% of your costs, without purchasing a single Reserved Instance. Of course YMMV, but any way you slice it, AWS can’t charge you for something you aren’t using. **
Some argue their traffic isn’t big enough to use auto scaling. Perhaps they are masking that by choosing instance types that are far larger than they actually need. The smallest unit to consider when selecting an instance type is the trough of the graph, not the peak. Choose a smaller instance type, save money, and scale out during the daily load.
This is the era of cloud native applications. Companies like Netflix (a top 5 AWS account) have been using Auto Scaling Groups in their microservices architecture for over 5 years. In fact, they have a tool called Conformity Monkey that sends nasty emails to employees who launch EC2 instances outside of ASGs, and terminates them after a few days. How’s that for following best practices?
** Actually, the new RI model is just like the Heavy Utilization ones in the previous model - you pay whether you use them or not, making ASGs even more relevant.