httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g.@ulmail.net
Subject [users@httpd] mod_proxy_balancer and stickysession
Date Tue, 12 May 2009 21:50:36 GMT
Hi,

we want to use mod_proxy_balancer to load balance a J2EE
application server. So stickysession is set to JSESSIONID.
First I had:

	<Proxy balancer://default>
	  BalancerMember http://host1
	  BalancerMember http://host2
	  BalancerMember http://host3
	  ProxySet stickysession=JSESSIONID
	</Proxy>

	ProxyPreserveHost On
	ProxyPassMatch ^(.*\.jsp)$ balancer://default$1
	ProxyPassMatch ^(.*\.do)$ balancer://default$1

But the session was not sticky. After some TCP dump and reading
a bit more documentation, it seems that mod_proxy_balancer
alters the sessionid by appending ".[number]".

So now I have:

	<Proxy balancer://default>
	  BalancerMember http://host1 route=0
	  BalancerMember http://host2 route=1
	  BalancerMember http://host3 route=2
	  ProxySet stickysession=JSESSIONID
	</Proxy>

	ProxyPreserveHost On
	ProxyPassMatch ^(.*\.jsp)$ balancer://default$1
	ProxyPassMatch ^(.*\.do)$ balancer://default$1

In all likelihood this works better. Is this the right way to
do it?

Regards,
Gerhard

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message