• Elastic Load Balancing

elb
  1. Help Center
  2. Elastic Load Balancing
  3. User Guide
  4. Management
  5. Backend Server (Enhanced Load Balancer)

Backend Server (Enhanced Load Balancer)

Scenarios

This section describes how to add backend servers to and remove backend servers from a load balancer.

Before adding a backend server, check whether the security group rule of this server is configured to permit 100.125.0.0/16 in the inbound direction, and configure the protocol and port used for the health check. Otherwise, the health check cannot be performed on this server.

Add Backend Servers

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Under Network, click Elastic Load Balancing.
  4. Locate the target load balancer and click its name.
  5. Click Backend Server Groups, locate the target backend server group, and click its name.
  6. In the Basic Information area, click Add in the upper left corner of the server list. Confirm the subnet, specify the backend port, and select the backend servers to be added.
  7. Click OK.

Remove Backend Servers

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Under Network, click Elastic Load Balancing.
  4. Locate the target load balancer and click its name.
  5. Click Backend Server Groups, locate the target backend server group, and click its name.
  6. In the Basic Information area, select and remove the target servers.
    • To remove a single server, locate the target server and click Remove in the Operation column. Alternatively, select the target server and click Remove in the upper left corner of the server list.
    • To remove multiple backend servers, select all servers to be removed and click Remove in the upper left corner of the server list.
  7. In the Remove Backend Server dialog box, click Yes.

Add a Backend Server Group

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Under Network, click Elastic Load Balancing.
  4. Locate the target load balancer and click its name.
  5. Under Backend Server Groups, click Add Backend Server Group.
  6. In the Add Backend Server Group dialog box, configure the parameters.
    For details about the parameters, see Table 1 and Table 2.
    Table 1 Parameters for adding a backend server group

    Parameter

    Description

    Example Value

    Backend Server Group

    Specifies a group of servers with the same features.

    • Select Create new if you want to create a backend server group.
    • Select Use existing if you want to use an existing backend server group.

    Create new

    Name

    Specifies the backend server group name.

    server_group-sq4v

    Backend Protocol

    Specifies the protocol used by backend servers to receive requests.

    HTTP

    Load Balancing Algorithm

    Specifies the algorithm the load balancer uses to distribute traffic.

    • Weighted round robin: Connection requests are forwarded to different servers based on their weights, which indicate server processing performance. Backend servers with higher weights receive proportionately more requests, whereas equal-weighted servers receive the same number.
    • Weighted least connections: In addition to the weight assigned to each server, the number of connections processed by each backend server is also considered. Connection requests are forwarded to the server with the lowest connections-to-weight ratio.
    • Source IP hash: The source IP address of the request is input into a hash algorithm, and the resulting hash is used to identify an ECS in the static fragment table.
    NOTE:

    As access traffic changes, choose the most appropriate algorithm to improve load balancing.

    Weighted round robin

    Sticky Session

    Specifies whether to enable sticky sessions. After this feature is enabled, all requests from a client during one session are sent to the same backend server.

    NOTE:

    For HTTP and HTTPS listeners, enabling or disabling sticky sessions may cause few seconds of service interruption.

    N/A

    Sticky Session Type

    Specifies the sticky session type. The following options are available:

    • Source IP address: The hash of the source IP address of the request is used to identify a server in the static fragment table.
    • HTTP cookie: The load balancer generates a cookie after receiving a request from a client. All the subsequent requests with the cookie will be distributed to the same backend server for processing.
    • App cookie: This method relies on backend applications. All requests with the cookie generated by backend applications are distributed to the same backend server.
    NOTE:

    Source IP address is the only choice available when TCP is used as the frontend protocol. If HTTP or HTTPS (Termination) is selected as the frontend protocol, the sticky session type can be HTTP cookie or App cookie. Choose an appropriate sticky session type to better distribute access traffic and improve load balancing.

    Source IP address

    Cookie Name

    Specifies the cookie name. When App cookie is selected, you need to enter a cookie name.

    cookieName-qsps

    Description

    Provides supplementary information about the backend server group.

    N/A

    Table 2 Parameters for configuring a health check

    Parameter

    Description

    Example Value

    Enable Health Check

    Specifies whether to enable health checks.

    N/A

    Protocol

    Specifies the health check protocol. You can use either TCP or HTTP. Once you have selected a specific protocol, you cannot change it. If the frontend protocol is UDP, the health check protocol is UDP by default.

    HTTP

    Domain Name

    Specified the domain name in the health check request. The domain name can consist of digits, letters, hyphens (-), and periods (.), and must start with a digit or letter. The field is left blank by default and is available only when the health check protocol is HTTP.

    www.elb.com

    Port

    Specifies the health check port. The port numbers range from 1 to 65535.

    NOTE:

    If no health check port is specified, the port of each backend server is used. If a port is specified, it will be used for health checks.

    80

    Advanced Settings

    Provides some advanced features. Two options are available, Default and Custom.

    Default

    Interval (s)

    Specifies the maximum number of seconds between health checks.

    The value ranges from 1 to 50.

    5

    Timeout (s)

    Specifies the maximum number of seconds to wait for receiving the result of a health check. The value ranges from 1 to 50.

    10

    Check Path

    Specifies the health check URL. This parameter is valid when Protocol is set to HTTP. The value can contain 1 to 80 characters.

    /index.html

    Maximum Retries

    Specifies the maximum number of retries for the health check. The value ranges from 1 to 10.

    3

  7. Click OK.

Disable Health Check

  1. Log in to the management console.
  2. In the upper left corner of the page, click and select the desired region and project.
  3. Under Network, click Elastic Load Balancing.
  4. Locate the target load balancer and click its name.
  5. Click Backend Server Groups, locate the target backend server group, and click its name.
  6. In the Basic Information area, click Configure beside Health Check.
  7. In the Configure Health Check dialog box, disable the health check function.
  8. Click OK.