Azure Spot Virtual Machines are here! - "Preview"
Spot VMs? Ring a bell? No? Spot EC2 Instances? Yes, you guessed it right! Before 3rd December 2019, spot EC2 instances or spot VMs were only the thing of AWS (Amazon Web Services). But now, Microsoft Azure is too going to utilize it’s unused compute power by offering Azure Spot Virtual Machines at steep discounts just like AWS Spot instances.
What is this all about?
We are all aware that the every region in Azure is technically a very big datacenter or set of datacenters which provide power and capabilities to run or launch various operations in that region. It is very common scenario where some chunk of compute power in every region is underutilized. So, with the help of Azure Spot Virtual Machines, Microsoft Azure is going to offer that underutilized compute power to us at some steep discount.
Benefits
- Buy unused compute capacity at deep discounts
- Pay up to the price you agree to in advance
- Run interruptible workloads at scale on VMs and VMSS
Important Points to Note
At any point in time when Azure needs the compute power back, the Azure infrastructure will evict Spot VMs. Hence it is very important to note that only those loads should be placed on Spot VMs which are can bear interruption. Also it is recommended not to use these VMs for production workloads. Also, Spot VMs do not come with high availability guarantee or any SLA.
Azure Says, “The amount of available capacity can vary based on size, region, time of day, and more. When deploying Spot VMs, Azure will allocate the VMs if there is capacity available, but there is no SLA for these VMs. A Spot VM offers no high availability guarantees. At any point in time when Azure needs the capacity back, the Azure infrastructure will evict Spot VMs with 30 seconds notice.“
How will the purchasing of Spot VMs work?
You have option to set a max price you are willing to pay, per hour, for the VM. The max price for a Spot VM can be set in US dollars (USD), using up to 5 decimal places. The price for the VM will be the current price for spot or the price for a standard VM, which ever is less, as long as there is compute power and quota available.
What will happen if VM gets evicted?
VMs can be evicted based on capacity or the max price you set. For virtual machines, the eviction policy is set to Deallocate which moves your evicted VMs to the stopped-deallocated state, allowing you to redeploy the evicted VMs at a later time. However, reallocating Spot VMs will be dependent on there being available Spot capacity. The deallocated VMs will count against your spot vCPU quota and you will be charged for your underlying disks.
Limitations
- Spot VMs are not supported for B-series or any promo versions of any size (like Dv2, NV, NC, H promo sizes)
- Spot VMs can’t currently use ephemeral OS disks.
- Spot VMs can be deployed to any region, except Microsoft Azure China 21Vianet and Department of Defense (DoD) in the Azure Government region.
References:
- https://azure.microsoft.com/en-us/pricing/spot/
- https://docs.microsoft.com/en-us/azure/virtual-machines/windows/spot-vms
- https://docs.microsoft.com/en-us/azure/virtual-machines/windows/spot-portal
- https://docs.microsoft.com/en-us/azure/virtual-machines/linux/spot-vms
Please feel free to reach me out in case of any queries or help. I’ll be happy to assist!