Auto Provisioning is a service that enables fast provisioning of Elastic Compute Service (ECS) instances. You need only to make simple configurations to automate the creation of instances that use different billing methods (pay-as-you-go and preemptible instances) across instance types and zones, which improves the efficiency of batch creating a large number of instances. Auto Provisioning provides a variety of provisioning policies to alleviate the impacts on your business caused by the reclaiming of preemptible instances, so that you can use computing power at low costs.
- Resource pool: A resource pool consists of a single zone and a single instance type. You can specify multiple zones and instance types to make multiple resource pools available for use to create instances.
- Target capacity: Target capacity is the computing power that is scheduled to be provisioned,
and can include the capacity of preemptible instances and pay-as-you-go instances.
You can specify the target capacity based on instances, vCPUs, or memory size.
By default, auto provisioning groups use preemptible instances to meet the target capacity. You can also specify to use pay-as-you-go instances to provide the minimum required computing power. If you specify to use the capacity of pay-as-you-go instances, pay-as-you-go instances are created with priority over preemptible instances. Then, preemptible instances are created to make up for the remaining target capacity. If preemptible instances cannot be created due to insufficient resources, pay-as-you-go instances are created to meet the target capacity.
- Provisioning policy: A provisioning policy is used to choose resource pools to use to create instances. For example, you can choose the resource pool with the lowest unit price to reduce your costs, or choose to create instances in different zones to improve the availability of your instances.
Similar to preemptible instances, auto provisioning groups are applicable to stateless applications such as scalable website services, image rendering, big data analytics, and parallel computing. For more information, see Overview.
- Specify the launch template that contains the basic instance configurations. For more
information, see Launch templates.
The auto provisioning group uses attributes such as the image, security group, and logon credential specified in the launch template, but not the instance type and the vSwitch that specifies the zone where to create the instances. The auto provisioning group uses a separately specified vSwitch and instance type instead.
- Specify the resource pools to use to create instances across zones and instance types.
A resource pool consists of a single zone and a single instance type. If resources in one resource pool are insufficient, the auto provisioning group tries another resource pool with sufficient resources to create instances. A larger number of resource pools increases the available options for creating instances and improves the success rate of creating instances.Note You can specify only a single vSwitch within a single zone. If you specify multiple vSwitches within the same zone, only the first vSwitch takes effect.
- Specify the target capacity of the auto provisioning group and the proportions of
capacities of different types.
The target capacity can be specified based on instances, vCPUs, or memory size. Auto Provisioning uses the weight of an instance type to indicate the capacity of a single instance of this instance type. The following rules apply to weights:
- If the target capacity is specified based on instances, the weights of all instance types are the same.
- If the target capacity is specified based on vCPUs, the weight of an instance type depends on the number of vCPUs. The more vCPUs that an instance type has, the higher the weight of the instance type and the fewer instances of the instance type that are required to meet the target capacity.
- If the target capacity involves multiple instance type factors such as vCPUs and memory,
you must evaluate the computing power that each specified instance type is able to
contribute to the target capacity and set a weight for each instance type. A larger
weight indicates that the instance type is able to contribute more computing power.
Note You can specify the weights of instance types only when you create auto provisioning groups by calling the CreateAutoProvisioningGroup operation.
If you use pay-as-you-go instances to meet the minimum computing power requirements and use preemptible instances to meet the remaining target capacity, your costs can be significantly reduced.
- Specify the provisioning policy.
The following table describes the provisioning policies in Auto Provisioning.
Policy Applicable to Method Description Capacity optimization policy (capacity-optimized) Preemptible instances
- ECS console (preemptible instance): Set Provisioning Policy to Capacity Optimization Policy.
- API operation (preemptible instance): Set SpotAllocationStrategy to capacity-optimized.
The resource pool that is most cost-effective and that has the highest success rate of instance creation is used based on the prices and reclaim rates to create preemptible instances. This can effectively reduce the possibilities of preemptible instances being reclaimed and ensure stable capacity. Balanced distribution policy (diversified) Preemptible instances
- ECS console (preemptible instance): Set Provisioning Policy to Balanced Distribution Policy.
- API operation (preemptible instance): Set SpotAllocationStrategy to diversified.
Resource pools in multiple zones are evenly used to create instances. This eliminates the possibilities of instance creation failures caused by insufficient resources within a single zone and can effectively improve the disaster recovery capabilities of applications. Cost optimization policy (lowest-price) Preemptible and pay-as-you-go instances
- ECS console (preemptible instance): Set Provisioning Policy to Cost Optimization Policy.
- API operation (preemptible instance): Set SpotAllocationStrategy to lowest-price.
- API operation (pay-as-you-go instance): Set PayAsYouGoAllocationStrategy to lowest-price.
The resource pool with the lowest cost is used to create instances. This can effectively reduce costs. The resource pool with the lowest cost has vCPUs whose unit prices are the lowest.
If you create an auto provisioning group by calling the CreateAutoProvisioningGroup operation, you can specify to use the cost optimization policy for preemptible instances and specify the number of resource pools to use by setting the SpotInstancePoolsToUseCount parameter. You can use multiple resource pools with the lowest costs to create instances.
For example, you specify 100 preemptible instances as the target capacity of an auto provisioning group and set SpotInstancePoolsToUseCount to 5. Each resource pool is used to create 20 instances. When preemptible instances created by using one resource pool are reclaimed, preemptible instances created by using other resource pools are still available. This can effectively improve the availability of services.
Priority-based policy (prioritized) Pay-as-you-go instances API operation (pay-as-you-go instance): Set PayAsYouGoAllocationStrategy to prioritized. Resource pools are used based on their priorities in descending order. When resources in a high-priority resource pool are insufficient, lower-priority resource pools are used.
You must call the CreateAutoProvisioningGroup operation and set the LaunchTemplateConfig.N.Priority parameter to specify the priority-based policy and the priority of the resource pool.Note You can specify provisioning policies for pay-as-you-go instances only when you call the CreateAutoProvisioningGroup operation to create auto provisioning groups. In other cases, the cost optimization policy is used by default.
- Specify the maximum hourly prices.
You can specify the maximum hourly prices for preemptible instances for a single resource pool or for all resource pools. If the specified maximum prices are exceeded, the auto provisioning group stops creating preemptible instances even if the target capacity is not met. This ensures that your provisioned resource costs remain within your budget.
You can use discount plans such as reserved instances and savings plans to reduce your costs of pay-as-you-go instances. For more information, see Overview and Overview.
- Specify whether to maintain the target capacity.
The type of an auto provisioning group can be set to One-time Delivery or Continuous Delivery and Maintain Capacity. If you select Continuous Delivery and Maintain Capacity when you create an auto provisioning group, the auto provisioning group automatically checks the health status of instances and compares the real-time and target capacities. When instances are removed because they are unhealthy or due to insufficient resources, the auto provisioning group creates instances to maintain the target capacity to meet your computing power needs.
- Specify multiple resource pools based on the launch template.
- Specify the proportions of capacities of preemptible and pay-as-you-go instances.
- Specify the provisioning policy.
- Auto provisioning groups cannot provision instances across regions.
- For each auto provisioning group, you can specify the specified version of a single launch template as the basic configurations of instances. However, you can specify multiple resource pools based on the instance type specified in the launch template.
- Each auto provisioning group can include a maximum of 20 resource pools. Each resource pool is a combination of a single zone and a single instance type.
- A maximum of 1,000 instances can be created in each auto provisioning group.