You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Spot instance
Overview of spot instance
Copy page
Download PDF
Overview of spot instance
A spot instance is a type of on-demand instance with performance same as regular pay-as-you-go instances. It offers a certain discount compared to pay-as-you-go instances. This helps you lower the cost of instance usage in certain scenarios.​
Operation process​
​​​
When you purchase a spot instance, you need to set the maximum price. When inventory is sufficient and your bid price is greater than or equal to the spot market price, you can successfully purchase the instance. For detailed information, refer to Purchaseing spot instance.​
After you successfully purchase a spot instance, the instance launches automatically. Then, you can deploy businesses immediately. During this period, the system checks the instance inventory and compares the spot market price with the bid in real time. Specific situations are as follows:​
  • When the stock is sufficient and the bid price is greater than or equal to the spot market price, you can continue using the spot instance. After business completion, you can manually release the instance.​
  • When the inventory is insufficient or the market price exceeds your bid price, a spot instance interruption event is triggered. Meanwhile, the system sends a notification about the upcoming instance release via internal messages, SMS, email, or other channels before the release. At the corresponding time after the notification is sent, the system will automatically release the spot instance.​
tip​
  • For non-GPU instances, the notification about the upcoming instance release is sent 5 minutes in advance; for GPU instances, it is sent 1 hour in advance.​
  • You can subscribe to event notifications and receive instance release notifications via internal message, SMS, email, or other channels before your spot instance is interrupted.​
  • Normally, the system starts releasing spot instances from the lowest bid. If multiple spot instances have the same bid price, the release order of the instances is determined randomly.​
Limits​
  • You can not change instance type.​
  • You can not change billing method.​
Scenarios​
Spot instances are suitable for stateless application scenarios. Examples include stateless web site services, image rendering, big data analysis, offline analysis, and large-scale parallel computing and testing. The greater an application's distributed nature, scalability, and fault tolerance, the more effectively it can use spot instances to reduce costs and boost throughput.​
You can deploy the following businesses on spot instances:​
  • Real-time analysis​
  • Big data analysis​
  • Geospatial survey and analysis​
  • Image and media encoding​
  • Scientific computation​
  • Elastic and scalable business sites​
  • Testing​
warning​
To avoid impacts on business operations by the interrupt reclamation mechanism, do not use spot instances for long-term workloads or stateful applications with high stability requirements, such as databases. Preserving application state is challenging when a spot instance is released.​
Note​
You can check whether a spot instance is in pending termination status through viewing spot instance interruption event. You can also save limited data during the termination grace period through Best practices for data recovery when spot instances are reclaimed. But we still recommend that you upgrade application design and back up your data in advance. This makes sure that after the spot instance is reclaimed, applications can still work normally. Methods of data backup are as follows:​
  • Method 1: Create a snapshot to back up valid data in the volume. For specific operations, refer to Creating a snapshot.​
  • Method 2: Go to the TOS console to enable TOS service. Then upload files that need to be saved to the bucket. For detailed operations, refer to Uploading files.​
Billing rules​
Spot instance prices fluctuate in real time with market supply and demand. For specific billing rules, refer to Spot instance.​
Usage guide​
​
Actions​
Documentation​
Purchasing spot instances​
Viewing interruption events for spot instances​
Spot instance reclamation mechanism​
Restore data of the spot instance to be reclaimed​
Stop spot instance​
Delete spot instance​
Query the historical prices, average interruption rate, discount rate, and other relevant information of spot instance over the last 30 days​
​
FAQ​
Last updated: 2026.10.14 17:37:26