Spot Advisor
Spot Advisor is a data-driven tool that helps you efficiently select spot instances. It helps you find the optimal mix of instance configurations for your workloads to balance cost savings with resource stability.
Key features
Spot Advisor provides real-time and historical data queries, comparison tools, and purchase recommendations for spot instances:
-
Real-time data query: Displays current prices, release rates, and historical discount rates for instance types in a specified zone. This helps you quickly compare market prices and select the most cost-effective instance type.
-
Historical data query: Shows historical price charts for instance types in a specified zone. This helps you analyze price trends and estimate long-term usage costs so you can choose an instance type with stable pricing.
-
Purchase recommendations: Recommends an optimal computing power mix based on your selected purchase policy (such as optimal capacity or optimal cost-effectiveness) and requirements (such as the number of instances or vCPU cores).
Real-time data query
Console
Go to the Spot Instances - Real-time Data Query page.
Condition filtering: You can filter instances by criteria such as region, zone, CPU/GPU type, vCPU count, and memory size. You can also use the search bar to find a specific instance type.
Data details: The list displays real-time information for spot instances, including current prices, release rates, and historical discount rates for different instance types.
Other features:
-
Buy: Click Buy in the Actions column to go to the purchase page for the selected spot instance type.
-
Price History: Click Price History in the Actions column to view the spot price history for the selected instance type.
-
Historical data comparison: Click
next to the Instance Family column to select different instance types for comparison. You can select up to five instance types.
API
-
Query the current price: Call the DescribePrice operation to query the current price of a spot instance. For example, to query the price of an
ecs.u1-c1m4.xlargespot instance with a 1-hour usage duration (protection period) in Hangzhou Zone J of the China (Hangzhou) region:RegionId:"cn-hangzhou", // China (Hangzhou) ZoneId:"cn-hangzhou-j", // Hangzhou Zone J ResourceType:"instance", // Resource type InstanceType:"ecs.u1-c1m4.xlarge", // Instance type SystemDisk:{ Category:"cloud_essd_entry", // System disk: ESSD Entry disk Size:40, // System disk size: 40 GiB }, SpotStrategy:"SpotAsPriceGo", // Bidding strategy: Automatic bidding SpotDuration:1 // Protection period: 1 hour -
Query the average release rate and historical discount rate: Call the DescribeSpotAdvice operation to query the average release rate and historical discount rate for a spot instance. For example, to query these metrics for an
ecs.u1-c1m4.xlargeinstance in Hangzhou Zone J of the China (Hangzhou) region:RegionId:"cn-hangzhou", // China (Hangzhou) ZoneId:"cn-hangzhou-j", // Hangzhou Zone J InstanceType:"ecs.u1-c1m4.xlarge" // Instance type
Historical data query
Console
Go to the Spot Instances - Historical Data Query page.
Condition filtering: You can filter by region and zone. You can also Add Instance Type to compare up to five instance types.
Data details:
-
Tab: Displays information such as the Historical Average Price and the 30-Day Average Release Rate of spot instances.
-
Line chart: Shows the hourly historical price curve, the Lowest Price, and the Highest Price for the selected instance type in the specified zone. The time range is the last 7 days by default and can be extended to a maximum of 30 days.
Other features:
-
Parameter comparison: Click View Detailed Parameter Comparison to view a detailed comparison of the selected instance types.
-
Find low-price zones: Click Find Low-price Zones on an instance type's tab to view its hourly historical price curve across different zones.
-
Buy: Click Buy Now on an instance type's tab to open its purchase page.
API
Query historical prices: Call the DescribeSpotPriceHistory operation to query the historical prices of a spot instance. For example, to query the price history for an ecs.u1-c1m4.xlarge instance in Hangzhou Zone J of the China (Hangzhou) region:
RegionId:"cn-hangzhou", // China (Hangzhou)
ZoneId:"cn-hangzhou-j", // Hangzhou Zone J
NetworkType:"vpc", // Network type: VPC
InstanceType:"ecs.u1-c1m4.xlarge" // Instance type
Purchase recommendations
Go to the Spot Instances - Recommended Instance Types page.
Filter by conditions: Select Resource Amount and Purchase Policy, and then filter by criteria such as region, zone, instance type, or vCPU count and memory size.
The purchase policy option determines the recommendation strategy:
-
Optimal capacity: Recommends a combination of spot instances that offers low prices, a low release rate, and the best overall capacity.
-
Optimal cost-effectiveness: Recommends the lowest-priced combination of spot instances.
-
Balanced distribution: Distributes spot instances evenly across your specified zones for disaster recovery.
Data details: The list displays recommended instance types based on your specified total configurations, purchase policy, and filter conditions. It includes the current price, release rate, and historical discount rate for each recommended instance type.
Other features:
-
Buy: Click Buy in the Actions column to go to the purchase page for the selected spot instance type.
-
Price History: Click Price History in the Actions column to view the spot price history for the selected instance type.
-
Create: Click the
icon before the Instance Family column to select different target instance types, and click Create to go to the Auto Provisioning page to create instances.
Recommendations
Follow these recommendations when using Spot Advisor:
-
Choose instance types with a low release rate: Prioritize instance types with a lower release rate to reduce the risk of interruption and reclamation.
-
Choose instance types with a stable price history: Check the price history of different instance types and select those with minimal price fluctuation to avoid unexpected cost increases.
-
Deploy across multiple regions and zones: Distribute your workload across multiple regions and zones to mitigate the risk of inventory shortages in a single location.
-
Prepare for interruption and reclamation: Spot instances can be reclaimed at any time. To improve stability, consider using them in a hybrid node pool with pay-as-you-go instances.