Configuring a Simple tc Server Cluster

This following procedure describes how to set up a simple tc Server cluster that uses default values for most configuration options. See the section after the procedure for a description of this default cluster configuration.

  1. For each tc Server instance that will be a member of the cluster, update its CATALINA_BASE/conf/server.xml by adding a <Cluster> child-element of the <Engine> element, as shown in the following example (only relevant sections shown):
    <?xml version='1.0' encoding='utf-8'?>
    <Server port="-1" shutdown="SHUTDOWN">
      ...
      <Service name="Catalina">
        ...
        <Engine name="Catalina" defaultHost="localhost">
            <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
            ...
        </Engine> 
      </Service>
    </Server> 
    

    The server.xml file for many tc Server instances already contains a commented-out <Cluster>; in which case, simply remove the comment tags.

    You can also add the <Cluster> element to the <Host> element of the server.xml file, which means that you want enable clustering in all the virtual hosts of tc Server. When you add the <Cluster> element inside the <Engine> element, the cluster appends the host name of each session manager to the manager'ss name so that two contexts with the same name but sitting inside two different hosts are distinguishable.

  2. If you are going to run more than one tc Server instance on the same computer, be sure the various TCP/IP listen ports for each tc Server instance are unique. You configure the listen ports using the port and redirectPort attributes of the <Connector> element in the server.xml file. See Simple tc Server Configuration.
  3. If you are going to run more than one tc Server instance on the same computer, and you are using AMS to monitor and configure the cluster and its individual members, be sure the JMX listen ports for each tc Server instance are unique. You configure the JMX listen port using the port attribute of the <Listener classname="com.springsource.tcserver.serviceability.rmi.JmxSocketListener"> element in the server.xml file. See Simple tc Server Configuration.
  4. If the cluster is hosted on more than one computer, be sure that all computers are time-sychronized. Use the Network Time Protocol (NTP) to synchronize the computers; see The Network Time Protocol for details.
The cluster that results from the proceding procedure will have the following configuration:

For additional detailed information about tc Server clusters and a description of the default cluster configuration, see Clustering/Session Replication HOW-TO.