EC2 RI – Everything you need to know before you purchase

A lot can be written about Reserved Instances (RI for short). In this article, I will attempt to give you the basics in a simple and clear way.

First of all, what is RI? To truly understand what RI is, we need to take a step back.

The payment options for AWS
  1. On-Demand – pay as needed. No commitments. Today you can use 1,000 servers and tomorrow it can only be 10 servers. You are charged for what you actually use. 
  2. Spot – Amazon sells its server Spot. This means Amazon sells its leftover server space that it has not been able to sell without the use of a data center. The server is the same server that they provide with the on-demand option. The significant difference is that Amazon can request the server back at 2 minutes notice (this can cause your services to have an interruption). On the other side, the price can reach a discount of up to 90%. In most cases, the chances of them asking for the servers back is very low (around 5%). 
  3. Reserved Instances (RI) – Simply put, you are committing to Amazon that you are going to use a particular server for a set period of time and in return for a commitment, Amazon will give you a discount that can reach as high as 75%.

So, in fact, RI is a discount you get for a specific use commitment.

One of the most confusing things about RI (as opposed to On-Demand and Spot) is that with RI you don’t buy a specific server but your on-demand servers still get the RI discounted rate. 

What is being committed

Let’s look at the parameters that affect the height of the RI premise:

  1. The period:
    • 1 year
    • 3 year
  2. The Payment option:
    • Full up-front
    • Partial up-front
    • No up-front (will charge 1st of each month)
  3. Offering Class:
    • Standard
    • Convertible

Of course, the longer the commitment, and the upfront payment is higher, the assumption that Amazon offers is more significant.

Ri compare
RI Compares for t2.2xlarge, Linux (taken from Pileus system)

Above illustrates different RI options with respect to on-demand and recommending a specific RI that is tailored to each customer’s specific needs.

In addition, when you purchase a RI, you are also committing to the following parameters:

  1. Platform (Operation system)
  2. Instance Type 
  3. Region

The RI is purchased for a specific region and at no point can the region be modified. 

To be clear, when we commit to Amazon on a particular server, we also have to commit to the operating system, region and, in some cases, instance size.

Usually, after a few months the RI usage has improved its on-demand price and after the break-even point, every minute of running is considered “free” in relation to on-demand. 

the break-even point for no-upfront RI, t2.2xlarge Linux (taken from Pileus system)
Standard or Convertible offering

With RI, we can choose if we want the Standard or Convertible offering class. This decision is based on how much flexibility we need. We can decide how long we are willing to commit to using the RI and we can choose both our form of payment and if we prefer to pay in advance.  

Obviously, the more committed you can be to Amazon (longer period, prepay, with less change options etc.) the greater the discount you will get. 

We still need to clarify the differences between Standard and Convertible. In the Offering Class Standard, you commit to specific servers while Convertible is a financial commitment. This means, you commit to spend X money during this time period and are more open to flexibility in terms of the type of server.

Below is a comparison from the AWS website about the differences between Convertible and Standard.

RI standard vs convertible
RI standard vs convertible

Now that we have a better understanding of what RI is, we need to understand how to know how much you should commit to Amazon and what kind of commitment meets your needs. 

As we know, we cannot predict the future, but we can make educated conclusions on the future based on our past activity.

It is also important to note that when you commit to RI, you must run the particular server 744 hours a month (assuming there are 31 days). The discount only applies per hour so if you were to run 744 servers in one hour, only one server will get the discount.

In addition, it can be difficult to understand how Amazon figures out the charge. For example, if at some point there are 6 servers running together, Amazon can decide to give each server 10 minutes of the RI rate and 50 minutes of standard on-demand rate. The decision which server gets the discounted rate is Amazon’s alone. 

If a particular account has multiple linked accounts, and the linked account that bought the RI did not utilize the RI at a given time, the RI discount can be applied to another linked account that is under the same payer account. 

RI Normalization factor

Recently Amazon introduced a special deal for RI running on the Linux operating system. The benefit is that you do not have to commit to the size of the server but rather only to the server type. So assuming I bought m5.large but actually used m5.xlarge, 50% of my server cost would be discounted.

The reverse is also true if I bought m5.xlarge but in practice, I ran m5.large it will get the discount (both servers will get the discount).

Amazon has created a table, which normalizes server sizes, and it allows you to commit to a number of server-type units rather than size.

RI Linux Normalization factor
RI Linux Normalization factor

In order to intelligently analyze which RI is best for you, it is necessary to take all the resources used, convert the sizes to a normalization factor and check how many servers were used every hour, keeping in mind that you will only get the discount for one hour of usage at a time. You also need to deduct RI that you have already purchased to avoid unnecessary additional RI purchases.  Additionally, there will be some of the instances where servers may not run in succession and there is a need to unite between different resources. Lastly, it is also possible that certain servers may run for hours but do not complete a full month. 

Despite the above complexity and the need to analyze all of these factors, the high discount obtained through RI, may still result in a significant reduction in costs.

Pileus’ algorithm takes all the above factors and data into account, converts the Normalization factor wherever possible, tracks 30 days of history, and uses its expertise to provide the optimal mix for each customer.

RI calculated history table after normalizing unit factor (taken from Pileus system)

Undoubtedly, RI is one of the most significant tools for reducing your cloud costs, by building the proper mix of services combined with an understanding of the level of commitment you can safety take on can reduce your cloud costs by tens of percent.