Spot Instances
2 minute read
Overview
- Pricing model
- Save up to 90% cost of the PAYG model
- Take advantage of unused capacity
- If Azure need to reclaim the capacity then the spot VM will be evicted
- This eviction will cause service interruption
- Azure resource availability differs based on day, region, size, time of day and others
- No SLA is provided for spot instances
- The VM can be deallocated/deleted with as little at 30 seconds notice
Eviction policy
- VMs can be evicted based on capacity or max price
- The evication policy be either dellaocate or delete the VM
- Deallocate stops the VM allowing it to be de-deployed again and you will contionue to be charged for storage
- Delete will destroy the VM and storage
Option | outcome |
---|---|
Max price is set to >= the current price | VM is deployed if capacity and quota are available |
Max price is set to < the current price | The VM is not deployed. You will recieve an error message that the max price needs to >= current price |
Restarting a stopped/deallocated VM if the max price is >= the current price | If there is capacity and quota, then the VM is deployed |
Restarting a stopped/deallocated VM if the max price is < the current price | You will get an error message that the max price needs to be >= current price |
Price for the VM has gone up and is now > the max price | The VM gets evicted. You get 30 seconds notice. |
After evication the price for the VM goes back to being < the max price | The VM will not be automatically re-started. You can restart the VM yourself and will be charged the current price |
If the max price is set to -1 | The VM will not be evicted for pricing reasons. The max price will be the current price, up to the price for the standards VMs. You will never be charged above the standard price |
Change the max price | You need to deallocate the VM to change the max price. Deallocate the VM, set a new max price, then update the VM |
References
https://docs.microsoft.com/en-us/azure/virtual-machines/spot-vms
Last modified July 21, 2024: update (e2ae86c)