Azure Spot Instances – How to Use in Production

Reading Time: 4 minutes

If you are running compute workloads in Azure and wondering how you can dramatically reduce costs and minimize infrastructure management all without affecting availability and performance, keep on reading. Back in May Azure introduced a new pricing model, called Azure Spot VMs (aka spot instances), providing up to 90% cost savings in comparison to the pay-as-you-go pricing. However, these spot VMs represent Azure’s excess compute capacity and in exchange for rock-bottom pricing, Azure can take back these VMs with limited notice, making them a challenge to use for production and other fault-sensitive workloads.   

To remedy this, Spot by NetApp has released a new version of Elastigroup, allowing cloud users to run even mission-critical workloads on Azure Spot VMs (in addition to AWS EC2 spot instances and Google Preemptible VMs) with enterprise-level SLAs for high availability. 

In this article you will learn about:

Azure’s compute pricing models 

Similar to AWS and Google Cloud, Azure offers 3 primary ways to pay for cloud computing: 

Pay-as-you-go 

This option allows you to spin VMs up and down at will, only paying for what you actually use, by the second, without any commitment.  

Reserved VMs 

This pricing model delivers up to 72% cost discounts compared to pay-as-you-go pricing in exchange for either a 1- or 3-year commitment. While the discount is attractive, for dynamic environments, a financial commitment of this length might not be ideal. For more information, see this brief but in-depth overview of Azure’s reserved pricing model. 

Azure Spot VMs 

All public cloud providers need to have some excess compute capacity, commonly referred to as spot instances, to service any surges in demand. To offset the financial loss of idle resources, AWS, Azure and Google Cloud all offer access to this excess compute at greatly reduced pricing. However, the drawbacks include that pricing for spot instances fluctuates based on supply and demand with the result being that workloads can be evicted any time, and in the case of Azure Spot VMs, with just a 30 second notification. Fortunately, as we will see shortly, Elastigroup is able to predict these evictions, gracefully drain the workload and move it to another spot or pay-as-you-go VM, thereby avoiding any interruption or performance impact.  

Azure Spot VMs and Azure’s Low Priority VMs 

Azure Spot VMs are an evolution of Azure’s low-priority VMs, but differ in that pricing can vary and an optional maximum price can be set when allocating spot VMs. Moreover, with low priority VMs, whether you wanted to spin up a single VM or prepare for autoscaling, you needed to create a scaleset per instance type and size. With spot VMs, you can simply provision a single VM of any type or size. 

Azure is gradually moving customers away from low-priority VMs, but still does support them wherever needed. 

Advanced autoscaling with Spot by NetApp’s Elastigroup 

Elastigroup is Spot by NetApp’s SaaS offering that helps public cloud customers reduce their infrastructure management overhead while reducing costs by utilizing low-cost, yet volatile spot instances for even production workloads. Elastigroup’s advanced autoscaling for Azure ensures your clusters are highly available, always healthy and extremely affordable (up to 90% less expensive than running on-demand or pay-as-you-go). This is accomplished with Elastigroup leveraging proprietary, predictive algorithms that consider both current spot market activity and historical trends 

Seamless scaling across optimal pricing options 

Whenever there is a risk of spot instance interruptionElastigroup will spin up new replacement spot instances in advance while gracefully draining at-risk onesIf spot instances are not available, the workload will be moved to pay-as-you-go instances. In those situations, Elastigroup will move workloads back to spot instances as soon as they become available.

How Elastigroup predicts spot instance interruptions and maintains high availability

For AWS cloud users, Elastigroup will first check if there are available reserved instances or Savings Plans and utilize those before spinning up new spot or on-demand instances, thereby maximizing overall utilization and cost efficiency.   

Heterogenous and predictive VM scaling

With Azure Spot VMs allowing you to provision a single VM of any type or sizeElastigroup takes it to the next level by enabling you to create a blended cluster of different VM types and sizes as well as updating relevant Load Balancers and Application Gateways as needed. 

Elastigroup will intelligently scale your cluster to match any scaling rules as well as predictively anticipate workload changes coming from increased or decreased traffics or application requests. 

Hassle-free Blue/Green deployments

Elastigroup’s Blue/Green deployment provides built-in CI/CD functionality so whenever you wish to upgrade your application version or any attribute in the group that you want to gracefully update on all the VMs, instead of having to write your own scripts, you simply provide a new imagedefine your desired batch sizes and  Elastigroup will seamlessly replace your VMs with updated versions, with each batch waiting for healthy green instances before moving on to the next batch, thereby ensuring high availability for your workloads, completely hassle free. 

Health Checks 

With startup times for VMs varying due to your applications’ unique needs, Elastigroup provides two different kind of health-checks:   

  1. VM state – checks VM health 
  2. Application Gateway health check  

These configurable health checks ensure all your VMs are ready and healthy for running your workloads. In the event of an unhealthy VM, Elastigroup will replace it automatically.  

VM scheduling for additional cost-efficiency

In addition to running your workloads on spot VMs, Elastigroup provides native scheduling so you can start and stop VMs as well as schedule scaling operations and deployments to reflect your actual work requirements and establish tighter control on when VMs are being used. 

Transform how your organization uses and pays for cloud compute 

Whether you are the CIO or a DevOps engineer, getting your cloud consumption under control, on so many fronts, is a real challenge. Fortunately,  Spot by NetApp’s Elastigroup is the easiest, most cost-efficient and flexible way to scale your mission-critical applications in the cloud. So, whether you are running workloads in AWS, Azure or GCP we’ve got you covered.  

Get started today!