Testing of the clustered instance
To perform cluster testing, we are going to take you through a sequence of events. In the following event, we only plan to use two Tomcat instances—tomcatnode1
and tomcatnode2
. We will cover the following sequence of events:
1. Start
tomcatnode1
.2. Start
tomcatnode2
(wait for node 1 to start completely).3. Node 1 crashes.
4. Node 2 takes over the user session of node 1 to node 2.
5. Start node 1 (wait for node 1 to start completely).
6. Node 2 and node 1 are in running state.
Now we have a good scenario with us, we will walk through how the entire process works:
1. Start instance 1:
tomcatnode1
starts up using the standard startup sequence. When the host object is created, a cluster object is associated with it. Tomcat asks the cluster class (in this caseSimpleTcpCluster)
to create a manager for the cluster and the cluster class will start up a membership service.Note
The membership service is a mechanism in the cluster instance through the cluster domain,...