HA-LVS

From OpenSSI

Jump to: navigation, search

The OpenSSI kernel includes LVS integration. This provides support for TCP and UDP load-balancing and failover. This integration consists of two parts:

  • automatic port registration with LVS director node
  • failure detection and correction with respect to both real server nodes and the director node


The first feature, automatic port registration, is an OpenSSI extension to standard LVS functionality, and consequently requires 'setport_weight', a different administration method than that provided by the standard LVS ('ipvsadm').

TCP load balancing

In OpenSSI, the command 'setport_weight' is used to flag a range of TCP ports to be loadbalanced, e.g.

setport_weight --start-port=1 --end-port=80 --weight=1

would flag every TCP port between 1 and 80 for balancing across the cluster. After this command is issued, unlike with standard LVS, the LVS director node is not immediately notified to start balancing the service, as can be verified with

ipvsadm -L

Instead, OpenSSI nodes are instructed to monitor invocations of the listen() system call. When a cluster node binds to the port flagged by setport_weight, OpenSSI notifies the LVS director node to start load balancing the service. Further cluster nodes binding to the same port are added to the load balancing pool. When a node unbinds to the flagged port, it is removed from the load balancing pool for that port.


UDP load balancing

UDP load balancing is included in the production OpenSSI 1.2 kernel, but not completely: it does not support automatic port registration with LVS director nodes. Full UDP support is part of the testing OpenSSI 1.9 series.

With OpenSSI 1.2, you must use the 'ipvsadm' command directly to cause an UDP port to be load balanced. For instance, to load balance the XDMCP service (X display manager) which is often useful for LTSP clusters, issue the following commands, where <cvip> represents your cluster's virtual IP address:

ipvsadm -A -u <cvip>:177 -s wlc
ipvsadm -a -u <cvip>:177 -r <node ip>:177 -g -w 1

Repeat the last command with the IP of every node you want to include in the load balancing pool.


NOTE: From 1.9 release onwards user need not specify setport_weight command. The HA_LVS configuration file (/etc/cvip.conf) is enhanced to support load balancing information. We also support UDP load balancing with 1.9 release.

Personal tools