Adding Backend Servers to or Removing Backend Servers
Scenarios
When using ELB, ensure that at least a healthy backend server is in the backend server group associated with your load balancer. If the number of requests increases, you need to add more backend servers.
After a backend server is removed, it cannot receive requests from the load balancer. You can add it back to the backend server group when the traffic goes up again.
If a load balancer is associated with an AS group, instances in the AS group are automatically added to the backend server group of the load balancer. If instances are removed from the AS group, they will be automatically removed from the backend server group.
Add Backend Servers
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click Service List. Under Network, click Elastic Load Balance.
- Locate the target load balancer and click its name.
- Click Backend Server Groups, locate the target backend server group, and click its name.
- In the Basic Information area, click Add in the upper left corner of the server list. Select the subnet where the backend servers reside, select the backend servers to be added, and click Next.
If a backend server has multiple NICs, you can only select the subnet where the primary NIC resides and use the primary NIC to add the backend server.
- Set the weights and backend ports of backend server and click Finish.
In the Backend Port text box, enter the port of the backend server. If the ports of multiple backend servers are the same, you can enter the ports in the Batch Add Port text box and then click OK.
- Click OK.
Remove Backend Servers
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click Service List. Under Network, click Elastic Load Balance.
- Locate the target load balancer and click its name.
- Click Backend Server Groups, locate the target backend server group, and click its name.
- In the Basic Information area, click Remove in the Operation column to remove a backend server. To remove multiple backend servers, select all the backend servers to be removed and click Remove above the server list.
- Click Yes.
Add a Backend Server Group
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click Service List. Under Network, click Elastic Load Balance.
- Locate the target load balancer and click its name.
- Under Backend Server Groups, click Add Backend Server Group.
- In the Add Backend Server Group dialog box, set 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
Name
Specifies the name of the backend server group.
server_group-sq4v
Backend Protocol
Specifies the protocol used by backend servers to receive requests.
HTTP
Load Balancing Algorithm
Specifies the algorithm used by the load balancer to distribute traffic.
- Weighted round robin: Requests are routed 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 of requests.
- Weighted least connections: The Least connections algorithm uses the number of active connections to each backend server to make its load balancing decision. Building on Least connections, the Weighted least connections algorithm assigns a weight to each server based on their processing capability.
- Source IP hash: The source IP address of the request is input into a hash algorithm, and the resulting hash is used to identify a server in the static fragment table.
NOTE:Choose an appropriate algorithm based on your business needs for better traffic distribution.
Weighted round robin
Sticky Session
If the sticky session feature is enabled, all requests from the same 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: Requests with the same source IP address are routed to the same backend server for processing.
- Load balancer cookie: The load balancer generates a cookie after receiving a request from the client. All subsequent requests with the cookie are routed to the same backend server for processing.
- Application cookie: This method relies on backend applications. The application on the first backend server that receives the request generates a cookie. All subsequent requests that contain the cookie will be processed by 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 is selected as the frontend protocol, the sticky session type can be Load balancer cookie or Application cookie. Choose an appropriate sticky session type to better distribute requests and improve load balancing.
- Sticky sessions at Layer 4 are maintained for one minute, while sticky sessions at Layer 7 are maintained for 24 hours.
Application cookie
Cookie Name
Specifies the cookie name. When Application cookie is selected, you need to enter a cookie name.
cookieName-qsps
Stickiness Duration (min)
Specifies the duration that sticky sessions are maintained in minutes. The value ranges from 1 to 60.
20
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 the health check function.
N/A
Protocol
Specifies the protocol used by the load balancer to perform health checks on backend servers.
- If the frontend protocol is TCP, HTTP or HTTPS, the health check protocol can be TCP or HTTP. The health check protocol cannot be changed once it is set.
- If the frontend protocol is UDP, the health check protocol is UDP by default.
HTTP
Domain Name
Specifies the domain name in the health check request. The domain name consists of digits, letters, hyphens (-), and periods (.), and must start with a digit or letter. This parameter is left blank by default and needs to be set only when the health check protocol is HTTP.
www.elb.com
Port
Specifies the port used by the load balancer to perform health checks on backend servers. This is an optional parameter. The port numbers range from 1 to 65535.
NOTE:If no port is specified, the port of each backend server is used for health checks by default.
80
Advanced Settings
Provides some advanced features. Two options are available, Default and Custom.
Default
Interval (s)
Specifies the maximum time between health checks in the unit of second.
The value ranges from 1 to 50.
5
Timeout (s)
Specifies the maximum time required for waiting for a response from the health check in the unit of second. The value ranges from 1 to 50.
10
Check Path
Specifies the health check URL, which is the destination on backend servers for health checks. This parameter is available only when Protocol is set to HTTP. The value can contain 1 to 80 characters and must start with a slash (/).
/index.html
Maximum Retries
Specifies the maximum number of health check retries. The value ranges from 1 to 10.
3
- Click OK.
Modify a Backend Server Group
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click Service List. Under Network, click Elastic Load Balance.
- Locate the target load balancer and click its name.
- Click Backend Server Groups, locate the target backend server group, and click on the right of its name.
- Modify the parameters as needed and click OK.
Delete a Backend Server Group
- Log in to the management console.
- In the upper left corner of the page, click and select the desired region and project.
- Click Service List. Under Network, click Elastic Load Balance.
- Locate the target load balancer and click its name.
- Click Backend Server Groups, locate the target backend server group, and click on the right of its name.
- Click Yes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot