Spot the Instance
What Is Preemptive Instance?
The preemptive instance is a new operation mode of BCC instance, which aims to reduce the service cost of BCC in some scenarios.
The operation process of preemptive instance is shown in the figure below:
Relevant Interpretation
Preemptive instance: It is a postpaid instance in which the user bids within the specified range. When the market price of specified instance specification is lower than the user's bid and the resource inventory is sufficient, the customer can create a preemptive instance successfully and bill it by current market price.
Market price: It fluctuates based on the inventory and user bid of instance specification selected by users. The fluctuation range is between 10% of catalog price of selected configuration and the catalog price of selected configuration. The market price is updated every 5 minutes.
Discount involved: The discount only involves BCC CPU and memory, and other BCC associated charges are not affected by the bid discount, such as system disk, data disk, bandwidth and charged image.
Billing mode: The preemptive instance is billed by minute, and the market price is the minute price when the instance is created successfully.
Automatic bid: If you purchase a preemptive instance in this way, it matches the latest market price real time by default, and the instance is only released due to insufficient inventory.
Maximum price: If you purchase a preemptive instance in this way, the instance is released when the maximum price accepted by the user is lower than the market price or the inventory is insufficient.
Notice
- The user is notified in the short message 5 minutes before release. The preemptive instance is billed by the latest market price within 5 minutes from the notice received by the user to the release.
- The data can not be recovered after the release of instance. It is recommended that you create a snapshot to back up the data in advance.
One-hour protection period: Once the preemptive instance is created successfully, it has an one-hour protection period. Baidu AI Cloud does not release your instance due to the market supply and demand within the first hour after the creation, and you can run your business on the preemptive instance normally. Baidu AI Cloud checks the current market price and inventory of instance specifications every 5 minutes after the protection period is expired, i.e., one hour later. If the market price at a certain time is higher than your bid or the resource inventory is insufficient, Baidu AI Cloud releases your preemptive instance.
Preemptive instance quota: Each user has a quota to create up to 20 preemptive instances in different regions. If you want to increase the quota, submit a ticket for application.
Special Policy in Open Beta Test
- Open mode: whitelist open beta test. If you want to try the preemptive instance, you need to submit a ticket for application.
- Open region: Guangzhou and Suzhou
- Supported cluster of instance specifications: General purpose g3, compute optimized c3, intensive compute optimized ic3, memory optimized m3, general purpose g1, compute optimized c1, intensive compute optimized ic1 and memory optimized m1.
Application Scenarios
The preemptive instance is applicable for stateless application scenarios, such as scalable Web site services, image rendering, big data analysis and massive parallel processing (MPP). The higher the distribution, scalability and fault tolerance of your application, the higher cost-effective and throughput the preemptive instance is.
You can deploy the following common business on a preemptive instance:
- Real-time analysis service
- Big data business
- Geospatial survey and analysis business
- Image and media coding business
- Scientific computing business
- Scalable business site and Web crawler business
- Image and media coding business
- Test business
- Stateful application. For example, the preemptive instance should not be used in the database, because it is difficult to save the application state when the instance is released due to the bid failure.
Usage Limits
- The preemptive instance does not support the conversion to prepaid instance.
- The preemptive instance does not support the configuration change.
- The preemptive instance does not support the free shutdown.
Creating a Preemptive Instance
You can create a preemptive instance on the console after you activate the privilege.
Considerations
When you use the preemptive instance, you need to consider the following aspects:
- Select a reasonable bid: Your bid should be high enough, and you should consider the fluctuation of market price. In this way, your preemptive request is accepted and processed, and it is not released due to the price factors after creation. Furthermore, the bid must also meet your expectation based on your business assessment.
- The image used must contain the required software configuration to ensure that the instance can be started at any time after the successful creation.
- It is recommended that you use the storage media not affected by the release of preemptive instance to save your important data. For example, you can use the independent CDS disk (which can not be set to release with the instance) and BOS to store the data.
- Test your application to ensure that it properly handles the instance released unexpectedly. You can use the bill-by-traffic instance to run this application, and then release this instance automatically to confirm whether this application can handle the instance released automatically.
Creating a Preemptive Instance
- Log in to the BCC Admin console, and then select "Product Service" -> "BCC" to enter the "Instance List" page.
- Switch to a region that supports the preemptive instance, and then click "Create Instance" to enter the "Create Instance" interface.
- Select the preemptive instance as the purchase method.
-
Set the price of single instance in the bid module.
- Use an automatic bid: Select the mode that follows current market price, i.e., it means that the real-time market price is always accepted as the billing price of instance.
- Set maximum price: You must set a price ceiling for the specified instance, i.e., the maximum price you are willing to pay for the instance specification.
- Select related resource configuration you want to use, such as operating system type and network.
- After the confirmation of configuration information, click Next to enter the "Confirm Order" page, and then click Pay to create a preemptive instance.