aspose file tools*
The moose likes Tomcat and the fly likes Tomcat clustering and Session replication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat clustering and Session replication" Watch "Tomcat clustering and Session replication" New topic
Author

Tomcat clustering and Session replication

Pankaja Shinde
Ranch Hand

Joined: Sep 15, 2006
Posts: 87
I successfully configured my Apache Httpd Server (Apache 2) and Tomcat (Tomcat 7) for clustering and session replication. I checked this by following 2 scenarios. 1. All tomcat instances are on the same machine 2. Tomcat instances are distributed across machines.

For first scenario all is working fine, but for second scenario I am having some problem. I need help. Suppose I installed Apache Httpd server and tomcat (TomcatA) on my machine, and second tomcat (TomcatB) on another machine. Clustering and Session replication is working fine except this case. 1. Start Apache Httpd Server. 2. Start TOmcatA. 3. Start TOmcatB. Lets suppose that first request is processed by TomcatA (I ahve only 1 active session), and all other requests for that session are processed by TomcatA. Now if I shutdown TomcatA, then all other next requests for that session will be forwarded to TomcatB, and very next request is processed instantaneously. Now If I start TomcatA (I make sure that TomcatA is properly started), then all requests are still proccessed by TomcatB. If now I shutdown TomcatB, then I get 'Service Temporarily Unavailable' page for next request, after about 60 seconds, next requests are processed smoothly by TomcatA.

Why I have to wait for that 60 seconds as TomcatA is already started, Is there any configuration setting for reducing that time.

This is not happening for scenario 1 (all tomcat instances are on same machine). All requests are processed smoothly and immediately irrespective of tomcat instances are added or removed from cluster.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat clustering and Session replication