Configuring the Load Balancer machine

Configure Load Balancer for IPv4 and IPv6 on the machine that you will use to load balance server traffic.

Before you begin

Before setting up the Dispatcher machine, you must be the root user (for AIX, HP-UX, Linux, or Solaris systems) or the Administrator on Windows systems.

For the Dispatcher machine you will need at least two valid IP addresses.

The figure below shows an example of Load Balancer set up with a single cluster, two ports, and three servers.

Example of the IP addresses needed for the Dispatcher machine

About this task

You must configure the machine on which Load Balancer is installed before you can load balance traffic in your network environment.

Review the new features section for what's been added and improved in this release.

Best practice Best practice: Maximize your load-balancing by being aware of explicit addressing in links, and avoid it where possible.

If your pages specify links that point to individual servers for your site, you are in effect forcing a client to go to a specific machine, thus bypassing any load balancing function that might otherwise be in effect.

In general, the load balancing function works independently of the content of the sites on which you use the product, but link addressing is one area in which the site content can be important. Decisions that you make regarding the site's content can have a significant impact upon the Load Balancer's efficiency. Use the address of Load Balancer in any links contained in your pages. Note that the kind of addressing used might not always be apparent if your site uses automated programming that dynamically creates HTML.

bprac
Avoid trouble Avoid trouble: Be aware of the following restrictions:
  • Load Balancer does not support passive FTP. To enable active FTP, refer to Problem: Load Balancer will not use passive FTP mode
  • [Solaris] Solaris back-end server: There is no support for load balancing IPv6 traffic to backend Solaris 5.8 servers. On Solaris 5.8, there is an incompatibility with a MAC-forwarded IPv6 packet and the Solaris IPv6 stack. When the cluster is configured on a Solaris 5.8 backend server using the ifconfig lo0 (loopback) command, the packet arrives at the Solaris 5.8 node, but is not accepted. However, you can use Load Balancer for IPv4 and IPv6 installations to load balance IPv4 traffic to backend Solaris 5.8 servers.
gotcha

Procedure

  1. [AIX][HP-UX][Linux][Solaris] Start the server function. To start the server function, type the following at a command prompt:
    dsserver
    Note: A default configuration file (default.cfg) gets automatically loaded when starting dsserver. If the user decides to save the Dispatcher configuration in default.cfg, then everything saved in this file is automatically loaded next time dsserver gets started.
  2. Start the executor function.
    1. Optional: If you are using IPv6 addresses, enable the processing of IPv6 packets.
      [AIX][Linux][Windows] Prior to starting the executor (dscontrol executor start), the following must be issued from the command line as root:
      • [AIX]
        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]
        modprobe ipv6
      • [Windows]
        netsh interface ipv6 install
      These commands enable processing of IPv6 packets in the respective operating systems. Issue this 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.
      [HP-UX][Solaris] Using the ifconfig command, IPv6 addresses must be plumbed and an interface configured in order for Dispatcher to inspect IPv6 packets. If you do not issue these commands, the executor will start, but no IPv6 packets can be viewed. Prior to starting the executor (dscontrol executor start), issue the following from the command line as root:
      • [HP-UX]
        ifconfig device inet6 up
      • [Solaris] Change the device to your device name, and change the IPv6 IP address and prefix to your address and prefix values:
        ifconfig device inet6 plumb
        ifconfig device inet6 address/prefix up
    2. To start the executor function, enter the dscontrol executor start command. You may also change various executor settings at this time.
  3. Optional: Define the non-forwarding address if it is different from the host name. The non-forwarding address is used to connect to the machine for administrative purposes, such as using Telnet or SMTP to this machine.
    By default, this address is the hostname. To define the non-forwarding address, enter the following command, or edit the configuration file:
    dscontrol executor set nfa IP_address
    where IP_address is either the symbolic name or the IP address.
  4. Define a cluster and set cluster options. Dispatcher will balance the requests sent to the cluster address to the servers configured on the ports for that cluster. The cluster is either the symbolic name, the dotted decimal address, or the special address 0.0.0.0 that defines a wildcard cluster. Wildcard clusters can be used to match multiple IP addresses for incoming packets to be load balanced.
    1. To define a cluster, issue the dscontrol cluster add command:
      dscontrol cluster add cluster
    2. To set cluster options, use the dscontrol cluster set command. Issue the following command:
      dscontrol cluster set options
    3. [Linux] If you use a qeth/OSA implementation in layer 3 mode on Linux on z/OS, perform the following additional configuration steps to setup Load Balancer.
      Note: These steps are not required if you run qeth/OSA in layer 2 mode.
      1. 1. Configure the cluster address using ip or ifconfig command:
        ip -version addr add cluster_address/prefix_length dev device
        For example:
        ip -4 addr add 12.42.38.125/24 dev eth0
        ip -6 addr add 3ffe:34::24:45/64 dev eth0
      2. Add an iptables rule to drop incoming packets destined to the cluster address:
        For IPv4 addresses:
        iptables -t filter -A INPUT -d cluster_address -j DROP
        For IPv6 addresses:
        ip6tables -t filter -A INPUT -d cluster_address -j DROP
        For example:
        iptables -t filter -A INPUT -d 12.42.38.125 -j DROP
        ip6tables -t filter -A INPUT -d 3ffe:34::24:45 -j DROP
      3. To undo the above configuration, use the following commands:
        ip -version addr del cluster_address/prefix_length dev device
        iptables -t filter -D INPUT -d cluster_address -j DROP
        ip6tables -t filter -D INPUT -d cluster_address -j DROP
  5. Define ports and set port options with the dscontrol port add command. You must define and configure all servers for a port.
    1. Define a port. Enter the following command:
      dscontrol port add cluster@port
      • cluster is either the symbolic name or the IP address
      • port is the number of the port you are using for that protocol
    2. Change various port settings. Read dscontrol port for more information on this command and the available options.
      New feature New feature:
      You can select a new option for the selection algorithm that Load Balancer uses to route traffic:
      • conn+affinity: Specifies that server selection is based on an existing connection. For new connections, the server selection is based on affinity.
      newfeat
    You can also edit the sample configuration file or use the GUI.
  6. Define the load-balanced server machines. To define a load-balanced server machine, enter the following command:
    dscontrol server add cluster@port@server
    You can also edit the sample configuration file or use the GUI. Cluster is either the symbolic name or the IP address, and port is the number of the port you are using for that protocol. You must define more than one server to a port on a cluster in order to perform load balancing.
    1. Configure IPv6 link-local address: With IPv6 addressing, each machine in the Load Balancer configuration must have an IPv6 link-local address. The link-local address is the address used for neighbor discovery traffic for IPv6, and without this address on the Load Balancer machine and on the back-end servers neighbor discovery does not occur, and the machines are not known to each other. Load Balancer for IPv6 cannot forward traffic without a link-local IPv6 address configured on an interface of each machine in the Load Balancer configuration.
    2. Optional: Bind-specific servers: If the Dispatcher component is load balancing to bind-specific servers, then the servers must be configured to bind to the cluster address. Because the Dispatcher forwards packets without changing the destination IP address, when the packets reach the server, the packets will still contain the cluster address as the destination. If a server has been configured to bind to an IP address other than the cluster address, then the server will be unable to accept requests destined for the cluster.

      To determine if the server is bind specific, issue the netstat -an command and look for the server@port. If the server is not bind specific, the result from this command will be 0.0.0.0@80. If the server is bind specific, you will see an address such as 192.168.15.103@80.

  7. Optional: Start the manager function. The manager function improves load balancing. To start the manager, enter the dscontrol manager start command, edit the sample configuration file, or use the GUI. For example:
    dscontrol manager start
  8. Optional: Start the advisor function. The advisors give the manager more information about the ability of the load-balanced server machines to respond to requests. An advisor is specific to a protocol. For example, to start the HTTP advisor, issue the following command:
    dscontrol advisor start http port

    For a list of advisors along with their default ports, see List of advisors.

    1. Set cluster proportions, as required. If you start advisors, you may modify the proportion of importance given to advisor information being included in the load balancing decisions. To set the cluster proportions, issue the dscontrol cluster set cluster proportions command. For more information, see Tuning the proportion of importance given to status information
  9. Configure the server machines.
Task topic    

Terms and conditions for information centers | Feedback

Last updated: September 12, 2012 11:41 PM EDT
File name: tcfg_configlbmach.html