Spot instances are pay-as-you-go ECS instances that use spare compute capacity. The market price for a spot instance fluctuates in real time based on supply and demand, reducing your costs by up to 90% compared to regular pay-as-you-go instances.
Billable items
A spot instance is billed based only on its instance type. The fee does not include other resources such as images, disks, public bandwidth (if you use the pay-by-bandwidth method), or snapshots.
Billing rules
Billing formula
Billing duration: The period from when a spot instance is created until it is released.
Market price: The price of an instance type. This does not include the price of other resources, such as disks and public bandwidth.
Bid price: The maximum price that you are willing to pay for a spot instance.
The bid price is not the actual price that you are charged. You are billed based on the current market price.
Duration setting | 1 hour | None |
Billing diagram | ||
Description | Alibaba Cloud guarantees that the instance is not automatically released within one hour of its creation. After this protected hour, the system continuously compares your bid price with the real-time market price and checks resource inventory to determine whether to retain or reclaim the instance. | The instance has no guaranteed runtime after creation. The system continuously compares your bid price with the real-time market price and checks resource inventory to determine whether to retain or reclaim the instance. |
Instance billing price |
| The market price for each billing period. |
Billing formula |
| Σ(Market price in each period * Billing duration of that period) |
For the same instance type, the market price for a spot instance with the duration set to None is typically lower than for an instance set to 1 Hour. This is true regardless of whether the actual runtime exceeds one hour.
Billing cycle
Fees are calculated per second, and a bill is generated hourly.
Billing examples
The market price fluctuates based on supply and demand. The price may change at any time. The following examples are for reference only.
Scenario 1: Set usage duration to 1 Hour At 9:40, you place a bid with a maximum price per instance of USD 3/hour and acquire a spot instance at a market price of USD 2.5/hour. You set the usage duration to 1 Hour. At 11:00, your bid price falls below the market price. You receive an interruption notification, and the instance is released 5 minutes later. Cost calculation Note A spot instance is billed per second based on its actual usage duration. To get the price per second, divide the hourly price by 3,600. The actual billing duration is 5,100 seconds (from 9:40 to 11:05), which is longer than 1 hour. For the first hour, the price is the market price at the time of purchase (USD 2.5/hour). After the first hour, the price is the real-time market price for each period until the instance is reclaimed. The total cost is calculated as follows:
Total cost = 2.5 + 1 + 0.33 = USD 3.83. | |
Scenario 2: Set usage duration to None At 9:40, you use automatic bidding to follow the market price and acquire a spot instance at a market price of USD 2/hour. You set the usage duration to None. At 11:00, you receive an interruption notification due to insufficient inventory, and the instance is released 5 minutes later. Cost calculation Note A spot instance is billed per second based on its actual usage duration. To get the price per second, divide the hourly price by 3,600. The actual billing duration is 5,100 seconds (from 9:40 to 11:05). The price is the real-time market price for each period. The total cost is calculated as follows: Total cost = Σ(Market price in each period * Billing duration of that period)
Total cost = 0.67 + 2.5 + 0.25 = USD 3.42. |
View bills
For more information, see View bills for spot instances.
Overdue payments
If you have overdue payments in your account, you cannot use spot instances. Overdue payments can cause your ECS instances to stop or even be released. To avoid service disruption, settle any overdue payments as soon as possible.