What is preemptive instance

Preemptive instance (formerly known as bidding instance) is an instance that uses Alibaba Cloud's idle inventory ECS The instance is the same. The price changes in real time according to the market supply and demand relationship. Compared with the pay as you go instance type, it can save the most 90% of the cost. Preemptive instances can be obtained and used when the inventory resources are sufficient, and recovery is interrupted when the inventory resources are insufficient.

Applicable scenarios

Preemptive instances are designed to provide cost-effective computing resources for short-term tasks and highly fault-tolerant applications. If you can flexibly control the running time of applications or applications can tolerate interruptions, then preemptive instances are an economical choice for you. Preemptive instances are suitable for stateless, fault-tolerant, and highly tolerant business scenarios. For example:

  • Real time analysis service

  • Big data business

  • Geospatial survey and analysis business

  • Image and media coding service

  • Scientific computing business

  • Resilient business sites, web crawler services

  • Test business

  • Other stateless business scenarios

important

Preemptive instances are not recommended for business scenarios that are stateful, require long-term jobs, or require high stability, such as database services, and continuously running tasks.

Operation process

 image

When creating preemptive instances, you need to offer , when Bid ≥ market price and sufficient inventory Hour You will successfully obtain the instance and use it. For a period of time, you can use the instance stably, the stable use duration of the instance and the Instance usage duration Relevant, after exceeding the stable use time, when Bid<market price or insufficient inventory When an interrupt recovery is triggered, the instance will five Minutes later.

offer : Follow the set Upper limit price of single instance (i.e. bidding mode) is the highest price you are willing to pay for the selected preemptive instance (not the actual billing price).

Bidding mode:

  • Use automatic bidding: Bid=market price, that is, the price of the instance during its use is always consistent with the market price. With the real-time fluctuation of the market price, it can ensure that the instance will not be interrupted for recovery due to price fluctuations, but it cannot guarantee that the instance will be interrupted for recovery due to insufficient inventory.

  • Set the price limit on a single platform: Bid=set price ceiling for a single machine, that is, set the maximum acceptable price for a single machine. The higher the price, the greater the opportunity to hold preemptive instances. When the bid is lower than the market price or the inventory is insufficient, the instance is interrupted for recycling.

Instance usage duration:

  • Set use cases one Hours: Alibaba Cloud ensures that your instance is created one Recovery will not be interrupted within hours, that is, after instance creation one It is not affected by the detection mechanism within hours.

  • Uncertain use duration: There is no duration guarantee, and instance creation will be affected by the detection mechanism, which means that your instance may be interrupted at any time.

Three characteristics

 image

Interrupt recycle

Interrupt recovery of preemptive instances is inevitable. You can set it according to your own business scenarios Instance usage duration and Upper limit price of single instance , to balance the cost and the duration of the instance. At the same time, you can choose different Instance interrupt mode To decide how to restore or process the instance.

Instance interrupt mode

  • Direct release: When interrupt recovery is triggered, your instance will be released directly, including computing resources (vCPU, GPU And memory), fixed public network IP、 Fixed bandwidth and cloud disks (system disks and data disks).

  • Save downtime: When interrupt recovery is triggered, the instance enters the downtime saving mode, and computing resources (vCPU, GPU And memory), fixed public network IP And fixed bandwidth are recycled, cloud disks (system disks and data disks), and elastic public networks IP、 Resources such as snapshots are reserved and charged continuously. Preemptive instance entry Save downtime After the mode, the restart may fail because the inventory is insufficient or the price fluctuation exceeds the bid.

explain

Instance interrupt mode Modification is not supported after preemptive instance creation.

Suggestions on Interrupting Recycling

  • Data retention: You can set the Instance interrupt mode by Save downtime Or set cloud disk (system disk and data disk) Not released with the instance, The data will be retained after the preemptive instance is interrupted and recycled. For more information, see Preemptive instance data retention and recovery

  • Perceived interruption and response: You can subscribe to interrupt recovery events through cloud monitoring or OpenAPI Query the instance status to sense the interrupt recovery. For more information, see Perceive preemptive instance interrupt events and responses

Market price fluctuation

Market price: It refers to the price of the instance type, excluding the price of cloud disks, public network bandwidth and other resources.

explain

The following is East China 1. Example of Hangzhou Region ecs.hfg5.8xlarge For example, the original price of pay as you go instances and the discount of preemptive instances may change. The price is subject to the purchase page, which is only an example.

  • The market price of preemptive instances will fluctuate with supply and demand.

  • The market price of preemptive instances of the same instance type varies in the same region and different zones.

 image

Discount as low as one fracture

explain

The following is East China 1. Example of Hangzhou Region ecs.hfg5.8xlarge For example, the original price of pay as you go instances and the discount of preemptive instances may change. The price is subject to the purchase page, which is only an example.

  • There is a discount for preemptive instances, and the lowest price is for pay as you go instances 10%, up to the original price of pay as you go instances.

  • Compared to Set Instance Usage one Hours, no definite use duration The preemptive instance of is more favorable.

 image

How to create preemptive instances

You can use the ECS Console API or Terraform Create preemptive instances in other ways. For more information, see Create preemptive instance

Restrictions on use

  • Preemptive instances do not support conversion to pay as you go and subscription instances.

  • Preemptive instances do not support changing instance types.

  • Preemptive instances do not support filing services.

Billing related

Billing rules: See Preemptive Instance

Bill query: See View preemptive instance bills

Advanced use

Considering the actual resource usage scenarios, it is recommended that you use Alibaba Cloud's elastic scaling, elastic supply group or container services to improve the automatic operation and maintenance of resources ACK Use preemptive instances.

common problem

For more information about preemptive instances, see example FAQ