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 am trying to implement a failover enabled loadbalanced cluster using tomcat.(6.0.14/Apache 2.2)

I have 2 tomcats runs in same machine. Both are load balanced using mod_jk/workers.properties and load balancing works fine. Sticky session is enabled and force sticky session is set to false.This also works.

I have added SimpleTCPCluster as mentioned in tomcat 6 documentation to both tomcats server.xml with different listen port. And it also works.(When one tomcat goes down, other tomcat log prints the member disconnected )

Now my problem is when 1 tomcat stops, next request from client goes to the other tomcat, but the session becomes new. So logged in user gets logged out and goes to home page. How can I replicate the session with both tomcats.

I read there are 3 ways . 1 in memory, 2 persistent manager with file and 3rd jdbc. It will be good if I get a solution using in memory or using File

Thanks in advance Umesh

share|improve this question
    
I wonder if it's worth the extra work to handle session replication. How often does your app (or Tomcat) fail? –  Arne Evertsson Dec 1 '09 at 8:58

1 Answer 1

Check out Terracotta: http://www.terracotta.org/web/display/orgsite/Web+Sessions

Cheers

share|improve this answer
    
Thanks Jason for introducing one good project. But I am not even near by their "What You'll Need". Current project that I am trying to configure is big messy (since its a big project cant even think of rewriting). And all other thing in this setup works fine except session replication. –  Umesh Sep 11 '09 at 4:53

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.