Plan and prepare

Last Updated: Jul 24, 2017

Plan the region of the Server Load Balancer instance

Alibaba Cloud provides the Server Load Balancer service in various regions, including Asia Pacific NE 1 (Japan), Singapore, Asia Pacific SE 2 (Sydney), US East 1 (Virginia), US West 1 (Silicon Valley), Middle East 1 (Dubai), Germany 1 (Frankfurt) China North 1 (Qingdao), China North 2 (Beijing), China North 3 (Zhangjiakou), China East 1 (Hangzhou), China East 2 (Shanghai), China South 1 (Shenzhen) and Hong Kong.

To provide more stable and reliable load balancing services, Alibaba Cloud Server Load Balancer has deployed multiple zones in most regions for better disaster tolerance. Additionally, to improve the high availability in different regions, you can deploy the 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.

When selecting the region, please note the following:

  • To reduce the latency and increase the download speed, we recommend that you choose the region that is closest to the location where your customers are located.

  • Server Load Balancer does not support the cross-region development. Ensure that the region of the Server Load Balancer and the backend ECS instances are the same.

Plan the instance type (Internet or intranet)

Choose the instance type according to your business. 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.

  • The Internet Server Load Balancer instance only has a public IP, which is accessible from the Internet.

    If you choose the Internet type, you need to consider the billing method:

    • By traffic:suitable for the application that has obvious traffic changes.

    • By bandwidth:suitable for the application that the bandwidth is relative stable.

  • The intranet Server Load Balancer instance only has a private IP, which is accessible only from the classic network or VPC, and cannot be accessed by the Internet.

Plan the listening protocol

Server Load Balancer supports layer-4 (TCP and UDP) and layer-7 (HTTP and HTTPS) listening.

  • The layer-4 listener distributes the connection requests to the backend servers directly without modifying the HTTP headers. After the request arrives at the listener, the Server Load Balancer server uses the backend protocol port configured in the listener to create a TCP connection with the backend ECS.

  • The layer-7 listener is an implementation of reverse proxy. After the request arrives at the listener, the Server Load Balancer server uses the TCP connection to transfer the data packets other than transferring the data packets to the backend ECS directly.

Prepare the backend servers

Before using Server Load Balancer, you have to create ECS instances and build corresponding applications on them. Then add the ECS instances to a Server Load Balancer instance as the backend servers to process the distributed requests.

  • ECS region

    Ensure the regions of the ECS instances and the Server Load Balancer instance are the same. Besides, we recommend that you deploy the ECS instances in different zones to improve the availability.

  • ECS configurations

    No more configurations are required after deploying the applications. However, if you are about to 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 file are 0:

    1. net.ipv4.conf.default.rp_filter = 0
    2. net.ipv4.conf.all.rp_filter = 0
    3. net.ipv4.conf.eth0.rp_filter = 0
  • ECS amount

    No restriction on the number of the ECS instances added to a Server Load Balancer instance. To improve the stability and efficiency of the service, we recommend that you add the ECS instances that are responsible for different tasks or provide different services to different Server Load Balancer instances.

Thank you! We've received your feedback.