The Spot Placement Score feature is currently in PREVIEW. See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
Spot Placement Score evaluates the likelihood of success for individual Spot deployments by considering parameters like desired Spot Virtual Machine (VM) count, VM size, and your deployment region or zone. This feature enables you to generate a placement score to deploy a desired number of Spot Virtual Machines (VMs) across various combinations of regions, zones, and VM sizes. By inputting lists of up to eight regions and five VM sizes, you can obtain placement scores categorized as either High, Medium, or Low. A score of High indicates that the deployment is highly likely to succeed while a score of Low indicates that the deployment has a low chance of success. These scores are based on analyses of Spot capacity allocation probability of the specified number of Spot VMs within each region and VM size combination. This functionality enhances deployment planning by providing predictive insights into deployment success and optimizing resource allocation for your Spot VMs.
Using Spot Placement Score, you can achieve the following:
A clear evaluation of how likely your Spot deployment is to succeed based on specified parameters.
Identify the most suitable combination of regions and VM sizes to maximize Spot VM availability based on placement scores.
Improve the overall success rate of deploying Spot VMs by applying data-driven placement scores, reducing the risk of capacity issues or failures during deployment.
Cost
There are no costs associated with this feature.
Considerations
Spot placement scores serve purely as a recommendation based on certain data points like Spot VM availability. A high placement score doesn't guarantee that the Spot request will be fully or partially fulfilled.
Placement Scores are only valid at the time when it's requested. The same Placement Score isn't valid at a different time of the same day or another day. Any similarities are purely coincidental.
The Spot Placement Score is only relevant if the Spot request has the same configuration as the Spot Placement Score configuration; desired count, VM size, location, and zone. In all other circumstances, the likelihood of getting available Spot capacity won't align with the placement score generated by the tool.
Spot Placement Scores don't consider other constraints, such as Virtual Machine Scale Sets SinglePlacementGroup.
A subscription's available Spot VM quota needs to be checked or requested separately.
Spot Placement Score supports both regionally and zonally scoped placement score.
Spot Placement Score API internally calls other GET APIs and is part of your GET call quota.
A score of High or Medium doesn't guarantee allocation success or no evictions.
This feature is available for all public Azure regions at this time.
Configure your Spot Placement Score
Configure your Spot Placement Score by defining your Spot specific requirements:
Number of desired Spot VMs
Up to five VM sizes
Up to eight regions
Availability zones
We recommend that the placement scores for each combination of subscription, desired count, region, zone, and VM size are cached, to avoid calling the API with the same configuration frequently within a short period of time. The suggested cache TTL is a minimum of 15 minutes and a maximum of 30 minutes.
Find the Spot Placement Score in the Spot tab of the Virtual Machine Scale Sets creation process in the Azure portal. The following steps instruct you on how to access this feature during that process.
In the search bar, search for and select Virtual Machine Scale Sets.
Select Create on the Virtual Machine Scale Sets page.
In the Spot tab, turn on the Spot option under the Save money with Spot section.
Fill out the Size, Region, Availability Zones, and Initial instance count fields in the Your Placement Score section.
Click on Save + Apply to receive your placement score for this configuration.
Use the following REST API to get your Spot Placement Score. The Placement Score API supports the following versions: 2024-03-01-preview and 2024-06-01-preview. You need to add the Role-Based Access Control (RBAC) role "Compute Recommendations Role" and select the members to enable the subscription they want to run the API on (/azure/role-based-access-control/role-assignments-portal).
POST https://management.azure.com/subscriptions/{subscription}/providers/Microsoft.Compute/locations/{region}/placementScores/spot/generate?api-version={api-version}
Restricted SKU is returned if the Spot VM SKU isn't available for the subscription.
Data Not Found is returned when the data necessary to generate a score or recommendation is either not found in upstream databases, or is found but the data lifespan is greater than what our service considers "fresh".
Access the Spot Placement Score using Azure PowerShell command Invoke-AzSpotPlacementScore to call the API endpoint. The placement scores can be found under the "PlacementScore" property in the response object. Replace all parameters with your specific details:
At least one required input parameter isn't present, or the values of the provided parameters aren't valid. Produces a detailed error message about the failed request.
429
Too many requests
Unable to generate placement score due to hitting a rate limit.
500
Internal server error
The placement score generation failed. Produces a detailed error message about the failed request.
Azure HPC is a purpose-built cloud capability for HPC & AI workload, using leading-edge processors and HPC-class InfiniBand interconnect, to deliver the best application performance, scalability, and value. Azure HPC enables users to unlock innovation, productivity, and business agility, through a highly available range of HPC & AI technologies that can be dynamically allocated as your business and technical needs change. This learning path is a series of modules that help you get started on Azure HPC - you