Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

9. Clustering in Tomcat 7 > Testing of the clustered instance

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 case SimpleTcpCluster) 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, which adds the member node in the cluster. In simple terms, it is a service through which members are able to join the cluster.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial