Build a Load Balancer network
Figure 20 shows a basic Load Balancer network with three locally attached workstations using the Dispatcher component's MAC
forwarding method to load balance Web traffic between two Web servers.
The configuration is similar when load balancing any other TCP or stateless
UDP application traffic.
Note:
This configuration can be completed using only two
workstations with Dispatcher located on one of the Web server workstations.
This represents a collocated configuration.
Workflow
To build a Load Balancer network, perform these procedures in the following order:
- Review required computer systems and software.
- Configure the network.
- Configure the Dispatcher.
- Test the Load Balancer network.
Review required computer systems and software
The following computer systems and software components are needed:
- Computer system to act as the Dispatcher. This system requires one actual
IP address and one address to be load balanced.
- Two computer systems to act as Web servers. Each Web server requires one
IP address.
Configure the network
- Set up your workstations so that they are on the same LAN segment. Ensure
that network traffic among the three machines does not have to pass through
any routers or bridges.
- Configure the network adapters of the three workstations. For this example,
assume you have the following network configuration:
Workstation |
Name |
IP Address |
1 |
server1.company.com |
9.67.67.101 |
2 |
server2.company.com |
9.67.67.102 |
3 |
server3.company.com |
9.67.67.103 |
Netmask = 255.255.255.0 |
Each of the workstations contains only one standard Ethernet network
interface card.
- Ensure that server1.company.com can ping both server2.company.com and
server3.company.com.
- Ensure that server2.company.com and server3.company.com can ping server1.company.com.
- Ensure that content is identical on the two Web servers (Server 2 and
Server 3). This can be done by replicating data on both workstations, by
using a shared file system such as NFS, AFS®, or DFS, or by any other means appropriate for
your site.
- Ensure that Web servers on server2.company.com and server3.company.com
are operational. Use a Web browser to request pages directly from http://server2.company.com
and http://server3.company.com.
- Obtain another valid IP address for this LAN segment. This is the address
you provide to clients who wish to access your site. For this example, the
information is as follows:
Name= www.company.com
IP=9.67.67.104
- Configure the two Web server workstations to accept traffic for www.company.com.
Add an alias for www.company.com to the loopback interface
on server2.company.com and server3.company.com.
- Delete any extra route that might have been created as a result of
aliasing the loopback interface.
You have now completed all configuration
steps that are required on the two Web server workstations.
Configure the Dispatcher
With Dispatcher, you can create a configuration by using the command line,
the configuration wizard, or the graphical user interface (GUI).
Note:
The parameter values must be typed in English characters.
The only exceptions are parameter values for host names and file names.
Configuring using the command line
If you are using the command line, follow these steps:
- Start the dsserver on Dispatcher:
- For AIX, HP-UX, Linux, or Solaris, run the following command
as root user: dsserver
- For Windows® platforms, dsserver runs as a service that
starts automatically.
- Start the executor function of Dispatcher:
dscontrol executor start
- Add the cluster address to the Dispatcher configuration:
dscontrol cluster add www.company.com
- Add the http protocol port to the Dispatcher configuration:
dscontrol port add www.company.com:80
- Add each of the Web servers to the Dispatcher configuration:
dscontrol server add www.company.com:80:server2.company.com
dscontrol server add www.company.com:80:server3.company.com
- Configure the workstation to accept traffic for the cluster address:
dscontrol executor configure www.company.com
- Start the manager function of Dispatcher:
dscontrol manager start
Dispatcher now does load balancing based on server performance.
- Start the advisor function of Dispatcher:
dscontrol advisor start http 80
Dispatcher now ensures that client requests are not sent to a failed Web server.
Your basic configuration with locally attached servers is now complete.
Configuring using the configuration wizard
If you are using the configuration wizard, follow these steps:
- Start the dsserver on Dispatcher:
- For AIX, HP-UX, Linux, or Solaris, run the following command
as root user:
dsserver
- For Windows systems, dsserver runs as a service that starts
automatically.
- Start the wizard function of Dispatcher, dswizard.
The wizard guides you step-by-step through the process of creating a basic
configuration for the Dispatcher component. It asks questions about your network
and guides you through the setup of a cluster for Dispatcher to load balance
the traffic for a group of servers.
The configuration wizard contains the following panels:
- Introduction to the wizard
- What is going to happen
- Preparing for the setup
- Choosing a host to configure (if necessary)
- Defining a cluster
- Adding a port
- Adding a server
- Starting an advisor
- Server machine setup
Configuring using the graphical user interface (GUI)
To start the GUI, follow these steps:
- Ensure that the dsserver process is running:
- For AIX, HP-UX, Linux, or Solaris, run the following command
as root:
dsserver
- For Windows systems, dsserver runs as a service that starts
automatically.
- Next, do one of the following:
- For AIX, HP-UX, Linux, or Solaris, type lbadmin.
- For Windows systems, click Start > Programs > IBM® WebSphere® > Edge Components > IBM Load Balancer > Load Balancer.
Test the Load Balancer network
- From a Web browser, go to location http://www.company.com to verify that
a page appears.
- Reload the page in the Web browser.
- Issue the following command: dscontrol server report www.company.com:80:. Verify that the total connections column of the two servers adds up
to 2.