You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave Morrow <da...@autodata.net> on 2005/07/16 22:55:03 UTC

Apache2/Tomcat55/mod_jk and Sticky Sessions

Hi all.  I am attempting to setup a loadbalanced set of Tomcat5.5 servers behind an Apache2 server using mod_jk.  The application developers have told me that the app will require sticky sessions.  I have it all configured and working with the exception of the sticky sessions.  I think my workers.properties is correct so there must be something I am missing.  For testing, I created a JSP in the ROOT application of each of the Tomcat servers which simply displays the server name and SessionID.  The loadbalancing is working, but instead of maintaining a session, it's flip-flopping between servers and thus changing session ID's.

My workers.properties contains (note the localhost is in the opposite place on the other server);

worker.list= qatomcat1, qatomcat2, loadbalancer #
worker.qatomcat1.port=8009
worker.qatomcat1.host=qahost1
worker.qatomcat1.type=ajp13
worker.qatomcat1.lbfactor=100
worker.qatomcat1.local=0
#
worker.qatomcat2.port=8009
worker.qatomcat2.host=localhost
worker.qatomcat2.type=ajp13
worker.qatomcat2.lbfactor=100
worker.qatomcat2.local=1


David A. Morrow
Technical Systems Lead
Autodata Solutions Company
David.Morrow@Autodata.Net
http://www.autodata.net
Tel: (519) 951-6079
Fax: (519) 451-6615 

< Poor planning on your part does not necessarily constitute an emergency on my part! >

This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>


Re: Apache2/Tomcat55/mod_jk and Sticky Sessions

Posted by Robert F Hall <rf...@berkeley.edu>.
Dave,

Try a Google search for: "Apache httpd sticky sessions".
One result that looks particularly useful: http://raibledesigns.com/tomcat/

-Robert

Dave Morrow wrote:

>Hi all.  I am attempting to setup a loadbalanced set of Tomcat5.5 servers behind an Apache2 server using mod_jk.  The application developers have told me that the app will require sticky sessions.  I have it all configured and working with the exception of the sticky sessions.  I think my workers.properties is correct so there must be something I am missing.  For testing, I created a JSP in the ROOT application of each of the Tomcat servers which simply displays the server name and SessionID.  The loadbalancing is working, but instead of maintaining a session, it's flip-flopping between servers and thus changing session ID's.
>
>My workers.properties contains (note the localhost is in the opposite place on the other server);
>
>worker.list= qatomcat1, qatomcat2, loadbalancer #
>worker.qatomcat1.port=8009
>worker.qatomcat1.host=qahost1
>worker.qatomcat1.type=ajp13
>worker.qatomcat1.lbfactor=100
>worker.qatomcat1.local=0
>#
>worker.qatomcat2.port=8009
>worker.qatomcat2.host=localhost
>worker.qatomcat2.type=ajp13
>worker.qatomcat2.lbfactor=100
>worker.qatomcat2.local=1
>
>
>David A. Morrow
>Technical Systems Lead
>Autodata Solutions Company
>David.Morrow@Autodata.Net
>http://www.autodata.net
>Tel: (519) 951-6079
>Fax: (519) 451-6615 
>
>< Poor planning on your part does not necessarily constitute an emergency on my part! >
>
>This message has originated from Autodata Solutions. The attached material is the Confidential and Proprietary Information of Autodata Solutions. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please delete this message and notify the Autodata system administrator at Administrator@autodata.net <ma...@autodata.net>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org