Adding or Removing Backend Servers (SharedLoad Balancers)
Scenarios
When you use 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.
Adding 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 load balancer and click its name.
- Click Backend Server Groups, locate the 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 you want to add, 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.
- Backend servers cannot be added using a virtual IP address.
- 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.
Removing 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 load balancer and click its name.
- Click Backend Server Groups, locate the 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 the backend servers you want to remove and click Remove above the server list.
- Click Yes.
Adding 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 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 requirements for better traffic distribution.
Weighted round robin
Sticky Session
Specifies whether to enable sticky sessions. If you enable sticky sessions, 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 you use HTTP or HTTPS 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. If you select Application cookie, enter a cookie name.
cookieName-qsps
Stickiness Duration (min)
Specifies the duration that sticky sessions are maintained in minutes. The stickiness duration 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 health checks.
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 can contain 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.
Port range: 1 to 65535
NOTE:If you do not specify a health check port, the port of each backend server will be used for health checks by default.
80
Advanced Settings
Provides some advanced features.
Default
Interval (s)
Specifies the maximum time between health checks, in seconds.
The interval ranges from 1 to 50.
5
Timeout (s)
Specifies the maximum time required for waiting for a response from the health check, in seconds. The timeout duration 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 path 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.
Modifying 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 load balancer and click its name.
- Click Backend Server Groups, locate the backend server group, and click
on the right of its name. - Modify the parameters as needed and click OK.
Deleting 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 load balancer and click its name.
- Click Backend Server Groups, locate the backend server group, and click
on the right of its name. - Click Yes.
Last Article: Configuring Slow Start (Dedicated Load Balancers)
Next Article: Adding or Removing Backend Servers (Classic Load Balancers)
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.