Configuring collocated servers for the Dispatcher component

Learn about advanced features for configuring the Dispatcher component with collocated servers.

About this task

Load Balancer can be present on the same server for which it is load balancing requests. This configuration is commonly referred to as collocating a server. It is supported on Linux® and AIX® only. It is supported for MAC forwarding only. If collocated servers and high availability replication are used together, connections might be broken when a takeover occurs.
Important: A collocated server competes for resources with Load Balancer during times of high traffic. However, in the absence of overloaded machines, a collocated server offers a reduction in the total number of machines necessary to set up a load-balanced site. On Linux, the collocation feature depends on TUN module. Hence, before you configure collocation, ensure that the TUN module is supported on the Linux version you are using. Also, performance and function depend on the TUN module. To configure a server to be collocated, the dscontrol server command provides an option called collocated which can be set to yes or no. The default value is no. Alternatively, you can use the GUI to set collocated parameter under the configuration settings tab of the server object. The address of the server must be a valid IP address of a network interface card on the machine.
Tip:
  • The neighbor state of a collocated server is always available.
  • Manager and advisor works as usual with collocated server.
  • Multiple clusters can have collocated server.
  • Metric server should not be used with collocated server.
  • In case you are using IPv4 or IPv6 clusters, the Load Balancer machine should be in both networks before you configure it.

Procedure

  1. [Linux]Configure a collocated server on Linux.
    1. Configure a collocated server, as follows:
      modprobe tun
      
      modprobe ip_tables
    2. Add or set the server with the preferred IP address and the collocated parameter that is set to yes, as follows:
      dscontrol server add cluster@port@server collocated yes
      
      dscontrol server set cluster@port@server collocated yes
      Attention: Adding or setting the collocation parameter creates an extra virtual network interface that is named ibmulb, which is used by Load Balancer to forward the packets on same machine. This interface has data rate of 10 MB/s.
    3. Add an iptable rule to drop IP packets that are destined to cluster IP. Complete this step so that the operating system does not respond to these packets and bypass the Load Balancer. You might add rules for each cluster IP. Choose the correct interface while you are adding the rules or collocation does not work.
      iptables -A INPUT -i <interface> -d <cluster_ip>/32 -j DROP
      ip6tables -A INPUT -i <interface> -d <cluster_ip>/128 -j DROP
      Remove the iptable rules by using the following commands:
      iptables -D INPUT -i <interface> -d <cluster_ip>/32 -j DROP(IPv4)
      ip6tables -D INPUT -i <interface> -d <cluster_ip>/128 -j DROP(IPv6)
    4. ARP suppression (IPv4 only)
      sysctl -w net.ipv4.conf.all.arp_ignore=3 net.ipv4.conf.all.arp_announce=2
    5. Alias cluster IP.
      Attention: This step is not required for Linux on Z when interface is in layer3. In this case, cluster IP should be aliased on the layer3 interface with a prefix that is used for the primary IP.
      ip addr add <cluster_ip>/32 dev ibmulb scope host
      ip -6 addr add <cluster_ipv6>/128 dev ibmulb
      Unalias the cluster IP from the loop back adapter by using following commands:
      ip addr del <cluster_ip>/32 dev ibmulb scope host(IPv4)
      ip -6 addr del <cluster_ipv6>/128 dev ibmulb(IPv6)
    6. Disable Reverse Path Filtering on all interfaces (IPv4 only), as follows:
        "sysctl -w net.ipv4.conf.<inteface_name>.rp_filter=0 "
  2. [AIX]Configure a collocated server on AIX.
    1. Add or set the server with your chosen IP address and the collocated parameter that is set to yes:
      dscontrol server add cluster@port@server collocated yes
      dscontrol server set cluster@port@server collocated yes
    2. Configure or alias cluster IP on the loop back adapter:
      ifconfig lo0 inet <cluster_ip> netmask 255.255.255.255 alias
      ifconfig lo0 inet6 <cluster_ipv6>/128 alias
      Remove alias from the loop back, as follows:
      ifconfig lo0 inet <cluster_ip> netmask 255.255.255.255 -alias
      ifconfig lo0 inet6 <cluster_ipv6>/128 -alias