From user-return-13319-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Fri May 15 03:32:12 2009 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 64186 invoked from network); 15 May 2009 03:32:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 May 2009 03:32:12 -0000 Received: (qmail 91012 invoked by uid 500); 15 May 2009 03:32:11 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 90896 invoked by uid 500); 15 May 2009 03:32:10 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 90888 invoked by uid 99); 15 May 2009 03:32:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 03:32:10 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of greensight@gmail.com designates 74.125.46.28 as permitted sender) Received: from [74.125.46.28] (HELO yw-out-2324.google.com) (74.125.46.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 May 2009 03:31:59 +0000 Received: by yw-out-2324.google.com with SMTP id 3so884004ywj.85 for ; Thu, 14 May 2009 20:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=xmXcLuRGoc3APfE/S1joDuRXQHsSIjI4a+kkYaH3kZM=; b=RdsDeb9hg1yNCaBm5HEjQSf8z3LtLvuOQhOw0ERmQggiG1gjwysm5QC9Dt1KOXMXTr jy47rbThHaztW+jtUlJs9Te4INm/D/CPvk1exWBKQmElD5J9auQ9PJLEZPBMnXFofX/y gENDFS9utOUYwNJyxLa/W2DaX6dhb9JZNKuCo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Fv6fgbOTz41yy/na3M0XdZUjVEmAUO+wAF/JKdJ0PdPB82qjb41G+k4lUZM/BIe8gc u/pXJlHTUnWO94KEuF3l56XMHxrohLMayD2eWYH8rjY5FR6I7qY1ILlQustmlOJEBD/+ Ewx6AhQcVeY8vnRIubeWMqSmGAv6egmbIwOtc= MIME-Version: 1.0 Received: by 10.150.225.8 with SMTP id x8mr5071782ybg.67.1242358298470; Thu, 14 May 2009 20:31:38 -0700 (PDT) In-Reply-To: <3DB7FABE-296A-4384-A01E-A3BF6325651F@optusnet.com.au> References: <8e8b35e40905121810o44b520b0w8b778b08d3f1a11d@mail.gmail.com> <8e8b35e40905130619h3e0c1abi5994f1d14b01e35b@mail.gmail.com> <5e7fd1eb0905130736h7d3d5ecfx6cd18ff426b3be6f@mail.gmail.com> <8e8b35e40905131133l77d5b2f2k2da018fe0441144e@mail.gmail.com> <5e7fd1eb0905132102l3811ba5di5d3d64fe97546932@mail.gmail.com> <3DB7FABE-296A-4384-A01E-A3BF6325651F@optusnet.com.au> Date: Fri, 15 May 2009 11:31:38 +0800 Message-ID: <5e7fd1eb0905142031x7a315380j9dff8c46ed81d161@mail.gmail.com> Subject: Re: Enabling Session Affinity in G2.1.4 (using Tomcat w/ WADI) From: Jack Cai To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=000e0cd4d8aa10698d0469eb1576 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd4d8aa10698d0469eb1576 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Thanks for stepping out Gianny! I thought WADI use the "clusterNameNode" value set in var/config/config-substitutions.properties to append to JSESSIONID, at least for Jetty [1]. If I'm right, I suggest that we use the same setting for Tomcat, instead of using the jvmRoute parameter which is used by Tomcat native clustering. -Jack [1] http://cwiki.apache.org/GMOxDEV/clustering-configuration-for-jetty.html 2009/5/14 Gianny Damour > Hi, > > There are various way to fulfill session stickiness. I have been conducting > all my integration tests with HAProxy, http://haproxy.1wt.eu/, which does > not require downstream load-balanced servers to do any manipulations to > session cookies. > > I created an improvement ticket, https://issues.apache.org/jira/browse/GERONIMO-4626, > to capture the need to augment returned session cookies with jvmRoute > information so that mod_jk can be used. I also checked in against trunk some > code to address this problem. I have not yet integration tested this code > change with mod_jk; However, I am quite confident with the change. > > I intend to do some integration tests over the week-end to confirm the > proper resolution of this problem. Meanwhile, if you want, you can check-out > this module: > > https://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/tomcat/ > geronimo-tomcat6-clustering-wadi > > build it with maven and install the resulting artifact into your repository > to give it a try. > > FWIW, if you can swap your reverse-proxy or load-balancing layer currently > realised by Apache mod_jk, then I would recommend HAProxy. > > Thanks, > Gianny > > > On 14/05/2009, at 2:02 PM, Jack Cai wrote: > > With WADI, your guess is right that the clusterNodeName in >> config-substitutions.properties is used to identify each node. So if this is >> not working, then it's a bug. You can open a JIRA. >> >> -Jack >> >> 2009/5/14 Dennis Cartier >> >> >> On Wed, May 13, 2009 at 10:36 AM, Jack Cai wrote: >> Tomcat native clustering and WADI are two different approaches. >> >> To try out Tomcat native clustering, for example, please refer to this doc >> [1]. It clearly points >> out that you need to set the "jvmRoute" parameter (note ID) in the >> config.xml. >> >> Good luck! >> >> -Jack >> >> [1] http://cwiki.apache.org/GMOxDOC22/tomcat-native-clustering.html >> >> 2009/5/13 Dennis Cartier >> >> >> >> On Tue, May 12, 2009 at 10:19 PM, viola lu wrote: >> First, pls set up tomcat or wadi cluster following this link: >> http://cwiki.apache.org/GMOxDOC22/clustering-and-farming.html >> and then configure apache http server to realize session affinity, if you >> use mod_jk way: edit works.properties under $http server install dir/conf >> with >> worker.loadbalancer.sticky_session=1 >> if you use mod_proxy, you can edit httpd.conf with: >> ProxyPass / balancer://mycluster/ stickysession=JSESSIONID >> >> Viola >> >> >> >> On Wed, May 13, 2009 at 9:10 AM, Dennis Cartier >> wrote: >> I am trying to find out how to configure G2.1.4 for session affinity when >> using Tomcat and WADI. Would anyone be able to point me in the right >> direction? >> >> I thought that ClusterNodeName looked like a good guess in the >> config-substitutions.properties file but that does not seem to attach a node >> name to the generated session. >> >> Any help would be appreciated. >> >> Dennis >> >> >> >> -- >> viola >> >> Thanks for the pointers Viola. I am fine with the clustering aspects as >> far as Apache goes, I am just having trouble getting the node name to be >> properly appended to the generated JSESSIONID. >> >> I changed to the target namespace as indicated in the G2.2 cluster docs >> () >> and I already had my WAR marked distributable as well as having the >> element in place. >> >> Unfortunately I still do not get a node name being appended to the >> generated session so no affinity results. >> >> I noticed the G2.2 docs had a section on switching WADI to unicast. This >> sounded optional, I assume the default multicast mode of WADI is functional >> and changing to unicast is not required? >> >> I remain stumped. With no session affinity my requests are still spraying >> across the entire cluster rather then being sticky to a single node. >> >> Dennis >> >> >> Hmmm, I am getting the feeling that stick sessions (session affinity) is >> not possible in WADI clustering? I am not really wanting to switch to Tomcat >> native clustering at this point. Does anyone know if WADI (as implemented in >> G2.1.4) supports sticky sessions? >> >> Dennis >> >> > --000e0cd4d8aa10698d0469eb1576 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks for stepping out Gianny!

I thought WADI use the "cluster= NameNode" value set in var/config/config-substitutions.properties to a= ppend to JSESSIONID, at least for Jetty [1]. If I'm right, I suggest th= at we use the same setting for Tomcat, instead of using the jvmRoute parame= ter which is used by Tomcat native clustering.

-Jack

[1] http://cwiki.apache.org/GMOxDEV/clustering-co= nfiguration-for-jetty.html

2009/5/14 = Gianny Damour <gianny.damour@optusnet.com.au>
Hi,

There are various way to fulfill session stickiness. I have been conducting= all my integration tests with HAProxy, http://haproxy.1wt.eu/, which does not require downstream l= oad-balanced servers to do any manipulations to session cookies.

I created an improvement ticket, https://issues.apache.org/jira/browse/GERONIMO-4626= , to capture the need to augment returned session cookies with jvmRoute inf= ormation so that mod_jk can be used. I also checked in against trunk some c= ode to address this problem. I have not yet integration tested this code ch= ange with mod_jk; However, I am quite confident with the change.

I intend to do some integration tests over the week-end to confirm the prop= er resolution of this problem. Meanwhile, if you want, you can check-out th= is module:

https://svn.apache.org/repos/asf/geronimo/server/= trunk/plugins/tomcat/geronimo-tomcat6-clustering-wadi

build it with maven and install the resulting artifact into your repository= to give it a try.

FWIW, if you can swap your reverse-proxy or load-balancing layer currently = realised by Apache mod_jk, then I would recommend HAProxy.

Thanks,
Gianny


On 14/05/2009, at 2:02 PM, Jack Cai wrote:

With WADI, your guess is right that the clusterNodeName in config-substitut= ions.properties is used to identify each node. So if this is not working, t= hen it's a bug. You can open a JIRA.

-Jack

2009/5/14 Dennis Cartier <dennis.cartier@gmail.com>


On Wed, May 13, 2009 at 10:36 AM, Jack Cai <greensight@gmail.com> wrote:
Tomcat native clustering and WADI are two different approaches.

To try out Tomcat native clustering, for example, please refer to this doc = [1]. It clearly points
out that you need to set the "jvmRoute" parameter (note ID) in th= e config.xml.

Good luck!

-Jack

[1] http://cwiki.apache.org/GMOxDOC22/tomcat-native-clus= tering.html

2009/5/13 Dennis Cartier <dennis.cartier@gmail.com>



On Tue, May 12, 2009 at 10:19 PM, viola lu <viola.lu@gmail.com> wrote:
First, pls set up tomcat or wadi cluster following this link: http://cwiki.apache.org/GMOxDOC22/clustering-and-farming.html
and then configure apache http server to realize session affinity, if you u= se mod_jk way: edit works.properties under $http server install dir/conf wi= th
=A0 =A0worker.loadbalancer.sticky_session=3D1
if you use mod_proxy, you can edit httpd.conf with:
ProxyPass / balancer://mycluster/ stickysession=3DJSESSIONID

Viola



On Wed, May 13, 2009 at 9:10 AM, Dennis Cartier <dennis.cartier@gmail.com> wro= te:
I am trying to find out how to configure G2.1.4 for session affinity when u= sing Tomcat and WADI. Would anyone be able to point me in the right directi= on?

I thought that ClusterNodeName looked like a good guess in the config-subst= itutions.properties file but that does not seem to attach a node name to th= e generated session.

Any help would be appreciated.

Dennis



--
viola

Thanks for the pointers Viola. I am fine with the clustering aspects as far= as Apache goes, I am just having trouble getting the node name to be prope= rly appended to the generated JSESSIONID.

I changed to the target namespace as indicated in the G2.2 cluster docs (&l= t;web-app xmlns=3D"http://geronimo.apache.org/xml/ns/j2ee/web/tomca= t-2.0.1">) and I already had my WAR marked distributable as well as= having the <tomcat-clustering-wadi /> element in place.

Unfortunately I still do not get a node name being appended to the generate= d session so no affinity results.

I noticed the G2.2 docs had a section on switching WADI to unicast. This so= unded optional, I assume the default multicast mode of WADI is functional a= nd changing to unicast is not required?

I remain stumped. With no session affinity my requests are still spraying a= cross the entire cluster rather then being sticky to a single node.

Dennis


Hmmm, I am getting the feeling that stick sessions (session affinity) is no= t possible in WADI clustering? I am not really wanting to switch to Tomcat = native clustering at this point. Does anyone know if WADI (as implemented i= n G2.1.4) supports sticky sessions?

Dennis



--000e0cd4d8aa10698d0469eb1576--