[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Problems with Session Stickiness using Apache/mod_jk and JBOSS/Tomcat  XML
Forum Index -> Terracotta for Web Sessions
Author Message
davidm

journeyman

Joined: 06/14/2007 18:21:40
Messages: 22
Offline

Hi - We have a problem which appears to be caused by the introduction of Terracotta into our load balancing architecture whereby Apache/mod_jk load balancing looses its ability to make session sticky - i.e. route requests for existing sessions back to the worker node that created the session.

ARCHITECTURE-We are using Apache and mod_jk as a load balancer in front of JBOSS 4.0.5 app servers (the worker nodes) which in turn use embedded Tomcat 5.5 as the servlet engine.

What we are trying to do is use Terracotta to replicate sessions between the JBOSS/Tomcat app servers.

In order to make sessions sticky in the Apache/mod_jk/Tomcat architecture we need to modify jbossweb-tomcat55.sar/jboss-service.xml to set this property <attribute name="UseJK">true</attribute> to cause Tomcat to append the worker name to the session id. This is required to ensure that Apache/mod_jk routes requests for existing sessions through the the correct app server (worker node).

This is described in the JBOSS document here

http://www.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss

So this setting causes a session id like 1E6F8002396FE484925912 to be changed to 1E6F8002396FE484925912.worker1 and mod_jk then routes the request back to worker1. i.e. makes the session sticky.

Now when we introduce TC into the environment it appears that the worker name that was appended to the session id is removed.
TC is correctly replicating sessions between the worker nodes but the omission of the worker name from the session id causes the sessions to loose stickiness and they are not routed back to the original worker node.

Is there some additional configuration we need to make in TC, mod_jk or Tomcat to make this work correctly?

Thanks for your help.
David





tgautier

seraphim

Joined: 06/05/2006 12:19:26
Messages: 1781
Offline

I think this issue was discussed on this thread:

http://forums.terracotta.org/forums/posts/list/202.page

Would you mind looking it over and let me know if the fix proposed in that thread works for you? The thread never specified mod_jk but I suspect that the OP was using mod_jk.

There's also a bug already for this at: http://jira.terracotta.org/jira/browse/CDV-233


I'll add this issue to the FAQ (and the Roadmap) if indeed that is the issue.

Thanks!
[WWW]
davidm

journeyman

Joined: 06/14/2007 18:21:40
Messages: 22
Offline

Taylor - this is indeed the same issue. Applying the changes outlined in that thread corrects the issue.

It will be great when all this additional info is available in the regular doc!

David
 
Forum Index -> Terracotta for Web Sessions
Go to:   
Powered by JForum 2.1.7 © JForum Team