This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat clustering and Session replication" Watch "Tomcat clustering and Session replication" New topic

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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Tomcat clustering and Session replication
Similar Threads
BLACK ZONE alert on Stopping Tomcat Server
sticky session not consistent
Tomcat 5.5.26 Sessions getting replicated but not working via browser
Tomcat and apache configuration in debian
Tomcat session replication on failover in a cluster