After creating a listener, you can also configure the real server group and health check settings for that listener.
If the computing performance of the real servers in a real server group differs significantly, use the weighted round robin algorithm for load balancing as a best practice. This algorithm assigns new connections to real servers based on load weight values calculated by using the performance capability of real servers.
If the real servers in a real server group process different requests and the processing time differs significantly, use the weighted least connection algorithm as a best practice.
To distribute requests of a client to a fixed real server, enable session persistence or use the source IP algorithm.
For ordinary Web services such as website hosting, use TCP or HTTP for health check. If you select HTTP, make sure real servers can provide URLs for HTTP health check and the URLs can return response codes and contents.
For Layer 4 services that require high availability, such as FTP and large-scale application systems, use ping or TCP for health check.
When you configure health check for intensively accessed Web services such as portal sites and on-line shopping sites, decrease the maximum number of retries, increase the health check interval, and select a Layer 4 protocol to reduce impacts on the services.
On the top navigation bar, click Cloud Services, and then select Load Balancing from the Network menu.
Click a load balancer name.
Click Create on the Listeners tab.
Configure listening parameters as described in Table-1.
When you configure listening parameters, use the restrictions and guidelines in "Restrictions and guidelines."
Table-1 Configuring listening parameters
Parameter |
Description |
Name |
Specify a name for the listener. |
Description |
Specify a description for the listener. |
Protocol |
Select a protocol which the listener listens to. Options are TCP, HTTP, HTTPS, and UDP. |
Source Network Address Translation |
Set whether to translate source IP addresses of packets into the virtual service IP address. |
Real Network Address Translation |
Set whether to insert real source IP addresses of packets to the HTTP extended field after the SNAT is performed. This field is displayed after you specify the protocol as HTTP or HTTPS. |
Port Number |
Enter a port number on which the listener listens for requests from clients. |
Idle Timeout |
Set the TCP idle timeout. If a server has not received any TCP packets when this timer expires, the listener will close the TCP session and release resources. For F5 LB devices, you must configure this parameter. |
Server Certificate |
Specify the server certificate uploaded by the organization. To create a certificate, click Create Certificate. For more information, see "Create a certificate." This field is displayed after you specify the protocol as HTTPS. |
Enable Connection Limit |
Set whether to enable connection limit. By default, connection limit is disabled. You can enable connection limit and set the maximum number of connections. |
Click OK.
After the listener is successfully created, click Create in the dialog box that opens to create a real server group, or click Cancel to finish.
After a listener is successfully created, click Create in the dialog box that opens. Alternatively, create a real server group on the Real Server Groups tab as described in "Create a real server group."
Configure real server group parameters as described in Table-2.
When you configure real server group parameters, use the restrictions and guidelines in "Restrictions and guidelines."
Table-2 Configuring real server group parameters
Parameter |
Description |
||
Name |
Specify a name for the real server group. |
||
Description |
Specify a description for the real server group. |
||
Listener |
Select a listener with which the real server group is associated when you create a real server group on the Real Server Groups tab. By default, the listener created at the previous step is selected. |
||
Default Configuration/Custom Configuration |
Select Custom Configuration to configure the LB algorithm and enable session persistence. By default, weighted round robin algorithm is selected and session persistence is disabled. |
||
LB Algorithm |
Weighted Round Robin |
Assign new connections to real servers based on load weight values. The system assigns more connections to a real server with a larger load weight. This algorithm typically applies to short connection services, such as HTTP. |
|
Least Connections |
Always assign new connections to the real server with the fewest number of weighted active connections (the total number of active connections divided by weight). This algorithm typically applies to long connection services, such as database connection. This option is available after you select Custom Configuration. |
||
Source IP |
Hash the source IP address of user requests and distribute user requests to different real servers according to the hash values. This algorithm allows a fixed real server to process the requests of a specific client. This option is available after you select Custom Configuration. |
||
Session Persistence |
Set whether to enable session persistence. This feature allows a fixed real server to process the requests of a specific client. By default, session persistence is disabled. This field is available after you select Custom Configuration. |
||
Session Persistence Type |
APP_COOKIE |
Identify clients by creating different cookies for app sessions. Requests from the clients with the same cookie are processed by the same real server. |
|
HTTP_COOKIE |
Add a tag to the HTTP response for the first connection of a client. Requests with the same tag are processed by the same real server. |
||
SOURCE_IP |
Hash the source IP address of user requests and distribute user requests to different real servers according to the hash values. Requests sourced from the same IP address are processed by the same real server. |
||
Cookie Name |
Enter an APP cookie name if you select APP_COOKIE as the session persistence type. Make sure the cookie name matches that configured for the application on the real server. |
Click OK.
After the real server group is successfully created, click Create in the dialog box that opens to create a health check monitor, or click Cancel to finish.
After a real server group is successfully created, in the dialog box that opens, click Create. Alternatively, create a health check monitor on the Real Server Groups tab as described in "Create a health check monitor."
Configure health check parameters as described in Table-3.
When you configure health check parameters, use the restrictions and guidelines in "Restrictions and guidelines."
Table-3 Configuring health check parameters
Parameter |
Description |
|
Name |
Specify a name for the health check monitor. |
|
Health Check Protocol |
Select a protocol for health check. |
|
For HTTP or HTTPS |
HTTP Method |
Select an HTTP method. Options include GET and POST. When CloudOS interoperates with AD-DC or SAN, only GET is supported. |
URL |
Enter a URL for accessing real servers. |
|
Expected Response Code |
Enter the HTTP response code that real servers are expected to return. The response code contains the status of the real servers. The first digit of the response code identifies the response code type. The function of second and third digit is not defined. |
|
Expected Response Contents |
Enter the HTTP response contents that real servers are expected to return. |
|
Check Interval |
Set the interval between two consecutive health check operations. |
|
Timeout |
Set the health check timeout timer. |
|
Maximum Retries |
Set the maximum number of consecutive health check failures. If this limit is reached for a real server, the system stops distributing traffic to it. |