Alibaba Cloud provides the Server Load Balancer service in various regions.
To provide more stable and reliable load balancing services, multiple zones for Server Load Balancer are deployed in most regions for better disaster tolerance. Additionally, to improve cross-region availability, you can deploy Server Load Balancer instances in multiple regions and use DNS to resolve the domain name to the IP addresses of the Server Load Balancer instances.
To reduce latency and increase the download speed, we recommend choosing a region that is physically closest to where your customers are located.
Server Load Balancer does not support cross-region deployment. Ensure that the region is the same for the Server Load Balancer and the backend ECS instances.
Choose the instance type as needed. After you create a Server Load Balancer instance, a private or public IP is allocated. You can resolve a domain name to the IP to provide services.
An Internet Server Load Balancer instance only has a public IP and is accessible from the Internet.
If you choose the Internet type, you also need to choose the billing method:
Billing by traffic: Suitable for an application with obvious traffic changes.
Billing by bandwidth: Suitable for an application with relatively stable bandwidth.
An intranet Server Load Balancer instance only has a private IP and is accessible only from a classic network or VPC.
Server Load Balancer supports layer-4 (TCP and UDP) and layer-7 (HTTP and HTTPS) listening.
A layer-4 listener distributes connection requests directly to backend servers without modifying HTTP headers. After a request arrives at a layer-4 listener, the Server Load Balancer server uses the backend port configured in the listener to create a TCP connection with backend ECS instances.
A layer-7 listener is an implementation of reverse proxy. After a request arrives at a layer-7 listener, the Server Load Balancer server uses a TCP connection to transmit the data packets to backend ECS instances instead of transmitting the data packets directly.
Before using Server Load Balancer, you need to create ECS instances and deploy corresponding applications, and add the ECS instances to a Server Load Balancer instance as the backend servers to process distributed requests.
ECS regions and zones
Ensure the region is the same for the ECS instances and Server Load Balancer instance. Also, we recommend deploying the ECS instances in different zones to improve availability.
Additional configuration is not required after applications are deployed on the ECS instances. However, if you create a layer-4 listener, and the ECS instances use the Linux operating system, ensure the values of the following parameters in the
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
There is no restriction on the number of ECS instances added to a Server Load Balancer instance. To improve service stability and efficiency, we recommend adding ECS instances responsible for different tasks or services to different Server Load Balancer instances.