Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 47106 invoked from network); 3 Sep 2009 21:31:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Sep 2009 21:31:51 -0000 Received: (qmail 65171 invoked by uid 500); 3 Sep 2009 21:31:47 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 65137 invoked by uid 500); 3 Sep 2009 21:31:47 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 65126 invoked by uid 99); 3 Sep 2009 21:31:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 21:31:47 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [76.96.62.80] (HELO QMTA08.westchester.pa.mail.comcast.net) (76.96.62.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2009 21:31:35 +0000 Received: from OMTA19.westchester.pa.mail.comcast.net ([76.96.62.98]) by QMTA08.westchester.pa.mail.comcast.net with comcast id cByU1c00627AodY58MXFZp; Thu, 03 Sep 2009 21:31:15 +0000 Received: from [192.168.1.200] ([69.143.128.194]) by OMTA19.westchester.pa.mail.comcast.net with comcast id cMbU1c0054BnRt93fMbUy2; Thu, 03 Sep 2009 21:35:28 +0000 Message-ID: <4AA035A1.4080000@christopherschultz.net> Date: Thu, 03 Sep 2009 17:31:13 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: mod jk - multiple applications, different server clusers, sticky sessions References: <534bd38b0909021438p17e13e22m42c2e4432821329b@mail.gmail.com> <4A9F8007.4040007@kippdata.de> In-Reply-To: <4A9F8007.4040007@kippdata.de> X-Enigmail-Version: 0.96a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rainer, On 9/3/2009 4:36 AM, Rainer Jung wrote: > No. > > The stickyness doesn't magically track your clients. If the client sends > a session information, and the session information contains a route tag > (a suffix .nodeX, where nodeX is set by the jvmRoute attribute in > server.xml), then mod_jk looks for a balancer member named nodeX. > > When/How does the client send session information? Either as a cookie > named JSESSIONID, or via URL encoding ...;jsessionid=....nodeX > > By default, application A with context name /myappA uses cookies and > only sends cookies if the request goes to something in /myappA. So a > request for application B with context /myappB doesn't include the > cookie for A and the load balancer is free to distribute the request to > any node. One caveat: if you have a ROOT context along with other non-ROOT contexts, things can get tricky because you'll get cookies like: name=JSESSIONID, path=/, expires=..., value=... name=JSESSIONID, path=/foo, expires=..., value=... name=JSESSIONID, path=/bar, expires=..., value=... Whenever a client browses to webapps found on / and /foo, the requests to /foo will get TWO cookies, and confusion may occur (I'm not sure what mod_jk will do in this situation... Rainer?). My advice is to avoid "nesting" webapp URL spaces. I accidentally did this for years until I discovered the problem when adding sessionid-passthrough to another webapp (where the session id couldn't be validated before being passed-through) and everything went crazy. When I separated the URL spaces, everything was fine. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkqgNaEACgkQ9CaO5/Lv0PC7nQCgtvFONQbvlmx7zrz+rmKaFVdI PcgAnjDcnYoWXNmsMW8bIE58tSnUBFuG =9T+N -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org