Load balancing & session affinity (QUERY)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 instead 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=JSESSIONID nofailover=Off
<Proxy balancer://MCSCluster >
BalancerMember
http://workstation1:MCSPort1/MCSRootURI route=host1
BalancerMember
http://MCSServer2:MCSPort2/MCSRootURI route=host2
</Proxy>
ProxyPassReverse /MCSRootURI
http://MCSServer1:MCSPort1/MCSRootURI
ProxyPassReverse /MCSRootURI
http://MCSServer2:MCSPort2/MCSRootURI
-------------------------------------------------------------------------------------------------------------------------------------------------------------

 

3) Query

=> 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 time 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=([^ ;]*)" VARCOOKIE=$1

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

ProxyPass /MCSRootURI balancer://MCSCluster stickysession=MYCOOKIE nofailover=Off
<Proxy balancer://MCSCluster >
BalancerMember
http://MCSServer1:MCSPort1/MCSRootURI route=host1
BalancerMember
http://MCSServer2:MCSPort2/MCSRootURI route=host2
</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 individual or entity to whom it is addressed and may be confidential and/or privileged.

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

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

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

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

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


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux