httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From G Quiggin <gjquig...@hotmail.com>
Subject [users@httpd] mod_proxy_balancer config for HTTP header based sticky sessions
Date Sun, 17 Jul 2011 13:55:43 GMT

Hello there,

I'm trying to write a mod_proxy_balancer config to implemented sticky sessions between multiple
backend tomcat instances with stickyness provided by an HTTP header.

eg 1st incoming request is processed by app and responds by setting a custom HTTP header with
a value set at randon. All subsequent requests are processed by the same back end server.

So I'm trying to figure out a mod_proxy_balancer config which would support this, or which
in general would support sticky sessions via a custom header that the application has set
to a value.

Need apache proxy rules to forward incoming requests accompanied by an HTTP header to be sticky
to one instance of the tomcat cluster.

ProxyPass /test balancer://test_cluster/test-app stickysession=%{HTTP:X-Test-Header}

<Proxy balancer://test_cluster>
 BalancerMember http://giggle:8081 route= ???
 BalancerMember http://giggle:8082 route= ???
 BalancerMember http://giggle:8083 route= ???
 BalancerMember http://giggle:8084 route= ???
</Proxy>

I'm sure I also need to use Header add Set-Cookie and BALANCER_SESSION_STICK and route set
correctly within the config and perhaps a rewrite rule.

Thanks, 
G J Quiggin

 		 	   		  
Mime
View raw message