Configure the Server Load Balancer instance

Last Updated: Nov 27, 2017

After creating a Server Load Balancer instance, you have to add at least one listener and a group of backend servers to it.

In this tutorial, we will add one TCP listener and add two ECS instances deployed with web pages as the backend servers.

Procedure

  1. Log on to the Server Load Balancer console.

  2. On the Instances page, click the ID of the target Server Load Balancer instance and enter the Details page.

    instance

  3. On the left-side navigation pane, click Listeners and then click Add Listener.

  4. Configure the listener as follows and use the default settings for other options:

    • Frontend Protocol [Port]: The front-end protocol and port of the Server Load Balancer system that is used to receive and distribute connection requests. Two port numbers cannot be the same in a Server Load Balancer instance.

      In this tutorial, select the TCP protocol with port number 80.

    • Backend Protocol [Port]: The port that is opened on ECS instances to receive distributed requests. It can be the same in a Server Load Balancer instance.

      In this tutorial, set the backend port number to 80.

    • Peak Bandwidth: You can set a peak bandwidth to limit the service capabilities that applications on the ECS instances can provide.

      In this tutorial, you do not need to set the peak bandwidth because the instance is paid by traffic.

    • Scheduling Algorithm: Server Load Balancer supports the following scheduling algorithms. In this tutorial, the round-robin method is used.

      • Round robin: Requests are distributed evenly across the group of backend ECS servers sequentially.

      • Weighted round robin (WRR): You can set a weight for each backend server. Servers with higher weights receive more requests than those with lower weights.

      • Weighted least connections (WLC): In addition to the weight set to each backend ECS server, the number of connections to the client is also considered. A server with a higher weight value will receive a larger percentage of live connections at any one time. If the weights are the same, the system directs network connections to the server with the least number of established connections.

      Listener configuration

  5. Click Next Step to configure health check settings. Select the TCP mode and keep other settings as default, and click Confirm.

    Through health check on the backend ECS instances, Server Load Balancer can automatically block abnormal ECS instances and distribute requests to them again when they become normal.

    Health check settings

  6. Click Confirm to complete the configuration.

  7. In the left-side navigation pane, click Servers > Backend Servers.

  8. On the Load Balancer Server Pool page, click the Servers Not Added tab, select the previously created ECS instances, and then click Add in Batch.

    Add backend servers

  9. In the Add a Backend Server dialog box, use the default weight value and click Confirm.

    A server with a higher weight value receives more requests. The default weight value is 100.

  10. Go back to the Instances page and click Refresh. When health check is Normal, the corresponding ECS instance can process requests forwarded by the Server Load Balancer instance normally.

    Instance

  11. In the web browser, enter the IP address of the Server Load Balancer instance to test the service.

    SLBTEST1

    SLBTEST2

Thank you! We've received your feedback.