Reviewed-by: Hajba, László Antal <laszlo-antal.hajba@t-systems.com> Co-authored-by: zhoumeng <zhoumeng35@huawei.com> Co-committed-by: zhoumeng <zhoumeng35@huawei.com>
32 KiB
Creating a Backend Server Group (Dedicated Load Balancers)
Scenario
To route requests, you need to associate a backend server group to each listener.
You can create a backend server group for a load balancer in any of the ways described in Table 1.
Scenario |
Procedure |
---|---|
Creating a backend server group and associating it with a load balancer |
|
Creating a backend server group when adding a listener |
You can add listeners using different protocols as required. For details, see Overview. References are as follows: |
Changing the backend server group associated with the listener |
Constraints
The backend protocol of the new backend server group must match the frontend protocol of the listener as described in Table 2.
Procedure
- Log in to the management console.
- In the upper left corner of the page, click
and select the desired region and project.
- Click
in the upper left corner to display Service List and choose Network > Elastic Load Balancing.
- In the navigation pane on the left, choose Elastic Load Balancing > Backend Server Groups.
- Click Create Backend Server Group in the upper right corner.
- Configure the routing policy based on Table 3.
Table 3 Parameters required for configuring a routing policy Parameter
Description
Example Value
Load Balancing Type
Specifies the type of load balancers that can use the backend server group. Dedicated load balancers are recommended.
The following parameters apply to exclusive load balancers.
-
Load Balancer
Specifies whether to associate a load balancer.
-
Backend Server Group Name
Specifies the name of the backend server group.
server_group
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:
The options are HTTP, HTTPS, TCP, UDP, and QUIC.
HTTP
Load Balancing Algorithm
Specifies the algorithm used by the load balancer to distribute traffic. The following options are available:
- Weighted round robin: Requests are routed to different servers based on their weights. Backend servers with higher weights receive proportionately more requests, whereas equal-weighted servers receive the same number of requests.
- Weighted least connections: In addition to the number of connections, each server is assigned a weight based on its capacity. Requests are routed to the server with the lowest connections-to-weight ratio.
- Source IP hash: Allows requests from different clients to be routed based on source IP addresses and ensures that requests from the same client are forwarded to the same server.
- Connection ID: This algorithm is available when you have selected QUIC for Backend Protocol. This algorithm allows requests with different connection IDs to be routed to different backend servers and ensures that requests with the same connection ID are routed to the same backend server.
For more information about load balancing algorithms, see Load Balancing Algorithms.
Weighted round robin
Sticky Session
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 Sticky Session.
-
Sticky Session Type
Specifies the sticky session type.
This parameter is mandatory if Sticky Session is enabled. You can select one of the following type:
- Source IP address: The source IP address of each request is calculated using the consistent hashing algorithm to obtain a unique hashing key, and all backend servers are numbered. The system allocates the client to a particular server based on the generated key. This allows requests from the same IP address are forwarded to the same backend server.
- Load balancer cookie: The load balancer generates a cookie after receiving a request from the client.
NOTE:- Source IP address is available when you have selected TCP, UDP, or QUIC for Backend Protocol.
- Load balancer cookie is available when you have selected HTTP or HTTPS for Backend Protocol.
Source IP address
Stickiness Duration (min)
Specifies the minutes that sticky sessions are maintained. This parameter is mandatory if Sticky Session is enabled.
- Sticky sessions at Layer 4: 1 to 60
- Sticky sessions at Layer 7: 1 to 1440
20
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 Slow Start (Dedicated Load Balancers).
-
Slow Start Duration (s)
Specifies how long the slow start will last, in seconds.
This parameter is mandatory if Slow Start is enabled.
30
Description
Provides supplementary information about the backend server group.
-
- Click Next to add backend servers and configure health check.
Add cloud servers, or IP addresses to this backend server group. For details, see Overview.
Configure health check for the backend server group based on Table 4. For more information about health checks, see Health Check. - Click Next.
- Confirm the specifications and click Create Now.
Related Operations
You can associate the backend server group with the listener of a dedicated load balancer in either ways listed in Table 1.