Microsoft offers several cost-saving opportunities with Azure pricing. Azure Reserved Instances, Azure Savings Plan, Azure Hybrid Benefit… all can help you save a pretty penny if you know what you’re doing. If you’re looking to cut costs with your Azure VMs, Spot VMs can be the way to go – but the risks can be just as high as the rewards. 

How do you help your FinOps organization save big – and improve your chances of avoiding a complete resource shutdown? Learn all the ins and outs of Azure Spot VMs below. 

What are Azure Spot VMs

 

Microsoft Azure Spot Virtual Machines: Your Complete Guide to Azure Spot VMs

Source: Microsoft

A Spot VM is a cloud server instance available for up to a 90% discount. Of course, with big discounts come big drawbacks. In this case, Azure has the right to evict – basically, it can make the VM unavailable and disrupt your Spot VMs with little to no notice. 

So, knowing that Spot VMs can be interrupted anytime, why would you ever want to use them? 

Applications that best run Spot VMs

 

Spot VMs can appeal if you’re running certain types of jobs that can stand to be interrupted. If you’re doing any of the following tasks, you might want to look into this opportunity: 

Test and development environments

Already using Azure DevOps? Then your test and dev enivronments are a great place to start. These are places where software developers can code and test new applications in a product environment that won’t impact the current status quo. Since these environments aren’t cheap, Spot VMs can be highly appealing. 

For example, let’s consider a hypothetical FinOps organization. Say this company wants to test new security measures that should offer extra comfort to clients, but this might introduce a horde of new bugs. The best way to ensure a smooth, glitch-free experience is through rigorous testing in a dev environment. Since the testing isn’t customer-facing, it can be done in a Spot VM space. 

Batch jobs

Batch jobs are automatic tasks typically processed in large groups – a.k.a. “batches”. Since these tasks usually have flexible start and end times, it doesn’t hurt the workload to be randomly paused or started. 

Retake our FinOps organization example. Say you’re running transactions toward the close of business. You might load up thousands to millions of transactions to validate and update an account. Spot VM instances can be a great place to do this. 

Fault-tolerant applications

Fault-tolerant applications can continue even after certain components fail due to special redundancy measures and failover mechanisms. 

Let’s say our FinOps company has multiple Azure SQL servers established through Azure Functions that focus on handling customer support. This means that requests will be automatically routed through the next available server, even if one server fails. 

New call-to-action

Why use Spot VMs?

 

Spot VMs can be wildly unpredictable. We’re talking like a 30-second eviction notice

Why does Azure do this? 

Like most major cloud providers, Azure has a lot of unused compute capacity on its platform. During low demand, it wants to sell that space to make a little extra cash. However, when the demand for compute resources increases, the first thing Azure is looking to cut is Spot VM instances. 

So, why risk it? 

The most apparent advantage of Spot VMs is the cost savings they offer. A 90% discount means you can put those dollars elsewhere. You can scale up workloads on your new Spot VMs. You can invest more elsewhere in your cloud environment, like beefing up your cloud forecasting tools or transitioning into GreenOps to save the real-world environment, not just the cloud environment. 

When your VM inevitably evicts you, you can handle that easily enough by having a metaphorical eviction policy that quickly and easily handles the lost VM, restarting your systems once you have available bandwidth again while maintaining your data and workloads.  

How much do Spot VMs cost

 

Spot VM prices vary depending on the following factors: 

  • OS/software type 
  • Region 
  • VM series type 

You can also sort Spot VM options by a minimum number of vCPUs/cores and RAM. 

Below is a sample table to give you an idea of the costs. The price breakdown shows a possible scenario for purchasing a Red Hat Enterprise Linux OS in the Eastern US region.

Instance vCPU(s)/Core(s) RAM Temporary storage Pay as you go Spot
A1 v2 1 2 GB 10 GB $41.90/month $14.31/month
66% savings
F1 1 2 GB 16 GB $46.79/month $14.90/month
68% savings
F1s $1 2 GB 4 GB $46.79/month $14.90/month
68% savings
DS1 v2 $1 3 GB 7 GB $63.80/month $16.96/month
73% savings
D1 v2 $1 3 GiB 50 GB $63.80/month $16.96/month
73% savings
DC1s v2 $1 4 GB 50 GB $80.59/month $18.99/month
76% savings
DC1s v3 1 8 GB N/A $80.59/month $18.99/month
76% savings
DC1ds v3 1 8 GiB 75 GiB $93.00/month $20.49/month
78% savings
B2pts v2 2 1 GiB N/A $27.16/month $22.88/month
16% savings
B2ats v2 2 1 GiB N/A $27.89/month $23.10/month
17% savings

Azure also has a Spot VM-specific pricing calculator that can help you weigh risk vs reward scenarios. 

David Drai

David is dedicated to helping companies uncover business insights with AI analytics, backed by a strong background in leading tech innovations.

Who should use Spot VMs?

Spot VMs are usually a solid choice if you’re an enterprise organization. You’ll typically have big testing environments or large workloads that can withstand the sudden start/stop pattern of Azure Spot VMs. 

But you can still use and benefit from Spot VMs even if you’re not handling enterprise-sized workloads. Organizations that manage experimental or testing environments are also ideal for Spot VMs since they have a high tolerance for random interruptions. 

Who shouldn’t use Spot VMs?

The real question is, who shouldn’t use Spot VMs? 

If your company purely runs monitoring software or web applications, Spot VMs aren’t the best choice since the risk of a sudden downtime ruining everything is too high. 

How do Azure Spot VMs work

 

As mentioned above, Spot VMs occur when Azure needs extra compute space to sell, so they’ll offer it for a steep discount. One key thing to remember (besides that Spot VMs can stop working anytime someone wants to pay full price) is that not all Spot VMs come with those 90% discounts.

Remember: Spot VMs have such steep discounts because Azure is trying to sell that space quickly. That means the more spare compute capacity Azure has for a certain VM, the bigger the savings (since they’ll want to sell that unused space faster). Savings can also vary depending on the VM configuration, compute capacity, or cloud region you’re shopping in. Different regions might have steeper discounts. 

Typical rates range between 75% to 90%, though sometimes savings can be as low as 30% or 40%. At that point, you’re better off using Reserved Instance types like we mentioned above.

How to deploy Azure Spot VMs

 

You have two options for deploying Spot VMS: a single Spot VM or a Spot VM Scale Set, also known as a group of Spot VMs. And don’t worry—Azure Spot VMs are as easy to deploy as Azure Machine Learning

Our guide below details how to do this from the Azure portal, but you can also use Azure CLI or Azure PowerShell or another method to start your Spot VM. You can refer to the Azure guidelines to learn more. 

Deploying Single Spot VMs

Start with creating VMs from the Azure portal since that’s the easiest way. You can do this by: 

  1. Go to “Virtual Machines” listed under “Services.” Select “Create”. 
  2. Fill out all necessary details in the “Create a virtual machine page”. Don’t forget to check the “Run the Azure Spot discount” box. 
  3. Select the “Eviction type” and “Eviction Policy” that works best for you. 
    1. For “Eviction type,” you can pick either “Capacity only” or “Pricing or capacity”. The former means your VM will only get evicted when Azure VMs are in high demand, forcing you to set a maximum price to pay for the Spot VM since that number can fluctuate. The latter lets you reduce that maximum price, and you’ll then get evicted either when Azure runs out of room, or the cost exceeds your set price point. 
    2. For “Eviction Policy,” you can either select “Deallocate” or “Delete.” Deleted means everything is permanently lost. Deallocated means the VM pauses but can be resumed. You’ll typically want to pick deallocated so you can pick up where you’ve left off, but if you’re worried about spiking Azure storage costs, deletion might be best. 

Deploying Virtual Machine Scale Sets (VMSS)

Creating Spot Virtual Machine Scale Sets (VMSS) is very similar to creating a single Spot VM. 

  1. Find Virtual Machine Scale Sets. 
  2. Follow the same steps as the Spot VM creation process. Make sure to know if what kind of Eviction type and Eviction Policy you want to go with! 
  3. With VMSS, you can also automate the kind of deployment and management types you want, so it’s easier to scale. For example, you can pick CPU usage or network traffic to help cap or bolster scaling or stick with the same maximum price and availability requirements offered by the single Spot VM setup. 

Azure Spot VMs vs. Reserved Instances

 

Spot VMs aren’t the only way you can spend on Azure spend. As mentioned above, Reserved Instances can sometimes be more appealing despite lower deals. Let’s explain why you might want to choose one deal over another. 

Spot VMs

You already know by this point that Spot VMs can help you save up to 90%. But Spot VMs also come with the steep drawback of a 30 second warning before eviction, and a fluctuating savings offering depending on availability. 

If you’re dealing with a flexible workload, Spot VMs will usually offer the better savings deal—so long as you’re prepared for unpredictability. 

Reserved instances

On the other hand, Reserved Instaces require a one—or three-year commitment. You can get a VM for a much lower cost than the on-demand Azure pricing, but you’ll have to be ready to use it for either one or three years. You don’t need to worry about eviction, but you’re offered no flexibility. 

If you know that you’ll have a steady amount of work for the next one or three years—and you don’t want to deal with the unpredictability of Spot VMS—Reserved Instances are probably the better option for you. 

How to optimize Azure Spot VMs

 

Here are our best practices to reduce the risk and increase the rewards of using Spot VMs: 

Set maximum VM prices

Microsoft Azure Spot Virtual Machines: Your Complete Guide to Azure Spot VMs

Source: Microsoft

As we mentioned above, setting a maximum price can prevent Azure from pulling a fast one on you by changing the Spot VM price when availability becomes less limited. You’ll get evicted from your VM, yes, but you’ll have much better control over your budget. 

Confirm available capacity

Since capacity can change depending on Azure customer demand, you’ll want to make sure the region and VM size you need are available for purchase. 

Get an interruption strategy 

Spot VMs can be interrupted at ainy time, so make sure you’re implementing strategies to address this, not just using workloads that can withstand frequent pauses. Consider using checkpointing to save work often done so you can pick up where you left off if abruptly stopped. 

Review previous evictions

Make sure to review historical eviction rates. While there is not guarantee of eviction rates matching past trends, this still gives you can idea of the interruptions you’ll have to work around so you know if you have workloads that are a good fit or not. 

Consider using Spot Priority Mix

Spot Priority Mix is a unique Azure feature that lets you combine standard and Spot VMs. This set up will allow you to automatically move Spot VM workloads when you get evicted to a standard VM. If you’re looking to run hundreds of VMs, you can use Spot Priority Mix, so you don’t have to worry about the risks of relying heavily on Spot VMs. 

Use Azure Backup

You can also keep your Azure Spot VM data secure by using Azure Backup. This means your data will remain 100% secure and recoverable no matter the eviction. 

Monitor, monitor, monitor

Our final pro tip for savings with Azure Spot VMs is that Spot pricing can change even after you’ve deployed a server. So even if you’ve captured a 90% discount rate, you’ll want to monitor accordingly because Azure can and will pull the rug out from under you and change that fee. 

Azure provides some tools to help you keep a pulse point on your fluctuating costs, but they can be limited in the amount of information provided as far as cost optimizations. If you’re really looking for the best way to save on Spot VMs, you’ll want to consider going third-party. 

Get complete visibility into your Azure Spot VM spend

 

To truly master the savings Azure Spot VMs offer, you’ll need far more than the monitoring tools Azure provides you. Going third-party is the only way to ensure your cloud resources are performing at maximum capacity at all times and not a penny has gone to waste. 

And the best news? You can stack up to 90% savings from Azure Spot VMs with up to 40% annual cloud spend savings offered by a cloud optimization tool like Anodot

Why go with Anodot? We’ll make sure a Spot VM eviction never catches you by surprise. Our AI-powered anomaly detection means you’ll be ready for anything. 

Anodot was made for demystifying cloud costs for FinOps organizations. Our real-time dashboards and customized alerts mean you can keep a 24/7 pulse on your spend not only with Azure and Spot VMs but also your entire multi-cloud experience. Our tools offer AI-powered feedback, which means you can start savings without ever having to dig into the data. 

Anodot’s dashboards capture all of your multicloud spend, with a specific focus on opportunities where you can save. So if you want to be thrifty with Azure Spot VMs, we’ve got your back. We’re here to ensure that you get the most lift for each dollar spent and get some of those dollars back to reconfigure your monthly budget. 

Want a proof of concept? Talk to us to learn how much you can save with Anodot’s tools.  

Written by Perry Tapiero

Perry Tapiero is an experienced marketer specializing in demand generation across diverse B2B verticals such as AdTech, FinTech, and Cyber. With a focus on driving revenue and growth, Perry excels in developing and executing effective Go-To-Market strategies.

linkedin

You'll believe it when you see it