Reserved Instances and where everyone gets it wrong
Tags: codeproject, technology, costsavings
Published: 2020-04-14 14:46:26

---
title: Reserved Instances and where everyone gets it wrong
published: true
date: 2020-04-14 09:00:00 UTC
tags: CodeProject,Technology,Cost Savings
canonical_url: 
---

So one of the most important things in cloud computing is cost management. I know just the thing we all went to school for, and learned to code for…spreadsheets! We all wanted to do cost projections, and figure out gross margin.

In all seriousness, cost management is an important part of build solutions in the cloud, because it ultimately goes to the sustainability and the ability to provide the best features possible for your solutions. The simple fact is no matter how you slice it, resources will always be a factor.

Reserved Instances are a common offering for every cloud provider. And honestly they are the best option to easily save money in the cloud and do so in a way that empowers you to grow as your solution does and save money along the way.

Now to that end, there are some serious misconceptions about Reserved instances, that I wanted to share. And these specifically relate to the Azure version of Reserved instances.

### Misconception 1 – Reserved Instances are attached to a specific VM.

This is the number one misconception. The question of “dow do I apply the RI I just purchased to a VM xyz?” The answer is “you don’t”, Reserved Instance pricing is actually a pre-purchase of compute hours for a specific sku. So there is no process by which you attach the RI to a specific VM.

Let’s take an example to understand the implementation of this a little more:

- I have 5x DS2v2’s running, which are costing me $170.82 each for a total of $854.10. Now I’ve decided to do a 1 year RI, to bring about a 29% savings bringing my per vm costs to $121.25, and a total of $606.23.  
- I go through the portal, and purchase 5x 1-Year Reserved Instances for DS2v2, to get this cost savings.  

And that’s it, I’m done. It really is that simple, at the end of the day. Now what’s happening behind the scenes is that I have prepurchased 3,650 hours of Compute time at that lower price. So when my bill is calculated, the first 3,650 will be at the lower price, and I don’t need to worry about which VMs its attached to. I just know that I’m paying less for the first 3,650 hours.

So the next logical question is, what happens if I have 6 VMs? The math works out like this.

- The normal PAYG rate is $170.82 which comes to ~ $0.234 per hour.  
- I purchased 5x DS2v2’s at the lower rate ($121.25), which means the hourly rate is ~ $0.167 per hour.  
- I’ve got 6x DS2v2’s running currently within the scope of the RI. So that means that ultimately in 1 month (assuming 730 hours in the month), I am consuming 4,380 compute hours.

What that means is that this is how the pricing breaks out:

| Number of Hours | With RI | PAYG Rate | Total Cost |
| 3,650 | $0.167 | | $606.23 |
| 730 | | $0.234 | $170.82 |
| Total | | | $777.05 |

So what this means is any overage about the RI is just simply billed at the PAYG rate, which means you have the result you are looking for.

But this also buys you a lot of flexibility, you gain the ability to add VMs, and delete VMs and as long as at the end the hours are the same it doesn’t matter. This gives you a lot of power to get the maximum amount of savings without having to go through a lot of headaches.

### Misconception 2 – We can’t use RI because its cost money up front.

This is another miss conception, because it is 100% not true. You can sign up for monthly payments on your RI, which removes all the risk for you ultimately. You can get the discount and pay the monthly amount without having to pay a large lump sum up front. Here’s a [link](https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/prepare-buy-reservation#buy-reservations-with-monthly-payments)on how to do so.

Now the most common question I get with this is “Kevin, how is this different than PAYG?” The answer is this, what’s happening is the amount is calculated the same as the upfront cost, and then broken up into a monthly charge. That charge for those compute hours will be divided evenly over the period (1-year or 3-year). Now where the difference happens is RI is use it or lose it.

Take the following scenario:

- I have 5x DS2v2, with a one year reservation, meaning I’m paying $121.25 a month for each of them. The total being $606.23 a month, spread out over 12 months.
- If I delete 2 of those VMs, and don’t provision any more, and don’t modify my reservation, my bill for the month will be $606.23. It is use it or lose it, the hours do not roll over to the next month, and I would have paid $242.50 for nothing.  

Now if I created new VMs, no problem, or if I exchanged the RI, also not a problem. But its important to know that I can get the benefit of paying monthly, and provided I make sure they are managed properly, I’ll have no problems and get the full benefit of the discount.

Also worth mentioning here, there is no difference to the discount if you pay upfront, or monthly, the discount is 100% the same.

### Misconception 3 – I can’t change it after I buy.

This is definitely one of the most common misconceptions I see out there. You absolutely can swap / exchange reservation as your requirements and needs change. And this allows you to change the size of a VM or service to meet your needs, without losing money. Here’s a [link](https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/manage-reserved-vm-instance)on how to manage your reservations. And here’s a [link](https://docs.microsoft.com/en-us/azure/cost-management-billing/reservations/exchange-and-refund-azure-reservations)on self-service exchanges and refunds.

There is a lot of detail in the links above, and its pretty self-explanatory. So please review these policies but the end story is that you are not locked in and committed to paying some huge amount of money if you change your mind.

Ultimately, that also means that you don’t need to wait as long to gain the benefits of this program. Its definitely something you should take advantage of as soon as you can.

### Misconception 4 – I can’t use RI because I use PaaS Services in my solution.

Another huge misconception, the RI program from Microsoft is changing all the time and new services are being added constantly. The services at the time of this post included with RI offerings are:

- App Service
- Azure Redis Cache
- Cosmos
- Database for MariaDB
- Database for PostgreSQL
- Databricks
- Dedicated Hosts
- Disk Storage
- Storage
- SQL Database
- SQL Warehouse
- Virtual Machines

Which is a pretty broad group of services and new services are lighting up every day.

### Misconception 5 – RI isn’t worth it.

I never understood this, given that I can pay monthly, exchange or get a refund, cover VMs and a whole bunch of other services…And get usually between 25-30% (RI 1-year) or 40-50% (RI 3-year) off my bill. Just because I decide to. This is absolutely the first thing you should look at when you are looking to cut your cloud hosting costs.

### Final Thoughts

I hope that clears up some concerns and thoughts about your Azure Costs and how to potentially manage your bill to ensure that you can provide your solutions to their end customers in a cost effective manner.