Elastic Algorithm Service (EAS) provides public resource groups and exclusive resource groups. When you use a public resource group to deploy a service to EAS, you can specify preemptible instances for the service to reduce costs. This topic describes how to specify preemptible instances for an EAS service.
Introduction to preemptible instances
Preemptible instances are a type of instances that you can use to deploy services in preemptible mode with a bid price, providing cost-effective computing resources. EAS allows you to select preemptible instances to deploy services. For more information, see Overview.
Benefits
Cost saving: The biggest advantage of preemptible instances is their low cost. Prices fluctuate in real time based on the market demand and supply. Preemptible instances are typically more cost-effective than common pay-as-you-go instances in public resource groups.
Tiered pricing: Preemptible instances are categorized into two types: instances with a protection period and instances without a protection period. The prices of the instances are sorted in ascending order: price of a preemptible instance without a protection period < price of a preemptible instance with a protection period < price of a common instance
Purchase and usage
Purchase configuration: You can specify whether to use preemptible instances in the configuration file and set the bid price. When you deploy an EAS service, the system automatically bids for preemptible resources to create preemptible instances based on the configuration file.
Conditions for creating preemptible instances: If the resource inventory is sufficient and the bid price of an instance type is higher than the market price, a preemptible instance can be created.
Instance releasing and resource reallocation: Preemptible instances may be released due to insufficient inventory or market price changes. In this case, EAS reallocates available resources with the highest priority based on the configuration file to ensure service continuity.
Order in which multiple instance types are used to create an instance for service deployment: When you create or update a service, you can specify multiple instance types, such as preemptible instance types and common instance types. When you deploy a service, the system uses the instance types to create an instance based on the configuration order. If an instance type fails to create an instance or the resource inventory is insufficient for instance creation, the system automatically uses the next available instance type to create an instance based on the configuration order.
Usage notes
Instances with a protection period:
By default, an instance can be used for one hour in which the resources are available.
After the protection period ends, if the resource inventory is sufficient and the bid price for an instance of a specific instance type is higher than the market price, the instance can be used continuously.
Instances without a protection period:
If the resource inventory is sufficient and the bid price for an instance of a specific instance type is higher than the market price, the instance can be used continuously.
Releasing conditions:
Instances with a protection period: After the protection period ends, if the resource inventory is insufficient or the bid price for an instance of a specific instance type is lower than the market price, the instance may be released.
Instances without a protection period: If the resource inventory is insufficient or the bid price for an instance of a specific instance type is lower than the market price, the instance may be released.
Billing
Preemptible instances are billed based on the pay-as-you-go billing method. You are charged based on the market price.
Prerequisites
If you use a client to specify preemptible instances, make sure that the EASCMD client is installed and identity authentication is complete. For more information, see Download the EASCMD client and complete identity authentication.
Specify preemptible instances when you create a service
Specify preemptible instances when you modify the settings of a service
References
For more information about the advanced configurations for service deployment, see Advanced configurations.
For more information about public resource groups, see Overview of EAS resource groups.