This topic describes how to use Auto Scaling to evenly distribute Elastic Compute Service (ECS) instances across zones and deploy a high-availability compute cluster at low costs by using preemptible ECS instances.
An online advertising provider uses machine learning to implement targeted advertising. During peak hours, the provider requires a large number of temporary compute resources, which may lead to higher costs. Furthermore, scalability issues, such as insufficient resources, insufficient time to manually create ECS instances, and service interruption may occur. All these problems pose risks to the business.
- Distributed big data computing
- AI training
Auto Scaling can provision a compute cluster in a short amount of time. The balanced distribution policy allows you to automatically distribute compute nodes across multiple zones. Auto Scaling also performs health checks on ECS instances to ensure high availability of the compute cluster.
- Use Auto Scaling to distribute compute nodes across multiple zones. Specify multiple instance types to increase the success rate of the solution.
- Purchase preemptible ECS instances to reduce costs.
- Zero O&M costs
You can configure the scaling policy in advance. When the load increases, the scaling group automatically creates and adds ECS instances to the whitelist of the ApsaraDB RDS instance. When the load decreases, the scaling group automatically removes ECS instances from the whitelist of the ApsaraDB RDS instance, and then releases the instances. The whole process is automatically triggered and completed without manual intervention.
- Highly cost-effective
Auto Scaling supports preemptible ECS instances. You can purchase preemptible instances at up to 90% discount.
- High availability
Auto Scaling uses the balanced distribution policy to automatically distribute and deploy compute nodes across zones. This ensures service availability and reduces the risk that resources fail to be created in a zone where the inventory for a particular resource may be insufficient. Auto Scaling automatically performs health checks to ensure the availability of ECS instances in a scaling group.
Evaluate business modules based on your business architecture and create scaling groups for the business modules that require high-availability clusters. Select a custom image for the scaling configuration to ensure that the automatically created ECS instances meet the requirements for your applications.
- Log on to the Auto Scaling console.
- In the top navigation bar, select the region where Auto Scaling is activated.
- Create a scaling group.
- Set Instance Configuration Source to Create from Scratch.
- Set Minimum Number of Instances to 100.
- Set Network Type to VPC.
- Select vSwitches across multiple zones.
- Set Expansion and Contraction Strategy to Balanced Distribution Policy.
- Bind the ApsaraDB RDS instances used by your business modules.
Configure other parameters as required. For more information, see Manage scaling groups.
- On the Scaling Groups page, find the newly created scaling group and go to the scaling group details page.
- Click the ID of the scaling group in the Scaling Group Name/ID column.
- Click Details in the Actions column.
- In the upper part of the page, click the Instance Configuration Sources tab.
- Create a scaling configuration.
- Set Billing Method to Preemptible Instance.
- Set Image to Custom Image and select an image.
Configure other parameters as required. For more information, see Create scaling configurations for scaling groups that contain ECS instances.
- Enable the scaling configuration and scaling group.