Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two nodes in a cluster. Node1 initially servers requests. Loadbalancer redirects the request to node 2 if the first node fails. I would like to know if there is a way for the Node 2 to detect if it is getting the request that was supposed for the node 1 or in other words to know if the node1 just failed.

I am using Tomcat 6 with session replication.

share|improve this question
up vote 2 down vote accepted

"Detect" as in you want your own code to realize that the session was failed over? Why do you need your code to be aware of failover?

If you have set jvmRoute for the appropriate Tomcat Engine, Tomcat should automatically append .<jvmRoute> to the JSESSIONID cookie value. Therefore looking at the incoming JSESSIONID cookie is one way to detect failover I suppose.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.