Configuring a Web server cluster

Configuring a Web server cluster using the Load Balancer can be accomplished either through the command line or through a graphical user interface (GUI).

As an example, the GUI representation of the configuration used in our sample is illustrated in Figure 4-7.

Figure 4-7 Load Balancer configuration

A GUI wizard is also available to step you through the process of creating a basic configuration for the Dispatcher component.

In addition, a command-line interface (dscontrol command) can be used, alone or as part of the script files, making it easier to perform startup procedures and automation tasks.

In this section, we describe the basic steps to set up our configuration of Load Balancer, using the dscontrol command. In 7.4, Configuring Load Balancer, we describe the basic configuration of the Web server clustering used in our sample topology, using lbadmin, the administration GUI.

The configuration steps are:

1. Start the Load Balancer server

To start the server, type:

dsserver

Or,

dsserver start

This component is the basic user-space component of Load Balancer. Its role is to handle the command interface from the user, and to start and stop other components and threads. It is usually the first component started.

To stop the server, just type:

dsserver stop

2. Start the Executor function

To start the Executor function of the Dispatcher, which performs the core task of actually forwarding the packets, type:

dscontrol executor start

The Executor is the heart of the product, and the one kernel-space component of Load Balancer. Its main role is to forward packets. It receives packets from the network interface device, selects a server to handle the request, and forwards the packets to the selected server.

Important: The Executer will continue to run even when the Load Balancer server has been shut down.

Therefore, for a complete shutdown, the Executor should be stopped before dsserver is stopped.

3. Add a cluster

A cluster is the network address that the client sees. This address will be advertised on the network.

To configure the cluster, specify the address of the cluster (in our example www.itso.ibm.com or 10.20.10.100), type:

dscontrol cluster add www.itso.ibm.com

4. Add a port

To add the HTTP port protocol to the Dispatcher configuration, type:

dscontrol port add www.itso.ibm.com:80

5. Add servers

Add each of the Web servers (web1 and web2) to the Dispatcher configuration, by typing:

dscontrol server add www.itso.ibm.com:80:web1

dscontrol server add www.itso.ibm.com:80:web2

6. Configure the server to accept traffic

To configure the server to accept traffic for the cluster address, type:

dscontrol cluster configure www.itso.ibm.com

7. Start the manager

To start the manager function of Dispatcher, type:

dscontrol manager start

The manager's role is to dynamically set the "weights" the Executor uses to perform load balancing. When running by itself (without the manager), the Executor performs what is called weighted round robin load balancing, based upon static weights that can be manually set by the user. When starting the manager, it adjusts the weights in a dynamic fashion, based upon several statistical inputs. This provides a much more dynamic load balancing process.

8. Add the advisor

Start the advisor function of Dispatcher, to make sure that client HTTP requests to port 80 are not sent to a failed Web server, by typing:

dscontrol server start http 80

The role of the advisor component is to check the health of each server by performing a client request, and then inform the manager of the results, which uses it as input to set weights in the Executor. When an advisor detects that a server has died, the Executor will not forward any new requests to it until it is up again.

  Prev | Home | Next

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.