If you want to use ELB to balance traffic, you must associate at least one backend server group with a listener and add at least one backend server to the backend server group.
A backend server group can be associated with listeners of different load balancers.
Table 1 describes the scenarios for creating a backend server group.
Scenario | Reference |
|---|---|
Creating a backend server group and associating it with a load balancer | |
Creating a backend server group when adding a listener | Adding listeners with different protocols by referring to Listener Overview |
Changing the backend server group associated with a listener |
The backend protocol of the new backend server group must match the frontend protocol of the listener, as described in Table 2.
Load Balancer Specification | Frontend Protocol | Backend Protocol |
|---|---|---|
Network load balancing | TCP | TCP |
Network load balancing | UDP |
|
Network load balancing | TLS |
|
Application load balancing | HTTP | HTTP |
Application load balancing | HTTPS |
|
Application load balancing | QUIC |
|
in the upper left corner of the console and select a desired region and project.
in the upper left corner to display Service List and choose Network > Elastic Load Balance.Parameter | Description |
|---|---|
Backend Server Group Name | Specifies the name of the backend server group. |
Type | Specifies the type of load balancer that can use the backend server group. Select Dedicated. |
Load Balancer | Specifies whether to associate a load balancer. You can associate an existing dedicated load balancer when you create a backend server group or associate one later. A backend server group can be associated with multiple load balancers or listeners. After the group is created, associate it with listeners to complete service configuration.
|
Backend Server Group Type | Specifies the type of the backend server group.
|
Forwarding Mode | Specifies the forwarding mode to distribute traffic. There are two options: Load balancing and Active/Standby.
|
VPC | Specifies the VPC where the backend server group works. You can associate the backend server group with a load balancer in this VPC. This parameter is mandatory if you select Hybrid for Backend Server Group Type. You can select an existing VPC or create a new one. For more information about VPC, see the Virtual Private Cloud User Guide. |
Backend Protocol | Specifies the protocol that backend servers in the backend server group use to receive requests from the listeners. The protocol varies depending on the forwarding mode:
|
IP Address Version | Specifies the IP address version of backend servers that can be added to the backend server group. By default, IPv4 backend servers are supported. There are two options when the backend protocol is TCP or UDP:
|
Forward to Same Port | If this option is enabled, you do not need to specify a backend port when you add a backend server. The listener routes the requests to the backend server over the same port as the frontend port. This option cannot be disabled after being enabled. NOTE: This option is available only for TCP and UDP backend server groups associated with a dedicated load balancer. |
Load Balancing Algorithm | Specifies the algorithm used by the load balancer to distribute traffic. The following options are available:
For more information about load balancing algorithms, see Configuring Load Balancing Algorithms to Distribute Traffic. |
Sticky Session | Specifies whether to enable sticky sessions if you have selected Weighted round robin, Connection ID, or Weighted least connections for Load Balancing Algorithm. If you enable sticky sessions, all requests from the same client during one session are sent to the same backend server. For more information about sticky sessions, see Enabling Sticky Session to Accelerate Access. NOTE:
|
Sticky Session Type | Specifies the sticky session type. This parameter is mandatory if Sticky Session is enabled. You can select one of the following types:
NOTE:
|
Stickiness Duration (min) | Specifies how long the sticky session is maintained, in minutes. This parameter is mandatory if Sticky Session is enabled.
|
Slow Start | Specifies whether to enable slow start. This parameter is optional if you have selected Weighted round robin for Load Balancing Algorithm. After you enable this option, the load balancer linearly increases the proportion of requests to backend servers in this mode. When the slow start duration elapses, the load balancer sends full share of requests to backend servers and exits the slow start mode. NOTE: Slow start is only available for HTTP, and HTTPS backend server groups of dedicated load balancers. For more information about the slow start, see Configuring Slow Start for a Backend Server Group. |
Slow Start Duration (s) | Specifies how long the slow start will last, in seconds. This parameter is mandatory if Slow Start is enabled. |
Description (Optional) | Provides supplementary information about the backend server group. |
Add cloud servers, supplementary network interfaces, and IP as backend servers to this backend server group. For details, see Backend Server Overview.
Configure health check for the backend server group based on Table 4. For more information about health checks, see Health Check.
Parameter | Description |
|---|---|
Health Check | Specifies whether to enable the health check option. If health check is enabled, click |
Health Check Protocol | Specifies the protocol that will be used by the load balancer to check the health of backend servers.
|
Domain Name | Specifies the domain name that will be used for the health check. This parameter is mandatory if the health check protocol is HTTP or HTTPS.
|
Health Check Port | Specifies the port that will be used by the load balancer to check the health of backend servers. The port number ranges from 1 to 65535. NOTE: By default, the service port on each backend server is used. You can also specify a port for health checks. |
Path | Specifies the health check path, which is the destination on backend servers for health checks. This parameter is mandatory if the health check protocol is HTTP or HTTPS. The path can contain 1 to 80 characters and must start with a slash (/). The path can contain letters, digits, hyphens (-), slashes (/), periods (.), question marks (?), number signs (#), percent signs (%), ampersands (&), and extended character sets _;~!. () *[]@$^:',+ |
Interval (s) | Specifies the maximum time between two consecutive health checks, in seconds. The interval ranges from 1 to 50. |
Timeout (s) | Specifies the maximum time required for waiting for a response from the health check, in seconds. The value ranges from 1 to 50. |
Healthy Threshold | Specifies the number of consecutive successful health checks required for declaring a backend server healthy. The value ranges from 1 to 10. |
Unhealthy Threshold | Specifies the number of consecutive failed health checks required for declaring a backend server unhealthy. The value ranges from 1 to 10. |
Status Code | Specifies the status codes that will be returned to the load balancer to indicate the health of backend servers. This parameter is available only when you set the health check protocol to HTTP or HTTPS. You can enter any unique number from 200 to 599, or a number range, for example, 200-300. The default value is 200. A maximum of five HTTP status codes and number ranges are supported. If there is more than one status code or number range, press Enter to separate them. |
You can associate the backend server group with the listener of a dedicated load balancer in the ways listed in Table 1.