Clustering Tomcat Server Components

Establishing a Tomcat cluster in your SBM environment provides several benefits to your SBM installation. If you plan to create one or more Tomcat clusters, Serena recommends that you read this section in its entirety, and then create a schematic to help you organize and plan your system layout and configuration.

About Clusters

Creating a cluster for your Tomcat components provides failover in the event one of the servers in your installation fails or loses connection. Clustering Tomcat also provides greater scalability for the orchestrations that you create in SBM Composer. By creating a Tomcat cluster, you can improve the overall performance and load handling of SBM's Tomcat components.

For example, you can configure Application Repository to operate within a cluster and perform load balancing duties with other Application Repository servers. To set up such a cluster, you install Application Repository on multiple machines, connect them all to the same database, and then use SBM Configurator to create a cluster that enables each Application Repository instance to become aware of other instances running within the cluster. Multiple users can access the Application Repository cluster, with each request routed to one given Application Repository instance using either a software or hardware load balancer.

The load balancer has knowledge about the health of the configured servers in the cluster. If one of the servers goes down, the load balancer begins to send the requests to the other servers. In a Tomcat cluster, one node acts as a primary node and the other servers are secondary nodes. If a secondary node fails, nothing happens due to the high availability services (HA-JNDI and HA-JMS) running in the background; in the event the master node fails, one secondary node starts all the high availability services and it becomes the master node. This process is entirely transparent to users because the session and memory are already replicated. When the server comes back online, it simply joins the cluster as a secondary node.

Installation and Configuration Considerations

There are several considerations to note before you begin to configure a Tomcat cluster. Please review the following important notes:

Creating a Cluster

To create one or more Tomcat clusters, perform the following steps on each dedicated Tomcat server:

  1. Install the Tomcat components that you intend to cluster.
    Important: You must install matching Tomcat components on each server in the cluster.
  2. Open SBM Configurator, and then open the Component Servers tab.
  3. Select the Join Tomcat cluster as a node check box.
  4. On the General tab that appears, enter the following information:
    Field Name Description
    Cluster name Enter a unique name for the cluster that distinguishes it from other clusters you might create in your development and staging environments.
    Note: If you configure each server manually (instead of updating from the database or importing a snapshot file), you must enter the same Cluster name on each server that you add to the cluster. This means that each server in the cluster will have the same value in the Cluster name field.
    Use HTTP on port Select this check box to configure all SBM URLs to use HTTP.
    Important: If you select this option, all SBM components on this server are only accessible using HTTP. Select only the HTTP check box to force all traffic to use HTTP.
    The current HTTP port that is used by Tomcat appears for informational purposes.
    Use HTTPS on port Select this check box to configure all SBM URLs to use HTTPS.
    Important: If you select this option, all SBM components on this server are only accessible using HTTPS. Select only the HTTPS check box to force all traffic to use HTTPS.
    The current HTTPS port that is used by Tomcat appears for informational purposes.
  5. On the Load Balancer tab, provide the following information:

    Internal load balancer – Used by Tomcat nodes inside the firewall.

    Field Name Description
    Protocol Select HTTP or HTTPS, depending on which protocol your load balancer is configured to use.
    Host Enter the server host name for the internal load balancer.
    Port Enter the port number that is used to access the Tomcat nodes through the load balancer.

    External load balancer – Used for connections to Tomcat from outside the firewall.

    Field Name Description
    Protocol Select HTTP or HTTPS, depending on which protocol your Tomcat load balancer is configured to use.
    Host Enter the Tomcat server host name that all incoming requests should use.
    Port Enter the port number that is used to access Tomcat through the load balancer.
    Important: After you enter the Tomcat load balancer information, you must update your environment's target server endpoints in SBM Application Repository with the load balancer host and port information that you entered in SBM Configurator and then redeploy your process apps to that environment.
  6. On the Nodes tab, provide the following information:
    Field Name Description
    Node 1 Host Enter the host name of the first node that you add to the cluster. Click Add Node to define additional nodes or Remove Node to delete this node from the cluster.
    Node 2 Host Enter the host name of the second node that you add to the cluster. Click Add Node to define additional nodes or Remove Node to delete this node from the cluster.

    The node that represents the local machine is marked with an asterisk (*).

    After you have added at least one other node, continue to add nodes for each server that will join the cluster as a new node. You must replicate the same node number and host name pairing on each server in the cluster. For example, if you create the following node number and host name pairing on Server A:

    Node Host Name
    Node 1 host: Server A
    Node 2 host: Server B
    Node 3 host: Server C

    You must enter the same pairing on the Nodes tab on Server B and Server C:

    Node Host Name
    Node 1 host: Server A
    Node 2 host: Server B
    Node 3 host: Server C

    If you remove a node, the following node becomes the node number that you just removed. For example, if you remove node 2 (Server B), then Server C becomes node 2. This means you must update each server again with the correct node number and host name pairing.

  7. On the Ehcache tab, review the Ehcache information to ensure there are no port conflicts on the server. The Ehcache file directory, default Multicast group address, and default Multicast group ports appear for informational purposes.
  8. To finish creating the cluster, you must verify that each node in the cluster has the same configuration information. There are two methods to verify each node in the cluster:
    • If you use the Configuration Settings database, the entire configuration is saved in the database and all servers should be in sync. Verify the information on each server that will become a node in the cluster—the same configuration information and the same node number and host pairings should appear for each node that exists in the cluster.
    • If you are using configuration snapshots instead of the Configuration Settings database, enter all the configuration information in SBM Configurator on one server (pre-defining all node number and host name pairings at the same time), and then export the data into a snapshot configuration file using the System Settings tab. Once the snapshot is created, import it into SBM Configurator on each server that will become a node in the cluster. This ensures that each server is configured exactly the same.

Related Topics

Component Servers