Table Of Contents
What Are On-Demand Instances? What Are Spot Instances? What Are The Difference Between Spot Instances and On-Demand Instances? Should You Use On-Demand Or Spot Instances? Best Practices To Save Costs With Spot Instances And Prevent Interruptions How To Manage And Optimize Instance Costs

Whether you’re in finance or engineering, you know keeping your customers happy is the key to success. That means, your SaaS product or service needs to be available, reliable, and cost-effective virtually all the time.

On that note, you can determine how stable and high-performing your service is depending on whether you use On-Demand or Spot Instances. Pricing, capacity, and flexibility will also vary depending on which of the two instances you choose.

In this guide, we’ll break down how On-Demand and Spot Instances differ, when to use each, and:

Table Of Contents

What Are On-Demand Instances?

An On-Demand Instance refers to compute capacity that’s available for purchase and deployment as and when needed. Also, On-Demand Instances enable you to start, stop, reboot, pause, hibernate, or terminate an instance or virtual server whenever you choose.

On-Demand Instances have the following characteristics:

  • You can increase or decrease capacity as and when needed, and virtually instantly.
  • They become available for deployment immediately after you purchase them.
  • Billing is per second or hour (with a 60-second minimum usage requirement).
  • You pay for only the seconds your instances are in running state.
  • No long-term usage commitments are required.
  • No utilization contracts are required.
  • There is a fixed price per second for On-Demand Instances, although exact prices are different across different instance types.
  • There are On-Demand Instance quotas, which are measured by the number of vCPUs your running On-Demand Instances are running. You can request the cloud provider to increase your quota.

You may have already noticed that On-Demand Instances deliver flexibility and scalability as you go. And there are more benefits to using On-Demand Instances.

What are the pros of On-Demand Instances?

Using On-Demand Instances has several more advantages, including:

  • Instant scalability – You can purchase more compute capacity to meet real-time usage requirements, helping you handle the increased load.
  • Control – You can decrease usage during off-peak hours to minimize unnecessary costs.
  • More flexibility – Since you’re not bound by a usage contract, you’re free to increase, decrease, or terminate usage whenever you like without incurring penalties.
  • Unlimited capacity – There is virtually no limit to the number of On-Demand Instances you can purchase at any time — provided you do not exceed your account’s quota.
  • Reliability – When you purchase an On-Demand Instance, it is yours until you cancel it.
  • Increased options – On-Demand Instances are capable of running most types of compute workloads.

Yet, On-Demand Instances are not perfect, and here’s why.

What are the cons of On-Demand Instances?

The flexibility and scalability that On-Demand Instances deliver come at a price, including:

  • More expensive – Prices of On-Demand Instances tend to be higher than those for Reserved and Spot Instances. If you are an AWS customer, check out our guide to Amazon EC2 On-Demand pricing here.
  • Wastage is quite likely – Many organizations tend to overprovision On-Demand capacity when not sure how much capacity they actually need for a particular use case, leading to increased cost.
  • On-Demand pricing can be confusing – Prices vary by region, availability zone, and by instance type and size. Read our guide to AWS vs Azure pricing here for a snackable breakdown.

That said, On-Demand Instances are more suitable to some applications than others, and here’s what that means.

When to use On-Demand Instances

An On-Demand Instance is ideal for workloads that require uninterrupted compute power. In addition, you can use On-Demand Instances for short-term tasks you’re not sure how long or how much compute power they’ll require, like testing and deployments.

The Cloud Cost Playbook

What Are Spot Instances?

A Spot Instance is a type of compute capacity that a cloud service provider offers at a steep discount whenever it has excess compute capacity. Yet, you can only purchase Spot Instances if they are available in your desired region and availability zone.

Additional Spot Instance features include:

  • Spot Instance prices can be as low as 90% off the price of On-Demand Instances.
  • Hourly pricing for a Spot Instance is not fixed. It depends on the long-term supply of your cloud provider’s compute capacity.
  • You bid for Spot Instances, so you are not assured to get them.
  • Spot Instances run whenever capacity is available.
  • A cloud provider can request back spot instance capacity with a 30-120-second notice.

Considering these main features already suggests some of the benefits of running Spot Instances.

What are the pros of Spot Instances?

The top advantages of using Spot Instances include:

  • Cost optimization – Spot Instances are the cheapest type of cloud compute available, which can help reduce your running costs.
  • Flexibility – You can purchase, use, and cancel Spot Instances pretty quickly and as your needs change.

Yet, the heavy discount does come with a few trade-offs you’ll certainly want to consider.

What are the cons of Spot Instance?

Spot Instances come with several drawbacks, which if overlooked can have serious consequences.

  • A moment’s notice – Whenever other customers require more On-Demand capacity, the cloud provider can take back spot capacity at short notice.
  • The risk of service outages – If this notice expires before you redistribute your workload, your service could crash, making it unavailable to customers.
  • Rather unreliable instances – These instances are generally not suitable for business-critical applications that can’t be switched to other instances at short notice.

The advantages and disadvantages of Spot Instances make this instance type ideal for some use cases.

When to use Spot Instances

Spot Instances are ideal for short-term use cases that could use cheaper instances but can handle sudden disruptions, such as batch processing, data analysis, and optional tasks.

What Are The Difference Between Spot Instances and On-Demand Instances?

On-Demand and Spot Instances differ in pricing, purchasing method, best use cases, and more. A quick way to see the key differences between Spot and On-Demand Instances is with a side-by-side comparison, like this:

 

On-Demand Instances

Spot Instances

Purchase

Buy directly for the capacity you need, when you need it

Bid and wait to see if your proposed Spot price wins

Launching

Only possible if the Spot Instance request is active and excess capacity is available

Immediately available after a manual request and capacity is available

Availability

Limited and unstable

Virtually unlimited

Hourly pricing

Fixed

Changes according to capacity demand and supply

Reliability

Stable and under your control

The vendor may take back Spot Instance capacity at short notice, causing disruptions

Recommended use case

Short-term workloads to keep costs low

When you are uncertain of how much compute power is required

Short-term workloads that can handle sudden interruptions

When sure how much compute power you need for a specific use case

A table overview of the major differences between Spot Instances vs On-Demand Instances.

5 major differences between On-Demand and Spot Instances

To help you more accurately decide which instance option to choose, here’s a deeper dive into Spot Instances versus On-Demand Instances.

1. Commitment

When you use On-Demand Instances, you are not committed to a cloud service provider, such as AWS, Azure, or Google Cloud Platform. You get to buy, use, and stop your On-Demand Instances whenever you want and pay as you go. No contracts or upfront payments are required either.

Spot Instances work the other way around. Cloud providers do not fully commit compute capacity to you. The cloud provider can take back Spot Instances with just a 2-minute notice.

Plus, Spot Instances aren’t covered by the 99.99% uptime/availability SLAs. However, when available, Spot Instances can offer between 50% and 90% savings off the On-Demand rate.

2. Capacity availability

Cloud providers maintain excess compute capacity in their systems to accommodate any concurrent requests from existing or new customers. On-Demand Instances get priority over Spot-instances, meaning their capacity is virtually limitless.

Cloud providers then sell their excess capacity in the Spot market for a huge discount after serving On-Demand requests. So, Spot Instance capacity increases and decreases based on this demand and supply cycle.

3. Purchasing process

Purchasing Spot Instances requires bidding for them (in $ per instance per hour), much like an auction. You pay the market price (known as the Spot price in AWS).

If the market price of the instance is below your bid price, you’ll get it at the market price. So, instead of paying the price you bid on, you pay the lower market price.

You launch a Spot Instance in a similar way to an On-Demand Instance. Note that a Spot Instance can only be launched when its request is active and capacity is available.

To get On-Demand Instances, you make a manual request through your account, and if the capacity is available, will launch immediately. And if there is insufficient capacity at the time you make a launch request, you’ll get an insufficient capacity error (ICE).

The hourly price of an On-Demand Instance is fixed. The cloud provider’s compute service, such as Amazon EC2, sets this static price on a per-second or hourly basis.

4. User-control

On-Demand Instances offer far more control than Spot Instances. For example, you determine how much On-Demand capacity to purchase and when to start, pause, hibernate, stop, reboot, or terminate the instance.

Once you purchase and launch an On-Demand Instance, you decide what to do with it until you cancel it.

With a Spot Instance, you are not in control of how much capacity is available or allocated to you — or when to have it. You make a request and wait for your bidding price to return a win response. However, you can start and stop Spot Instances that are backed by Amazon EBS. Otherwise, they are out of your hands.

Something else. As demand from other customers to use On-Demand Instances increases (remember the demand and supply we talked about?), Spot Instance availability shrinks, as the cloud provider reassigns them.

The compute service will usually send you a rebalance recommendation, followed by a 2-minute notice before it recalls an instance. A rebalance recommendation is the signal Amazon EC2 emits when a running Spot Instance is at a high risk of interruption.

The goal is often to prompt you to rebalance your workload among your more reliable instances before the recalled ones become unavailable, ensuring service availability.

5. Pricing for On-Demand vs Spot Instances

This is by far the most obvious difference between Spot Instances and On-Demand Instances. Spot Instances offer up to 90% off the On-Demand rate, making them the most affordable type of cloud instance. It is for this reason that Spot Instances feature prominently in most cloud cost optimization strategies as discount tools.

Yet, exactly how much discount you’ll get depends on how much excess capacity your cloud provider has available — and is willing to auction off at the time you request it.

These are the most significant differences between On-Demand and Spot Instances. So, when should you use each type?

Should You Use On-Demand Or Spot Instances?

By now, you’ve seen the pros and cons of Spot Instances versus On-Demand Instances. The two approaches to instance usage have different ideal use cases.

Picture this. Using Spot Instances is like a game of chance. You can get a great deal, but the unpredictability adds a layer of risk. Whereas, using On-Demand Instances is like a steady paycheck – you know what you’ll get every month, but it’s more expensive in the long run.

Still, you can use On-Demand Instances when you want to:

  • Be able to handle unpredictable workloads, such as a code deployment you’ve never done before
  • Run workloads with unknown compute power requirements, such as new applications or processes
  • Run short-term workloads that cannot be interrupted until they are complete, such as testing a new release
  • Launch and run operations almost immediately

Use Spot Instances when you want to:

  • Operate workloads that can retain their data even after interruptions
  • Run data analytics processes
  • Launch and scale temporary CI/CD processes
  • Run stateful applications in bursts of increased usage

Best Practices To Save Costs With Spot Instances And Prevent Interruptions

Several best practices can help you reduce the risk of Spot Instance interruptions negatively impacting your service availability.

1. Avoid using Spot Instances for business-critical workloads that are not fault-tolerant

You don’t want Spot capacity recalls catching your workload by surprise, which may cause service outages.

Also, you can learn more about Spot Instance quotas, like how many Spot Instances you can run and how to increase your limit, on the official service provider’s pages; these details tend to change over time.

2. Use a Spot Instance orchestration tool to automatically rebalance the affected workloads.

Xosphere does this seamlessly, for example. It scans your workload requirements and compares them with Spot Instance availability at a reasonable price. As soon as the cheaper instances become available, Xosphere automatically switches your workload to them.

Xosphere

As soon as the spot price becomes unfavorable, the tool rebalances your workload to On-Demand Instances, ensuring that your service remains uninterrupted.

3. Use Spot Instances alongside more reliable instances

The major cloud providers offer other discounted instances, such as Savings Plans and Reserved Instances (RIs). In addition to committed use discounts up to 72%, SPs and RIs provide service level agreements such as 99.99% availability assurances. With these alternative instances, you can avoid service interruptions while reducing your operational costs.

However, SPs and RIs require you to commit to spending a certain amount per instance per hour (SPs) and a fixed resource usage level per hour (RIs) for a specified period of time (1 or 3 years).

4. Use Spot Instances alongside On-Demand Instances

But perhaps you are not ready to sign a long-term usage contract. In that case, you can combine Spot and On-Demand Instances to maintain your flexibility.

This way, you can use either instance type for short-term jobs, unpredictable use cases, or optional workloads — compared to using RIs for predictable, long-term applications.

How To Manage And Optimize Instance Costs

Here is the thing. It’s unlikely you’ll be able to maximize the benefits of On-Demand and Spot Instances unless you know precisely how much resources you consume in the cloud, which areas drive your cloud bill, and when to use them. Now, picture this:

Dashboard

With CloudZero, you can dramatically increase your visibility into cloud resource usage and associated costs. We are talking about being able to:

  • See your costs per unit, such as cost per individual customer, per software feature, per product, per project, per team, etc. Using this cost intelligence, you can calculate how much to charge for your service to protect your margins.
  • View your cost of goods sold (COGS) to determine if you are running a profitable business and where you could lower costs without compromising customer experiences.
  • Collect, analyze, and report on tagged, untagged, and untaggable resources — yes, no endless tagging is required.
  • View the costs of specific tenants in a multi-tenant environment, so you can tell how much to charge them individually based on their own usage – including offering personalized discounts.
  • Use CloudZero’s real-time anomaly detection and receive alerts when costs are trending abnormally so you can prevent overspend.
  • Track your AWS, Azure, and GCP costs in one place to simplify analysis. Plus, you can analyze costs from other services, including Snowflake, Kubernetes, Datadog, and Databricks in CloudZero.

We recently used CloudZero to find $1.7 million of annualized savings. Drift even reduced annual costs by over $2.4 million. Want to see how for yourself? to get started.

The Cloud Cost Playbook

The step-by-step guide to cost maturity

The Cloud Cost Playbook cover