At a technical level, spot VMs are the same as regular VMs. They use the same images, hardware, and disks that translate to the same performance. The difference between spot and regular VMs comes down to priority and availability. Spot VMs have no priority to access compute capacity, and they have no availability guarantees after accessing that compute capacity.
Spot VMs are cheaper because of the eviction possibility.
How to build workloads on spot virtual machines
https://learn.microsoft.com/en-us/azure/architecture/guide/spot/spot-eviction
What is the spot eviction rate?
· Azure Spot Instances are not reliability guaranteed, they get evicted with a 30seconds heads up.
· Virtual Machines (VMs) have eviction rates expressed as percentages per hour, ranging from 0–5% to 20+%, and can vary by region. For example, an eviction rate of 10% means that there is a 10% chance that a VM will be evicted within the next hour.
· Azure Spot Virtual Machines (VMs) have eviction rates expressed as percentages per hour, ranging from 0–5% to 20+%, and can vary by region. For example, an eviction rate of 10% means that there is a 10% chance that a VM will be evicted within the next hour
Using Azure Resource Graph (ARG) to get Spot Eviction Rates and Alternative Spot Instance Types: Navigate to ARG in Azure portal using this link
https://portal.azure.com/#view/HubsExtension/ArgQueryBlade
Queries:
1. To Display Eviction Rates and the Top 3 Best Alternatives for all Instance Types in a Region
SpotResources | where type =~ ‘microsoft.compute/skuspotevictionrate/location’ | where location in~ (‘westus2’) | project SKU_Name = tostring(sku.name), Location = location, spotEvictionRate = tostring(properties.evictionRate) | join ( SpotResources | where type =~ ‘microsoft.compute/skualternativespotvmsize/location’ | where location in~ (‘westus2’) | project SKU_Name = tostring(sku.name), Location = location, Best_Alternative = tostring(properties.alternativeSkus[1].vmSku), Second_Best_Alternative = tostring(properties.alternativeSkus[2].vmSku), Third_Best_Alternative = tostring(properties.alternativeSkus[3].vmSku) ) on $left.SKU_Name == $right.SKU_Name | project SKU_Name, Location, spotEvictionRate, Best_Alternative, Second_Best_Alternative, Third_Best_Alternative | order by SKU_Name asc
Result

2. To Display Eviction Rate and the Top 3 Best Alternatives for a Particular Instance Type
SpotResources | where type =~ ‘microsoft.compute/skuspotevictionrate/location’ | where location in~ (‘westus2’) | where sku.name =~ ‘standard_d32ds_v5’ | project SKU_Name = tostring(sku.name), Location = location, spotEvictionRate = tostring(properties.evictionRate) | join ( SpotResources | where type =~ ‘microsoft.compute/skualternativespotvmsize/location’ | where location in~ (‘westus2’) | project SKU_Name = tostring(sku.name), Location = location, Best_Alternative = tostring(properties.alternativeSkus[1].vmSku), Second_Best_Alternative = tostring(properties.alternativeSkus[2].vmSku), Third_Best_Alternative = tostring(properties.alternativeSkus[3].vmSku) ) on $left.SKU_Name == $right.SKU_Name| project SKU_Name, Location, spotEvictionRate, Best_Alternative, Second_Best_Alternative, Third_Best_Alternative | order by SKU_Name asc

3. To check Eviction Rates of an Instance type in multiple Regions in the US, use this query
SpotResources | where type =~ ‘microsoft.compute/skuspotevictionrate/location’ | where sku.name =~ ‘standard_d32ds_v5’ | where location in~ (‘westus’, ‘westus2’, ‘westus3’, ‘centralus’, ‘eastus’, ‘eastus2’, ‘northcentralus’) | project SKU_Name = tostring(sku.name), Location = location, spotEvictionRate = tostring(properties.evictionRate)

