Skip to main content

Many find Amazon Web Services (AWS) EC2 Reserved Instances (RIs) to be offputtingly complex, and some users avoid them as a result. Massive cost savings of up to 40% are possible using RIs, so they should be utilised as often as possible.

The range of options for RIs is now so vast as to be bewildering to the newcomer. This short post aims to give the reader some simple criteria to pick the best RIs. It does not aim to cover every single option in detail; for that you have the AWS docs.

Establishing your values

RIs can be selected along many vectors, so instead of breaking those down in detail at the outset, it’s better to begin by thinking about what you already know about – your organisation and its values.

Consider where your organisation fits along the following 3 axes:

1. Accounting: Fiscal Predictability vs Overall cost savings

Do you need a certain amount of dollars in the bank at all times to impress potential investors? Or, are you a cash-based organisation who can spend big up-front to make savings later?

2. Predictability: Flexibility vs Cost savings

Are you a young startup constantly changing your requirements, or are you an established enterprise? How reliably can you predict your usage?

3. Technical: Constant capacity vs Dynamic capacity

Does your product sit on a cluster of servers that rarely changes? Or, do you have autoscaling?

Erasing a couple of RI myths

Before we carry on, there are a couple of common misconceptions about RIs.

A reserved instance is not tied to a particular EC2 instance. Think of it as a slot, and any of your running instances can fill that slot. So, even if you have autoscaling or immutable deployments that burn servers on every deploy, you can still take advantage of RIs.

If you get it ‘wrong’ or overprovision it’s not the end of the world. You can sell on unused RIs on the Amazon Marketplace.

Applying your values

With these values established, let’s figure out a simple profile that will work for you!

1. Accounting: Fiscal Predictability vs Overall cost savings

If your accounting model relies on steady, consistent monthly reports, then paying no upfront is the option for you.

If, however, you have money in the bank, paying all upfront will cost more initially but save you more money in the long run.

Remember, both options are cheaper than not using RIs!

2. Predictability: Flexibility vs Cost savings

You have two considerations here:

  1. Convertible or standard
  2. 1 year or 3 years

The more inflexible you’re willing to be, the more you’ll save.

Convertible instances are a bit complex, but they can be exchanged easily if you find them to be unsuitable.

3. Technical: Constant capacity vs Dynamic capacity

If you’re running a constant provisioned capacity environment, you can reserve at region scope. This is simpler that reserving in Availability Zones, easier to manage, all round less hassle.

If, however, instances are going to be destroyed and dynamically built, you should look at reserving capacity. Think of it like saying “hey Amazon I’m going to need you to keep this slot open for me for whenever I want to put an instance in it”.

How much of my capacity should I reserve?

Hopefully by this point you’ve got an idea of what you’d like to reserve. How much of your capacity you should reserve depends on your application’s nature: is it autoscaling or static?
At Bipsync, our internal build cluster is an autoscaling environment. We aim to reserve about 80% of our average capacity for this. We’re trying to be efficient but we’re not wanting to reserve capacity we won’t regularly need.
Most of our customers, however, have static clusters of a fixed size (although we have an autoscaling option available). For these clusters, we aim to reserve about 95% of our capacity. We do not reserve capacity for trial installations as we won’t want to count our chickens before they’ve hatched!
Here are some rough guidelines, you’ll have to adjust them to your business:

Analysing your needs

AWS Cost Explorer RI Coverage

This is a great way to calculate your needs. In this example, we can see that an account’s RI Coverage has been dipping. AWS will show you on this screen how much money you could save with RIs, and it can be a surprising amount!

AWS Cost

 

AWS Trusted Advisor

The Cost Optimization screen on AWS Trusted Advisor has a section “Amazon EC2 Reserved Instances Optimization”. This will tell you what recommendations AWS’s robots are making for you to reserve instances. It’s usually a pretty good guide.

AWS Cost Calculator

There’s no substitute for cold, hard figures! AWS’s cost calculator allows you to determine the cost of various options.

AWS Support

If you’re still confused, AWS Support are very helpful!

A caution against diminishing returns

For most of us, we don’t want to spend forever optimising costs, we just want to get that sweet zone before the return on investment of reserving capacity starts to diminish and waste accrues:

Review regularly

Review your costs on a regular basis. You can even set up alerts in AWS if your RI coverage goes below a given threshold.