Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7A34A9538 for ; Thu, 26 Apr 2012 09:51:37 +0000 (UTC) Received: (qmail 59248 invoked by uid 500); 26 Apr 2012 09:51:33 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 58709 invoked by uid 500); 26 Apr 2012 09:51:29 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 58680 invoked by uid 99); 26 Apr 2012 09:51:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 09:51:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [85.115.56.190] (HELO cluster-b.mailcontrol.com) (85.115.56.190) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Apr 2012 09:51:20 +0000 Received: from emea-outbound.3ds.com (emea-outbound.3ds.com [91.103.40.254]) by rly33b.srv.mailcontrol.com (MailControl) with ESMTP id q3Q9oSbP014744 for ; Thu, 26 Apr 2012 10:50:58 +0100 Received: from EU-DCC-MBX01.dsone.3ds.com ([169.254.1.123]) by EU-DCC-HUB01.dsone.3ds.com ([10.22.115.31]) with mapi id 14.01.0289.008; Thu, 26 Apr 2012 11:51:53 +0200 From: GIORGI Olivier To: "users@httpd.apache.org" Thread-Topic: Load balancing & session affinity (QUERY) Thread-Index: Ac0jkhJRvDpS60wFSUmW1DzVDmw5KQ== Date: Thu, 26 Apr 2012 09:50:56 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: AbjC AceC B9fZ Clx/ CpJo DhaZ EHfe EVG6 FAzr GPyp G2J0 IOR7 IZ/X IjqH Izkc J34X;1;dQBzAGUAcgBzAEAAaAB0AHQAcABkAC4AYQBwAGEAYwBoAGUALgBvAHIAZwA=;Sosha1_v1;7;{88217E03-16D3-422A-8FF6-0C1C25479514};bwBsAGkAdgBpAGUAcgAuAGcAaQBvAHIAZwBpAEAAMwBkAHMALgBjAG8AbQA=;Thu, 26 Apr 2012 09:50:54 GMT;TABvAGEAZAAgAGIAYQBsAGEAbgBjAGkAbgBnACAAJgAgAHMAZQBzAHMAaQBvAG4AIABhAGYAZgBpAG4AaQB0AHkAIAAoAFEAVQBFAFIAWQApAA== x-cr-puzzleid: {88217E03-16D3-422A-8FF6-0C1C25479514} x-originating-ip: [10.234.85.22] Content-Type: multipart/alternative; boundary="_000_EE60C9C13C0BAE4B80DA001A947C834C2DADD1D2EUDCCMBX01dsone_" MIME-Version: 1.0 X-Scanned-By: MailControl 7.7.0.1 (www.mailcontrol.com) on 10.66.0.143 Subject: [users@httpd] Load balancing & session affinity (QUERY) --_000_EE60C9C13C0BAE4B80DA001A947C834C2DADD1D2EUDCCMBX01dsone_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello to all, I am using Apache 2.2.21 & Tomcat 6.0.29 1) Schema: Load balancer (Apache.2.2.21) -> 1st appli (Tomcat 6.0.29) -> 2nd appli. (Tomcat 6.0.29) 2) Using the following configuration, my load balancing is stateless instea= d of statefull (having a look at the logs). ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------- ProxyRequests Off Order deny,allow Allow from all LogFormat "%h %l %u %t \"%r\" %>s %b \"%{UNIQUE_ID}e\" \"%{BALANCER_WORKER_= ROUTE}e\"" logjyc CustomLog logs/jyc_log logjyc ProxyPass /MCSRootURI balancer://MCSCluster stickysession=3DJSESSIONID nofa= ilover=3DOff BalancerMember http://workstation1:MCSPort1/MCSRootURI route=3Dhost1 BalancerMember http://MCSServer2:MCSPort2/MCSRootURI route=3Dhost2 ProxyPassReverse /MCSRootURI http://MCSServer1:MCSPort1/MCSRootURI ProxyPassReverse /MCSRootURI http://MCSServer2:MCSPort2/MCSRootURI ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------- 3) Query =3D> What have i missed on Apache or Tomcat side to get JSESSIONID taken in= to account then have a statefull load balancing ? 4) Bypass: using the following configuration my load balancing is this time= statefull (having a look at the logs). ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------- ProxyRequests Off Order deny,allow Allow from all LogFormat "%h %l %u %t \"%r\" %>s %b \"%{UNIQUE_ID}e\" \"%{BALANCER_WORKER_= ROUTE}e\"" logjyc CustomLog logs/jyc_log logjyc SetEnvIf ^Cookie$ "MYCOOKIE=3D([^ ;]*)" VARCOOKIE=3D$1 Header add Set-Cookie "MYCOOKIE=3D%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUTE}e; = path=3D/" env=3D!VARCOOKIE ProxyPass /MCSRootURI balancer://MCSCluster stickysession=3DMYCOOKIE nofail= over=3DOff BalancerMember http://MCSServer1:MCSPort1/MCSRootURI route=3Dhost1 BalancerMember http://MCSServer2:MCSPort2/MCSRootURI route=3Dhost2 ProxyPassReverse /MCSRootURI http://MCSServer1:MCSPort1/MCSRootURI ProxyPassReverse /MCSRootURI http://MCSServer2:MCSPort2/MCSRootURI ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= ------- Thanks in advance for your help. Best regards Olivier. This email and any attachments are intended solely for the use of the indiv= idual or entity to whom it is addressed and may be confidential and/or priv= ileged. If you are not one of the named recipients or have received this email in e= rror, (i) you should not read, disclose, or copy it, (ii) please notify sender of your receipt by reply email and delete this em= ail and all attachments, (iii) Dassault Systemes does not accept or assume any liability or responsi= bility for any use of or reliance on this email. For other languages, go to http://www.3ds.com/terms/email-disclaimer --_000_EE60C9C13C0BAE4B80DA001A947C834C2DADD1D2EUDCCMBX01dsone_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

= Hello to all,

 

I am using Apache 2.2.21 & Tomcat 6.0.29

=  

1) Schema: Load balancer (Apache.2.2.21) -> 1st appli (Tomcat 6.0.29)=

-> 2nd appli. (Tomcat 6.0.29)

 

2) Using the following configuration, my load balancing is stateless inste= ad of statefull (having a look at the logs).

= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------

= ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

= <IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{UNIQUE_ID}e= \" \"%{BALANCER_WORKER_ROUTE}e\"" logjyc
CustomLog logs/jyc_log logjyc
</IfModule>

= ProxyPass /MCSRootURI balancer://MCSCluster stickysession=3DJSESSIONID nofa= ilover=3DOff
<Proxy balancer://MCSCluster >
BalancerMember
= http://workstation1:MCSPort1/MCSRootURI route=3Dhost1
BalancerMember
ht= tp://MCSServer2:MCSPort2/MCSRootURI route=3Dhost2
</Proxy>
ProxyPassReverse /MCSRootURI
http://MCSServer1:MCSPort1/MCSRootURI
ProxyPassReverse /MCSRootURI
http://MCSServer2:MCSPort2/MCSRootURI
---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------

 

3) Query

= =3D> What have i missed on Apache or Tomcat side to get JSESSIONID taken= into account then have a statefull load balancing ?

 

4) Bypass: using the following configuration my load balancing is this t= ime statefull (having a look at the logs).

= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------

= ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>

= <IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{UNIQUE_ID}e= \" \"%{BALANCER_WORKER_ROUTE}e\"" logjyc
CustomLog logs/jyc_log logjyc
</IfModule>

= SetEnvIf ^Cookie$ "MYCOOKIE=3D([^ ;]*)" VARCOOKIE=3D$1

= Header add Set-Cookie "MYCOOKIE=3D%{UNIQUE_ID}e.%{BALANCER_WORKER_ROUT= E}e; path=3D/" env=3D!VARCOOKIE

= ProxyPass /MCSRootURI balancer://MCSCluster stickysession=3DMYCOOKIE nofail= over=3DOff
<Proxy balancer://MCSCluster >
BalancerMember
ht= tp://MCSServer1:MCSPort1/MCSRootURI route=3Dhost1
BalancerMember
ht= tp://MCSServer2:MCSPort2/MCSRootURI route=3Dhost2
</Proxy>
ProxyPassReverse /MCSRootURI
http://MCSServer1:MCSPort1/MCSRootURI
ProxyPassReverse /MCSRootURI
http://MCSServer2:MCSPort2/MCSRootURI

= ---------------------------------------------------------------------------= ---------------------------------------------------------------------------= -------

=  

= Thanks in advance for your help.

= Best regards Olivier.

 

This email and any attachments are intended solely for the use of the indiv= idual or entity to whom it is addressed and may be confidential and/or priv= ileged.

If you are not one of the named recipients or have received this email in e= rror,

(i) you should not read, disclose, or copy it,

(ii) please notify sender of your receipt by reply email and delete this em= ail and all attachments,

(iii) Dassault Systemes does not accept or assume any liability or responsi= bility for any use of or reliance on this email.

For other languages, go to http://www.3ds.com/terms/email-disclaimer

--_000_EE60C9C13C0BAE4B80DA001A947C834C2DADD1D2EUDCCMBX01dsone_--