Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.