Reduce the operational costs of stateless workloads by using Azure Spot Virtual Machines. When compute capacity in Azure frees up, and depending on where you need it, Azure will provision your VM workload on unused compute capacity. Spot VMs are then evicted when Azure needs capacity back or when the current price of using the spot VM is higher than the price threshold you may have specified. This results in considerable discounts. And although the price of your Spot VM will vary based on the amount of unused capacity in Azure, across different VM sizes, and in different Azure regions, you may achieve up to 90% savings compared to pay-as-you-go pricing.
QUICK LINKS:
01:54 — Compute options
02:45 — Find the Spot VM right for you
03:30 — Deployment and provisioning options
05:18 — Architect your Spot VM for resilience
06:39 — Wrap up
Link References:
To learn more, check out https://aka.ms/SpotVMOverview
Watch our episode about compute options at https://aka.ms/AzureComputeChoices
Unfamiliar with Microsoft Mechanics?
We are Microsoft’s official video series for IT. You can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.
- Subscribe to our YouTube: https://www.youtube.com/c/MicrosoftMechanicsSeries?sub_confirmation=1
- Join us on the Microsoft Tech Community: https://techcommunity.microsoft.com/t5/microsoft-mechanics-blog/bg-p/MicrosoftMechanicsBlog
- Watch or listen via podcast here: https://microsoftmechanics.libsyn.com/website
Keep getting this insider knowledge, join us on social:
- Follow us on Twitter: https://twitter.com/MSFTMechanics
- Follow us on LinkedIn: https://www.linkedin.com/company/microsoft-mechanics/
-Welcome to Azure Essentials. In the next few minutes I’ll show you how, with the right planning, you can significantly reduce the operational costs of stateless workloads, which often make up more of your cloud spend than you think, by using Azure Spot Virtual Machines. So what are Azure Spot Virtual Machines? Well, as the name infers, as and when compute capacity in Azure frees up, and depending on where you need it in one of Azure’s 60 or so regions, Azure will provision your VM workload on unused compute capacity. Spot VMs are then evicted when Azure needs capacity back or when the current price of using the spot VM is higher than the price threshold you may have specified. This results in considerable discounts. And although the price of your spot VM will vary based on the amount of unused capacity in Azure across different VM sizes and in different Azure regions, you may achieve up to 90% savings compared to pay-as-you-go pricing.
-Now, if the thought of using spare compute capacity seems a little unsettling to you, used strategically, spot VMs are a fantastic option for interruptible workloads; in other words, stateless workloads that can pick up from where they left off after being interrupted. And as I mentioned, this is a broader set of workloads than you might initially think, with organizations using spot VMs for a range of things from Dev/Test and CI/CD pipelines to traditional workloads like business intelligence and analytics, batch processing jobs, certain high-performance computing scenarios, including advanced analytics and machine learning, and much, much more. Take for example, TomTom, a global leader in maps and location technology products. They use Azure Spot Virtual Machines to dynamically change the mix of machines using their search infrastructure as user demand requires, based on projected and observed search traffic. In fact, through the intermittent use of spot VMs, they often exceed their required SLA of 99.95% at a 99.99% rate with significantly reduced infrastructure costs.
-I’ll share more on how you can architect for resilience with Azure Spot VMs in a moment. But first let’s look at your compute options. Here, the good news is that with spot VMs there’s unparalleled choice. You can use the best cloud infrastructure available. In fact, aside from one or two exceptions, the vast majority of VMs in Azure are available as a spot instance. This gives you tremendous choice with literally hundreds of VMs to achieve the scale and performance you need across your preferred Linux distros and Windows Server-based apps. And you can bring over your existing Windows Server, Red Hat Enterprise Linux, and SUSE Linux licenses using Azure Hybrid benefit. Azure VM families are optimized for compute, memory, and storage intensive workloads, in addition to AI, machine learning, and mission critical scenarios. We also give you choice over CPU and GPU processes across Intel, AMD and Nvidia to take advantage of the latest hardware innovation.
-And you can learn more about that in our recent episode on the topic at aka.ms/AzureComputeChoices. Now to find the spot VM right for you, we have several tools starting with a Spot VM Advisor page, on which you can specify the operating system, preferred region, currency, payment schedule, and VM series you want, along with the number of virtual CPUs and RAM your VM requires and your maximum price threshold. The page then presents a filtered view of your options and helps you see estimated savings compared to pay-as-you-go rates. And if you don’t know which VM you want, another tool, the virtual machines selector, can give you recommendations based on your workload type or VM characteristics, by operating system, or by the region that you want your VMs to reside in. Based on your inputs, and once you select spot pricing, it’ll recommend the appropriate VM type.
-In this example, we went through the workload path and have ended up with a few VM recommendations, and there are additional options below. Once you’ve identified the spot VM you want, deploying it is also straightforward. In the Azure portal, as you create your virtual machine, you’ve got the option to select the spot instance. You can deploy your spot VM as a single VM, as part of a virtual machine scale set, in conjunction with Azure Kubernetes Service deployments. And as you deploy, you can continue to use the tools you’re already familiar with, including Azure Resource Manager templates or scripting tools like CLI or PowerShell, with more options like Terraform coming soon. You’ve got two provisioning options to choose from. You can choose not to cap the price of your spot instance. And in this case, Azure will always charge you the Spot Virtual Machine price at any given time, giving you peace of mind that your virtual machines will not be evicted for price reasons.
-Alternatively, you can decide to provide a maximum price to stay within your budget. And in this case, Azure will charge you the spot price and not charge you above the maximum price you set and will evict the virtual machine if the spot price rises above your defined maximum price. From here, you can specify the course of action for when your spot VM is evicted by setting your eviction policy. If the eviction policy is set to deallocate, any data stored on disk storage is not deleted. However, all the temporary data that’s local to the VM is deleted. If the eviction policy is set to delete, data that’s stored on local disks and on any attached persistent disk storage is deleted. Next, once you’ve established your VM size, if you want to establish a price threshold, you can choose your maximum price you want to pay per hour.
-Here we arm you with additional information on eviction rates for the past 28 days, so that you see estimates about your probability that your workloads will be evicted, in addition to the cost of running your workloads using spot VMs. You can also compare price and eviction rates in adjacent regions and decide to pay slightly more in return for a lower eviction rate. Or sometimes pay less if you’re willing to deploy a spot VM in a different region. Speaking of which, let’s get back to the topic of architecting your spot VM allocation for resiliency during deployment. If you deploy a spot VM as part of a virtual machine scale set, Azure will intelligently attempt to restore evicted Azure Spot Virtual Machine instances inside a scale set to maintain the target instance count. For example, if you have 10 spot VMs in a scale set, and one gets evicted, Azure will try to restore the 10th VM that was evicted so that you always have 10 spot virtual machines allocated.
-And one more thing to consider before you deploy Azure Spot VMs: to test how well your target workloads tolerate interruptions when deployed on spot VMs, you can also simulate evictions using our REST APIs. In fact, with the right planning, the use of spot instances can be a game changer by helping increase the efficiency of your cloud operations at scale. Take, for example, UK-based animation and visual effects studio Jellyfish Pictures, who have built a flexible architecture that allows their studio to operate on premises until its compute capacity is fully utilized and then burst into the cloud to get the additional compute they need to deliver on time. A combination of Azure Spot VMs for the Azure HB V2 series instances with half a TB of RAM and Azure Virtual Machine Scale Sets automatically facilitate burst rendering of animation sequences deploying 90,000 AMD processor cores at peak demand. This approach took 80% off their compute costs instantly.
-So that was a quick overview of how you can reduce the operational costs of your cloud workloads by using Azure Spot VMs. Once you start looking across your application portfolio, or even as you spin up new apps, you might be surprised at just how many can be run in this way. To learn more, you can check out aka.ms/SpotVMOverview, and keep checking back to Microsoft Mechanics for more in the series and the latest in tech updates. Thanks for watching.