Product Documentation

To configure a Device Manager Tomcat Cluster

Dec 21, 2015
Tomcat clustering is used to replicate session information on all cluster nodes. In an event of a Tomcat server being unavailable on a cluster node, device connections can fail over to Tomcat servers on other cluster nodes because the state is being preserved across all nodes in the cluster.
Note: Make sure to update the configuration files/command to all cluster nodes.
  1. Open file <installation_dir>\tomcat\conf \server.xml in wordpad and add a <cluster> section after the following element: <Engine name="Catalina" defaultHost="localhost">:
    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"> 
    <Manager className="org.apache.catalina.ha.session.DeltaManager" 
             expireSessionsOnShutdown="false" 
             notifyListenersOnReplication="true"/> 
    <Channel className="org.apache.catalina.tribes.group.GroupChannel"> 
      
    <Membership className="org.apache.catalina.tribes.membership.McastService" 
      
             address="228.0.0.8" 
             port="45560" 
             frequency="500" 
             dropTime="3000"/> 
      
    <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" 
      
             address="auto" 
             port="4000" 
             autoBind="100" 
             selectorTimeout="5000" 
             minThreads="3" 
             maxThreads="6"/> 
      
    <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> 
    <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/> 
    </Sender> 
      
    <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/> 
    <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/> 
    </Channel> 
      
    <!-- 
    <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer" 
          tempDir="${catalina.base}/war-temp" 
          deployDir="${catalina.base}/war-deploy" 
          watchDir="${catalina.base}/war-listen" 
          watchEnabled="true"/> 
       --> 
      
    </Cluster>
  2. After copying the above contents, check for the following elements in server.xml:
    • Membership. Determines cluster membership. address: 228.0.0.8 (multicast address)
    • port. 45560 (multicast address and the port determine cluster membership)
    • frequency. 500 (broadcast ping send frequency. Must be smaller than timeToExpiration)
    • dropTime.3000
    • Receiver. Responsible for listening to session tomcat session replication messages
    • address. auto (listening address)
    • port. 4000 (port number used to listen for session replication messages)
    • autoBind. 100 (number of ports to try : 13000 to 13099)
    • selectorTimeout. 5000 (select operation selector timeout)
    • minThreads. 3 (work thread pool configuration)
    • maxThreads. 6 (work thread pool configuration)