AWS offers many different pricing models for EC2, including Spot Instances and Reserved Instances (RIs).
Spot Instances offer up to 90% discount but carry the risk of interruption. On the other hand, Reserved Instances offer up to 72% decreased rates with high availability, but long commitment periods.
In this article, we look the differences between Spot Instances vs. Reserved Instances and when you should use each.
What Are Spot Instances?
Spot Instances involve bidding on excess or unused capacity available with AWS, and paying only for the compute you use. While Spot Instance prices fluctuate based on the supply and demand of the current market, the prices are usually less than On-Demand and Reserved Instances. With Spot, you can get up to 90% off with no required long-term commitment.
However, there is a catch: AWS can terminate Spot instances at any time a 2-minute notice period. This happens when the capacity demand increases or your bid for the Spot instance gets outbid.
When AWS wants to reclaim a Spot Instance, it will send a two-minute warning through CloudWatch Events and instance metadata. You can use these two minutes to save the application state, upload log files, or drain any presently running containers.
Spot Instances are often suitable for workloads that are fault-tolerant, stateless, non-critical, and/or flexible since these instances can get interrupted easily without much notice. Some examples include batch processing, testing, or development.
Source: AWS
Advantages And Disadvantages of Spot Instances
Advantages
- Discounts: Spot Instances can cost up to 90% less than On-Demand instances since they don’t require a long-term commitment. For developers keen on keeping cloud costs down, Spot Instances can be an excellent place to start.
- Flexibility: Once you have bid on a Spot Instance, you can get it up and running right away. And when you no longer need the Spot Instance, you can shut it down.
Disadvantages
- Quick terminations with little notice: Because Spot Instances can terminate at any time, there may be an added layer of complexity in architecting applications to handle interruptions.
- No fixed pricing: The pricing for Spot Instances can vary based on demand, so it might be challenging to predict how much you will have to pay.
What Are Reserved Instances?
Reserved Instances allow you to reserve a specific amount of computing capacity for a fixed time period, which is usually one or three years. Since you commit to a long-time contract, you can get up to 72% discount on monthly or hourly rates, as compared to On-Demand.
When Reserved Instances are assigned to a particular availability zone, they reserve the capacity for that zone only. Reserving the capacity means you can launch the instances whenever required.
If you are committing to a RI for one or three years, make sure that you will be utilizing its complete capacity for the entire period of time to optimize cloud costs.
Reserved Instances are more suitable for workloads with a steady and predictable demand, like databases and web servers.
Source: AWS
There are two types of Reserved Instances available:
Standard RIs: They are usually used in workloads that have little to no variation in performance over the period of several months or years. With standard RIs, you can modify the scope, availability zone, instance size, and networking type of the reserved instances. You can also sell them on the Reserved Instance Marketplace in some cases.
Convertible RIs: They are used for workloads that require flexibility in terms of changing operating systems or instance families. Note that you cannot sell them in the Reserved Instance Marketplace.
Advantages And Disadvantages of Reserved Instances
Advantages
- Heavy discounts: Reserved instances charge 72% less than On-Demand instances.
- No fee surprises: The prices of RIs are locked during the one or three-year commitment period. You will always know exactly what you will be charged and won’t have to deal with any sudden cost fluctuations.
Disadvantages
- Less flexibility to reduce costs: Once you have committed to Reserved Instances, you will continue paying for them for the entirety of the period, even if your usage goes down.
- It’s easy to over-commit: RIs operate on an hourly use-it-or-lose-it basis, meaning that you might be paying for capacity you don’t always need.
The Ultimate Guide to AWS Commitments
Spot Instances Vs Reserved Instances: The Primary Differences
Feature | Spot Instances | Reserved Instances |
Pricing model | Prices vary based on the current supply and demand of the Spot market | Prices are fixed for one-year or three-year commitment |
Discounts | Prices are up to 90% less than On-Demand instances | Prices up to 72% less than On-Demand instances |
Availability of instances | Availability varies and depends on the Spot market | Available all the time since capacity is reserved |
Risk of interruption | Instances can get interrupted with two minutes of notice | No interruption risks |
Flexibility | Highly flexible with no long-term commitment | Decreased flexibility due to commitments for one or three years |
Ideal for | Flexible, fault-tolerant and noncritical workloads | Predicticable workloads |
How Can nOps Compute Copilot Help You Save?
nOps Compute Copilot constantly manages the scheduling and scaling of your workloads for the best price and stability. Here are a few of the benefits:
Optimize your RI, SP and Spot automatically for 50%+ savings — Copilot analyzes your organizational usage and market pricing to ensure you’re always on the best options.
Reliably run business-critical workloads on Spot. Our ML model predicts Spot terminations 60 minutes in advance.
All-in-one solution — get all the essential cloud cost optimization features (cost allocation, reporting, scheduling, rightsizing, & more)
Copilot is entrusted with over one billion dollars of cloud spend. Join our satisfied customers who recently named us #1 in G2’s cloud cost management category by booking a demo today