Before using Server Load Balancer, you need to create a Server Load Balancer instance. You can add multiple listeners and backend servers to the Server Load Balancer instance.
Follow this document to create an Internet-facing Server Load Balancer instance. After the instance is created, a public IP is allocated to it. You can resolve a domain name to this IP.
Log on to the Server Load Balancer console.
On the Instances page, click Create Server Load Balancer.
Configure the Server Load Balancer instance.
The configurations for the Server Load Balancer instance in this tutorial are as follows. For more information, see Server Load Balancer configurations.
Region: Server Load Balancer does not support cross-region deployment. The region must be the same for the Server Load Balancer instance and ECS instances. In this tutorial, we select China East 1, which is the region of the ECS instances.
Zone type: Multiple zones for Server Load Balancer have been deployed in most regions for better disaster tolerance. If Server Load Balancer service is unavailable in the primary zone, it switches to a backup zone to restore service (within 30 seconds). Then, it will automatically switch back to the primary zone when service in the primary zone is restored.
In this tutorial, select China East 1 Zone B as the primary zone and China East 1 Zone D as the backup zone.
Instance type: Select Internet.
Click Buy Now and complete the payment.
Go back to the Instances page, find the created instance.
Hover the mouse pointer over the instance ID and then click the pencil icon.
Enter the name
SLB1and click Confirm.