This topic describes how to use Auto Scaling to evenly distribute ECS instances across zones and deploy a high-availability compute cluster at lower 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 compute resources. This results in higher costs and may face scalability problems, such as insufficient resources, insufficient time to manually create ECS instances, and service disruption. All these problems pose risks to the business.
- Distributed big data computing
- Artificial intelligence 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 the high availability of the compute cluster.
- Use Auto Scaling to distribute compute nodes across multiple zones and specify multiple instance types.
- Purchase preemptible ECS instances to reduce costs.
- Zero maintenance cost
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 for RDS instance. When the load decreases, the scaling group automatically removes ECS instances from the whitelist of the ApsaraDB for RDS instance, and then releases the instances. The whole process is automatically triggered and completed without the need for manual intervention.
- High cost-effectiveness
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 in a zone 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 application requirements.
- Log on to the Auto Scaling console.
- In the top navigation bar, select a region.
- Create a scaling group.
- Set Source Type to Create from Scratch.
- Set Minimum Number of Instances to 100.
- Set Network Type to VPC.
- Select vSwitches across multiple zones.
- Set Multi-zone Scaling Policy to Balanced Distribution Policy.
- Bind the ApsaraDB for RDS instances used by your current business modules.
Configure other parameters based on your needs. For more information, see Create a scaling group.
- Click View Scaling Group Details.
- Go to the Instance Configuration Source page to create a scaling configuration.
- Set Billing Method to Preemptible Instance.
- Set Image to your custom image.
Configure other parameters based on your needs. For more information, see Create a scaling configuration.
- Enable the scaling configuration and scaling group.