All Products
Search
Document Center

Elastic Compute Service:Preemptible Instance

Last Updated:Nov 06, 2023

Preemptible instances are on-demand instances that are created in spare Elastic Compute Service (ECS) capacity that is available for much less than pay-as-you-go prices. Preemptible instances deliver the same performance as pay-as-you-go instances. The market prices of preemptible instances vary based on the supply and demand. Compared with pay-as-you-go instances, preemptible instances can help you save up to 90% of instance costs.

For information about the scenarios for which preemptible instances are suitable and the interruption and reclamation mechanism of preemptible instances, see Overview.

Note

When you create a preemptible instance, you must configure the Highest Price per Instance parameter to specify a maximum hourly price that you are willing to pay to bid for an instance type. Your bid does not affect the actual price of the instance type but affects the existence and reclamation of the created preemptible instance. For more information, see the Interruption and reclamation section of the "Overview" topic.

Billing increment

Preemptible instances are billed in 1-second increments and paid for on an hourly basis. You pay for preemptible instances after you use them.

Fee calculation

Important
  • Price: refers to the price of the instance type, which does not include the prices of other resources such as disks and public bandwidth.

  • Market price: The market price of an instance type fluctuates based on the supply and demand.

  • Billable duration: The billable duration of a preemptible instance starts when the instance is created and ends when the instance is released.

The price of a preemptible instance varies based on the value of Instance Usage Duration (protection period) that you specify when you create the instance. The following table describes how the price of a preemptible instance that has or does not have a 1-hour protection period is calculated.

Value of Instance Usage Duration

Price used for the instance

Formula

1 Hour

Total billable duration ≤ 1 hour: market price at the time of purchase

Market price at the time of purchase × Billable duration

Total billable duration > 1 hour: real-time market prices in different periods

Market price at the time of purchase × 1 hour + ΣReal-time market price in period 1 × Period 1 + Real-time market price in period 2 × Period 2 +…+ Real-time market price in period N × Period N

None

Real-time market prices in different periods

ΣReal-time market price in period 1 × Period 1 + Real-time market price in period 2 × Period 2 +…+ Real-time market price in period N × Period N

Billing example

  • Scenario

    You specified a price of USD 2 per hour, which is higher than the real-time market price of USD 1.5 per hour, to create a preemptible instance that has a 1-hour protection period. The instance was created at 8:00. At 10:00, the instance is released because the market price exceeds your bid price.

    Note

    The market price varies based on the supply and demand for the instance type. The following figure is provided only for illustrative purposes.

    image
  • Fees

    Note

    Preemptible instances are billed by second based on usage duration. If an hourly price is displayed, you can divide the price by 3,600 to obtain the price per second.

    Total fee = (1.5/3,600) × 60 × 60 + (0.5/3,600) × 30 × 60 + (1/3,600) × 30 × 60 = USD 2.25.

    • Fee for the protection period of 8:00:00 to 9:00:00 (the transaction price is USD 1.5 per hour and the usage duration is 60 minutes): (1.5/3,600) × 60 × 60 = USD 1.5.

    • Fee for the period from 9:00:00 to 9:30:00 (the spot price is USD 0.5 per hour and the usage duration is 30 minutes): (0.5/3,600) × 30 × 60 = USD 0.25.

    • Fee for the period from 9:30:00 to 10:00:00 (the spot price is USD 1 per hour and the usage duration is 30 minutes): (1/3,600) × 30 × 60 = USD 0.5.

References