Tomcat cluster architecture
For the Tomcat cluster, you configure two nodes as part of one cluster. Deploy each node on a separate virtual machine and install one mid tier on each node. Use the symmetric configuration in which both mid tiers use the same AR System server, both use preloaded cache, and both have the exact copies of the cache after preload. Configure the load balancer to send requests of any client to any of the mid tiers and ensure that the sticky session behavior is set to ON.
For more information about configuring a Tomcat cluster, see Configuring a cluster.
When a user logs on to a node, in-memory session replication happens in real time.
The following diagram shows that Request 1 with Session X and Request 2 with Session Y are handled by the load balancer. Assume that Request 1 is served by Node 1 and Request 2 is served by Node 2. Even so, both nodes will have information about both the sessions, that is, Session X and Session Y are part of session replication. Either node can pick up the other session seamlessly if the other node crashes. A user does not have to log on again even if the serving node is down. This session is picked up immediately by the second node.