Configure IBM® Load Balancer on a server running on
IBM
AIX® or Linux™.
Before you begin
Install IBM Load
Balancer and assign two static IP addresses to it. The server selected
for the Load Balancer installation must reside on the same LAN segment
as the nodes to be clustered.
About this task
Configure IBM Load
balancer to support your cluster using MAC Address rewriting. With
this method, the load balancer receives a packet intended for the
cluster. It uses configured metrics to determine which node in the
cluster should process the message, and then sends the message back
out to the network, routing it to the appropriate node's MAC address.
Each of the nodes in the cluster is configured with a loopback adapter;
when the packet is rewritten to the network, the appropriate node
will receive and process the packet.
As you work through the
procedure, you will switch back and forth between the Load Balancer
interface and a command window.
Procedure
- Configure the nodes of the cluster.
Add a loopback adapter
with the IP address of the cluster on each of the nodes of the cluster.
For instructions, see the Load Balancer Administration Guide, which
can be downloaded from the WebSphere® Application
Server - Edge Components site.
- Configure port settings on the cluster nodes so that IBM Load Balancer can route the
packets properly:
Attention: IBM Load Balancer requires every node in the
cluster to use same port number for STUN (typically, port 3478). If
you have configured your nodes to use different port numbers, change
them to the same port now.
- Configure load balancing for the cluster:
- Open a command window on the load balancer server.
- Start the load balancer's Dispatcher process with
the following command:
- If you are using IPv6 addresses, enable the processing
of IPv6 packets:
Log in as root and run the following command only once; thereafter, you can start and stop the
executor as often as you need. If you do not issue the command to enable processing of IPv6 packets
on these systems, the executor will not start.
AIX
- Run the following command:
autoconf6
- To enable uninterrupted processing of IPv6 packets, even after a system reboot, edit the
etc/rc.tcpip file and uncomment the following line, and add the -A flag:
start usr/bin/autoconf6 " " -A
Linux Run the following command (you must be logged in as
root):
modprobe ipv6
- Start the executor function of the dispatcher:
- Add the cluster to the service:
dscontrol cluster add cluster's_fully_qualified_host_name
where
cluster's_fully_qualified_host_name is
the fully qualified host name that you assigned to the cluster when
you installed the load balancer; for example:
stms-cluster.example.com
- Add the cluster port:
dscontrol port add cluster's_fully_qualified_host_name@port
where
cluster's_fully_qualified_host_name@port is
the fully qualified host name that you assigned to the cluster when
you installed the load balancer, with the TURN port appended to it
(typically port 3478); for example:
st-turn-cluster.example.com@3478
- Add the nodes for which this server will balance workload:
dscontrol server add cluster_host@port@primary_node
dscontrol server add cluster_host@port@secondary_node
where:
- Now start the Load Balancer administration interface
with the following command:
./lbadmin
Note: If
you have difficulty starting the administration interface, try stopping
and then starting the executor and dsserver services before running
the command again:
dsserver stop
dscontrol executor stop
dscontrol executor start
dsserver start
./lbadmin
- Continue configuring Load Balancer as follows:
- Add the cluster to the executor:
dscontrol executor add cluster's_fully_qualified_host_name
where
cluster's_fully_qualified_host_name is
the fully qualified host name that you assigned to the cluster when
you installed the load balancer; for example:
stms-cluster.example.com
- Start the manager:
- Define server affinity with a "sticky time":
The
dispatcher component of IBM Load
Balancer supports a configurable "sticky time". This means that the
load balancer will remember which cluster member a client was routed
to; subsequent requests will "stick to" the same server until the
preset time expires. The sticky time defaults to 0 seconds and there
is really no need to modify it for STUN requests. If you do want to
increase the sticky time, follow these steps:
- Open a command window on the load balancer server.
- Stop the service with the following command:
- Set the sticky time with the following command:
dscontrol port set fully_qualified_host_name@port_number stickytime number_of_seconds
Where:
- fully_qualified_host_name is the fully qualified
host name of the server where IBM Load
Balancer runs.
- port_number is the port that will be affected
by the new sticky time setting.
- number_of_seconds is the duration, in seconds,
of the time that a client should "stick to" the specified port.
For example:
dscontrol port set myserver.com@80 stickytime 60
- Save the load balancer settings:
- In IBM Load Balancer,
return to the navigation tree and right-click on the host name of
the load balancer you just configured (for example,
loadbal.example.com
).
- Click Save Configuration File as and
accept the default name (
default.cfg
).The
configuration settings stored in default.cfg
are
restored every time the server is restarted.
- Click OK.