Spot Pricing (for Spot Instances)
ECSs that use spot pricing are called spot instances. You need to set a maximum price you are willing to pay for a spot instance. The maximum price must be greater than or equal to the market price but less than or equal to the pay-per-use price.
You can purchase a spot instance at a discounted rate, but there is a trade-off for that reduced cost. If inventory resources are insufficient or the market price exceeds your expected price, the spot instance will be reclaimed. Compared with pay-per-use and yearly/monthly ECSs, spot instances offer the same performance at a lower price.
Application Scenarios
Spot instances are a good option if you want to enjoy the same performance at a lower price.
- Applicable scenarios
Image rendering, stateless web services, DNA sequencing, offline analysis, function computing, batch computing, sample analysis, CI/CD, and test.
When the market price is higher than the maximum price you are willing to pay or the inventory resources are insufficient, the spot instances will be reclaimed. Therefore, back up data when using such ECSs.
- Inapplicable scenarios
The applications need to run for a long time or deliver a high level of stability.
Billed Items
A spot instance consists of compute resources (vCPUs and memory), EVS disks, an image, and an EIP. You are billed for the following items:
Spot instance resources billed |
Description |
---|---|
Market Price |
The ECS (with vCPUs and memory) is billed at the market price. |
Images |
If an image, including a Marketplace image, is created along with a spot instance, this image is billed on a pay-per-use basis.
NOTE:
|
EVS disks |
If an EVS disk (a system disk or a data disk) is created with a spot instance, this EVS disk is billed on a pay-per-use basis. |
EIP bandwidth |
If an EIP is purchased along with a spot instance and the EIP is billed by bandwidth, you are billed for the bandwidth on a pay-per-use basis. |
EIP traffic |
If an EIP is purchased with a spot instance and the EIP is billed by traffic, you are billed for the actual traffic used. |
If you want to purchase a spot instance with a Linux image, a data disk, and an EIP that is billed by bandwidth, the prices will be displayed as follows:
The price includes:
- The market price for the current specifications (including vCPUs and memory)
- The EVS disks (system disks and data disks)
- The EIP bandwidth
Billing Principles
The market price for ECSs fluctuates due to supply-and-demand changes. You can purchase spot instances at a low market price to reduce computing costs.
When purchasing a spot instance, you need to set the maximum price you are willing to pay for a specified flavor. A higher price means a higher probability of getting a spot instance.
- If the maximum price you are willing to pay is greater than or equal to the current market price and the inventory resources are sufficient, you will be provisioned with a spot instance. This spot instance will be billed at the current market price.
- If the maximum price you are willing to pay is less than the current market price, you will not be provisioned with a spot instance.
After purchasing a spot instance, you can use it like the other types of ECS. The system will periodically compare the maximum price you are willing to pay with the market price and check the inventory resources.
- If the price you are willing to pay is greater than or equal to the market price and the inventory resources are sufficient, you can continue using the spot instance.
- If the price you are willing to pay is less than the market price or the inventory resources are insufficient, you will be notified that the spot instance will be released, and then deleted in about 5 minutes.
Billed Usage Period
The spot instance usage is calculated by the second and billed every hour. The billing starts when the spot instance is launched and ends when the spot instance is deleted.
It takes a certain time to launch a spot instance. The billing starts from the Launched time on the ECS Summary page.
For example, if you purchased a spot instance at 8:45:30 and deleted it at 8:55:30, you are billed for the 600 seconds from 8:45:30 to 8:55:30.
Price Change After Specification Change
Spot instance specifications cannot be changed.
Impact of Arrears
Figure 2 shows the statuses a spot instance can have throughout its lifecycle. After a spot instance is purchased, it enters the valid period and runs normally during this period. If your account goes into arrears, the instance enters a grace period and then a retention period.
Arrears Reminder
The system will bill you for a spot instance after each billing cycle ends. If your account goes into arrears, we will notify you by email, SMS, or in-app message.
Impact of Arrears
- If your account is insufficient to pay your amount due:
Your account will go into arrears, and the spot instance will enter the grace period. Spot instance resources are not stopped immediately. You are still responsible for expenditures generated during the grace period. You can view the expenditures on the Billing Center > Overview page and pay any past due balance as needed.
- If you do not bring your account balance current before the grace period expires:
The ECS status turns to Frozen and it enters a retention period. You cannot perform any operations on the ECS.
- If you do not bring your account balance current before the retention period ends:
The compute resources (vCPUs and memory), EVS disks, and EIPs will be released and the data cannot be restored.
- For details about the grace period and retention period, see What Is a Grace Period of Huawei Cloud? How Long Is It? and What Is a Retention Period of Huawei Cloud? How Long Is It?
- For details about topping up your account, see Making Repayments (Postpaid Direct Customers).
Billing for a Stopped Spot Instance
The billing for a stopped spot instance varies according to the ECS type.
Conditions for Reclaiming
Huawei Cloud may reclaim your spot instance at any time. When it is being reclaimed, you cannot use it to create an image.
A spot instance may be reclaimed when:
- The market price is higher than the maximum price you would be willing to pay.
- The inventory resources are insufficient.
- If a spot instance is reclaimed for either of the preceding reasons, the first hour of usage is not billed.
- In the first settlement period, the instance is billed, regardless of whether it is running.
- It takes 5 minutes to reclaim a spot instance. If during that 5 minutes, the spot price hour is exceeded, any time in excess of that hour will be billed at the new market price.
- The spot instance price is updated every hour. After a spot instance is restarted, or it is stopped and then started, it is billed at the market price when the ECS starts.
Back up data on spot instances. You can configure the ECS to notify you of an upcoming release. For details, see Purchasing a Spot ECS.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.