Setting Up Load Balancing and Failover

If you have multiple servers in your tree, you can configure how LDAP connections are handled. You can configure iManager so that the same server does not establish all or most of the LDAP connections or so that one server handles all the LDAP connections unless it fails. For configuration instructions, see the following sections:

IMPORTANT:  Either load balancing or failover can be active at a time, never both.


Configuring Load Balancing

Load balancing is performed in a round-robin style. The first server is used for the first connection established. The second server is used for the second connection and so on until the last server has been accessed and the loop returns to the first server in the active servers list. As the server list is accessed, if one of the servers goes down, it is removed from the list of active servers and placed in a inactive servers queue. A process runs at periodic intervals to recheck the inactive server to see if it is now active. If it is active, it is appended to the end of the active servers list. The interval for rechecking inactive servers is configurable. See Configuring the Server Check Interval.

The LDAP connection stays with the same server it started with unless that server goes down. It can be thought of as a sticky connection as far as which server is used.

Load balancing supports up to three additional servers to use for load balancing. Therefore, a maximum of four servers can be used for load balancing purposes. This is accomplished by adding additional server address as listed below to your PortalServlet.properties file located in $TOMCAT_HOME/webapps/nps/WEB-INF/:

System.DirectoryAddress=137.65.1.2:636 
System.DirectorySSL=true

System.Directory1Address=137.65.1.7:389
System.Directory1SSL=false

System.Directory2Address=137.65.1.14:389
System.Directory2SSL=false

System.Directory3Address=137.65.1.21:636
System.Directory3SSL=true

Load balancing supports up to four total server addresses with any combination of SSL and non-SSL LDAP connections. If the DirectorySSL line is omitted for any server address, false is assumed. False means that SSL is not used for communication.


Configuring Failover

Failover is implemented in much the same fashion as load balancing. The only significant difference is that the active server list stays with the first server in the list. If the first server goes down for some reason, it is removed from the active server list and the new server that is now first in the list is used for all new connections.

To enable failover mode, add the following line to the PortalServlet.properties file located in $TOMCAT_HOME/webapps/nps/WEB-INF/:

System.FailoverOnly=true

With this line in the file, the list of servers in the PortalServlet.properties file are used in a failover fashion and are not used for load balancing.

When an inactive server comes back up, it is appended to the end of the active servers list. If you want it to become the primary server again, you need refresh the iManager configuration. See Refreshing the Load Balancing or Failover Configuration.


Configuring the Server Check Interval

By default, the servers in the inactive server list are checked every 180 seconds. You can change this interval by adding the following line to the PortalServlet.properties file located in $TOMCAT_HOME/webapps/nps/WEB-INF/:

System.ServerCheckInterval=180000

The number specified is in milliseconds.


Refreshing the Load Balancing or Failover Configuration

To reset the server list for load balancing or failover:

  1. In iManager, click the Configure button Developer button.

  2. In the Contents panel, click iManager Configuration > Portal.

  3. In the right pane, click Refresh Portal.

When the iManager configuration is refreshed, the bad servers list is thrown away and the active servers list is re-read from PortalServlet.properties.