Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Session Affinity and Session Replication

Rob Bugh

2007-02-06

Replies:

Hello All,

I'm trying to get a better understanding when to use Session Affinity and Session Replication and have a question. Let me set my question up by describing my configuration. It consists of an Apache server with mod_jk and two Tomcat servers, where the Apache server is configured to load-balance between the two Tomcat servers. So my question is, if I enable session affinity but not session replication, how can I failover a connection without losing the session data?

Let me restate my question more like a use case:

   - Given the above configuration of Apache and 2 Tomcat servers

   - A session has already been started on Tomcat-1 (session contains data)

   - A new request comes in with the same session id. Session affinity is on so the request should go to Tomcat-1. But Tomcat-1 is down so the request fails over to Tomcat-2.

   - Since session replication is not enabled how does Tomcat-2 get the session data? Or can it?


Can this problem be solved by using both sticky sessions and session replication? Or do I have to abandon session affinity and just use session replication. All the documentation I've read to date indicates not to use sticky sessions and session replication together.


Thanks,
Rob


---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.