Configure the Load Balancer cluster using the GUI

The configuration can be done using the Load Balancer graphical user interface (lbadmin) or using the command-line interface (dscontrol). We first explain how to do it using the GUI, and later we show the commands (which give you the same result).

In order to send commands through the GUI or through the command line interface to Load Balancer, you need to start the component element that receives those commands and executes them.

1. Start the Dispatcher server in order to start configuring it. To do so, run the following command:

dsserver

2. Open the Load Balancer GUI by running the following command:

lbadmin

The Load Balancer GUI is a Java client that can also be installed on a client machine, so the administrator can work remotely.

3. When the Load Balancer administration tool comes up, right-click Dispatcher in the left pane and select Connect to Host, as shown in Figure 11-10.

Figure 11-10 Load Balancer administration console

4. A pop-up window is displayed, prompting you for the Load Balancerserver that you want to connect to. Select the host name of the Load Balancer server, as shown in Figure 11-11.

Figure 11-11 Selecting the Load Balancer server

After connecting to the Load Balancer server, a new entry is added to the GUI window in the left pane, containing the host name of the selected server. All the configuration we perform from now on is added to this element in a tree structure.

5. Now we need to start the Executor component, which is the component that actually distributes the load to the servers. Right-click Host:srvb504.torolab.ibm.com and select Start Executor, as shown in Figure 11-12.

Figure 11-12 Starting the Executor

If Executor is started successfully, a new item named Executor is added to the left pane. In our scenario, the Load Balancer IP address is 9.26.126.103, so this IP address is shown in this new item as well.

Tip: For every action that you perform, you can see a message in the bottom pane of the GUI window that confirms whether the action was performed successfully.

6. The next thing that we need to do is to add our cluster. In our scenario, we have a cluster called wcha.torolab.ibm.com (9.26.126.103),and this cluster contains two Web servers, srvb501.torolab.ibm.com (9.26.126.120) and srvb504.torolab.ibm.com (9.26.127.157).

Right-click Executor: 9.26.127.157 and select Add Cluster, as shown in Figure 11-13.



Figure 11-13 Adding a cluster

7. A new window is displayed, prompting for the necessary information to add the new cluster. Type the name of the cluster in the Cluster field (IBM recommends using the host name). Then type the cluster IP address in the Cluster address field, and make sure that the Load Balancer's IP address (which in our scenario is the same address as that of Web server node 2) is selected in the Primary host for the cluster field.

Check the option Configure this cluster?, as shown in Figure 11-14. This option is used to create an IP alias in the operating system for the cluster IP address. You can also uncheck this option and add the IP alias manually using operating system tools or commands.



Figure 11-14 Filling in the information for adding a cluster

8. If you checked the Configure this cluster? check box, another window is displayed. Enter the interface identification in the Interface name field (in our server the interface that is associated with the IP address 9.26.126.103 is en0) and the network mask in the Netmask field, as shown in Figure 11-15.

Figure 11-15 Configuring the interface

A new item that identifies your cluster is added to the left pane of the GUI.

9. Add each port that will be load balanced by Dispatcher. Right-click Cluster: wcha.torolab.ibm.com and select Add Port, as shown in Figure 11-16.

Figure 11-16 Adding a port

The port that we are adding refers to the port that the clients will access. For WebSphere Commerce, clients typically use ports 80 (HTTP) and 443 (HTTPS) to access the stores. You may also want to add the ports for the administrative consoles (8000, 8002, and so on) if you want console access to be load balanced. In our scenario, we use ports 80 and 443.

10. Fill in the number of the port in the Port number field and select MAC Based Forwarding in the Forwarding method field, as shown in Figure 11-17.

Figure 11-17 Entering port information

11. Add the servers that will receive the load for port 80 of cluster cluster.itso.ibm.com. Right-click Port:80 and select Add Server, as shown in Figure 11-18.

Figure 11-18 Adding a server to a port

The next window prompts you for the information of the first server. Fill in the host name of your Web server in the Server field and enter its IP address in the Server address field, as shown in Figure 11-19, for Web server node 1 of our scenario.



Figure 11-19 Entering balanced server information

Note that the Network router address check box is disabled because we selected MAC forwarding and this forwarding method does not allow load balancing to remote servers.

Repeat step 11 for all servers in the cluster.

Repeat step 10, including step 11, for all load balanced ports.

After adding all ports and adding all servers to each port, the tree view for our scenario is displayed, as shown in Figure 11-20.



Figure 11-20 Configuration tree view after adding all ports and servers

The load balancing part of the configuration is done. All the information that Dispatcher needs to provide load balancing for our cluster is now configured. But we also need the Manager component because we want to work with dynamic weight values and failure detection.

12. Therefore, we now need to start the Manager component. Right-click Host: srvb504.torolab.ibm.com and select Start Manager, as shown in Figure 11-21.

Figure 11-21 Starting the Manager

A window is displayed in which you can select the name of the Manager log file and the metric port, as shown in Figure 11-22. We choose the default options.



Figure 11-22 Manager options

The Manager needs advisors in order to generate a weight value based on the response time from each server in the cluster. The advisor is also needed in order to detect a failure in the service of any balanced server.

Due to the importance of the advisor, when you start Manager, the Load Balancer GUI automatically displays a pop-up window prompting you to start an advisor.

In our scenario, we are load balancing Web servers using the HTTP and HTTPS protocols. Therefore, we first use the default values, as shown in Figure 11-23, which are HTTP in the Advisor name field and 80 the Port number field.



Figure 11-23 Starting the HTTP advisor

You can also choose a specific cluster with which to associate this advisor. By leaving the optional Cluster to advise on field blank, this advisor is automatically associated with all clusters that are load balancing port 80.

If you want to specify a log filename for this advisor, type in the desired name in the Log filename field. The default filename for the HTTP advisor is Http_80.log.

13. As we are also balancing the HTTPS port 443, we start an advisor for SSL by right-clicking Manager and selecting Start advisor, as shown in Figure 11-24.

Figure 11-24 Starting an additional advisor

The pop-up window for specifying the advisor information is displayed again an we choose the SSL advisor, as shown in Figure 11-25.



Figure 11-25 Starting the SSL advisor

Again, leaving the Cluster to advise on field blank, the advisor is associated with all clusters load balancing port 443. The default log file name for the SSL advisor is Ssl_443.log.

Note: The SSL advisor is a lightweight advisor for SSL connections. It does not establish a full SSL socket connection with the server. The SSL advisor opens a connection, sends an SSL CLIENT_HELLO request, waits for a response, closes the connection, and returns the elapsed time as a load. There is also an HTTPS advisor. It is a heavyweight advisor for SSL connections. It performs a full SSL socket connection with the server. The HTTPS advisor opens an SSL connection, sends an HTTPS request, waits for a response, closes the connection, and returns the elapsed time as a load. For more information about advisors, refer to Load Balancer Administration Guide, GC31-6858.

14. If Load Balancer is collocated with one of the Web servers, we need to change the server configuration. This is the case in our scenario where Load Balancer is collocated with Web server node 2, srvb504.torolab.ibm.com.

Select Server: srvb504.torolab.ibm.com under Port: 80. On the right pane, select the Configuration settings tab and select yes in the Collocated drop-down box, as shown in Figure 11-26.



Figure 11-26 Configuring collocation

After making the change, do not forget to click the Update Configuration button at the bottom. (If you do not click the button and navigate away from the view, your changes are not saved.)

Repeat step Figure 14 for all occurrences of the collocated server under all ports.

We have concluded the basic load balancing configuration, so we should save the configuration performed so far.

15. Right-click Host: srvb504.torolab.ibm.com and select Save Configuration File As, as shown in Figure 11-27.

Figure 11-27 Saving the Load Balancer configuration

A pop-up window is displayed (Figure 11-28). In the Filename field, you can either select an existing configuration file (which will be overwritten) or you can enter a new filename.

The filename default.cfg is the default name for Load Balancer. This means that when you start the Dispatcher server (dsserver), it will look for the file default.cfg and, if it exists, it will load it. default.cfg is stored in <LB_Install_Dir>/servers/configurations/dispatcher.



Figure 11-28 Choosing the configuration filename

xxxx