Elastic Compute Service (ECS) instances can be provisioned by using multiple methods, such as individual provisioning, batch provisioning, high-availability deployment, and automatic cluster creation. You can use these provisioning methods by logging on to the ECS console or by calling API operations to create instances in various scenarios.

Manually create one or more instances

Scenarios: Multiple ECS instances of the same instance type and billing method need to be created in the same zone at a time.

Creation methods:

Number of instances that can be created: If you create instances by using the ECS console, the number of instances that can be created at a time depends on your ECS usage. If you create instances by calling the RunInstances operation, you can create up to 100 instances per call.

The following figure shows the lifecycle of an instance created by using the ECS console or by calling the RunInstances operation.Lifecycle of instances created by calling the RunInstances operation

You can also call the CreateInstance operation to create an ECS instance. The created instance enters the Stopped state, and you must manually start the instance.

Deploy instances across multiple physical servers to improve availability of the cluster (deployment set)

Scenarios: ECS instances need to be deployed across different physical servers to provide computing power for applications that require high availability and underlying disaster recovery.

Creation method: Create a deployment set and then create ECS instances in the deployment set. You can create instances by using the ECS console or by calling the RunInstances or CreateInstance operation.

Number of instances that can be created: depends on how instances are created. If you create instances by using the ECS console or by calling the RunInstances operation, you can create up to 20 instances at a time. If you create instances by calling the CreateInstance operation, you can create a single instance at a time.

Limits:
  • Up to 20 ECS instances can be created in each deployment set within a zone.
  • Only specific ECS instance types are supported. For more information, see Overview.
  • Billing methods: Subscription and pay-as-you-go are supported. Preemptible instances are not supported.

Automatically create instance clusters at minimal costs (Auto Provisioning)

Scenarios: Instance clusters that use different billing methods need to be deployed across instance types and zones. This method is suitable for scenarios where stable computing power must be provisioned in a quick manner and preemptible instances are used to reduce costs.

Creation method: Create an auto provisioning group to automatically batch create ECS instances.

Number of instances that can be created: Up to 1,000 instances can be created by an auto provisioning group.

Limits: Pay-as-you-go instances and preemptible instances are supported, whereas subscription instances are not.

Procedure:

Automatically create and release instances (Auto Scaling)

Scenarios: Instance clusters that use different billing methods need to be maintained across instance types and zones when service loads fluctuate from time to time.

Creation method: Create a scaling group and a scaling task. The scaling group automatically batch creates or releases ECS instances.

Number of instances that can be created:
  • Up to 1,000 ECS instances can be created during a single scaling activity.
  • Up to 1,000 ECS instances can be created by a single scaling group.

Limits: Pay-as-you-go instances and preemptible instances are supported. You can manually add an existing subscription instance to a scaling group, but cannot create a subscription instance in the scaling group.

Auto Scaling also provides simplified features to make provisioning more efficient and shorten the lead time from requirement to provisioning. For example, you can configure ECS instances in scaling groups to be automatically associated with Server Load Balancer (SLB) instances and ApsaraDB RDS instances. You can also configure lifecycle hooks to perform custom operations on the ECS instances in scaling groups. You can use Auto Scaling to obtain the scalability that meets your business needs. For information about the best practices for Auto Scaling, see the following topics: