httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sol myr <solmy...@yahoo.com>
Subject Re: [users@httpd] Customized Stickiness
Date Mon, 24 Sep 2012 14:27:15 GMT
Thanks very much.
Would you happen to know if there's a way to control stickiness if my cookies don't include
a ".route", I mean they can't be in the format "cookie.route"?

But your original reply is appreciated regardless, thanks very much.



----- Original Message -----
From: Daniel Ruggeri <DRuggeri@primary.net>
To: users@httpd.apache.org
Cc: 
Sent: Thursday, September 13, 2012 1:41 AM
Subject: Re: [users@httpd] Customized Stickiness

On 9/12/2012 9:14 AM, sol myr wrote:
> Now we'd like the load-balancer to make sure all requests from the same city - go to
the same Tomcat.
> E.g:
> - All requests from NY (namely with cookie "city=NY" go to the same Tomcat
> - All requests from Paris (namely with cookie "city=Paris" go to the same Tomcat
> - We don't mind which tomcat... just never to find 2 new yorkers connected to different
Tomcats.

If you can control the cookie Tomcat sets and set it to be
"city=<something>.city" you can set the balancer configuration like so:

LoadModule headers_module modules/mod_headers.so
<Proxy balancer://AppCluster>
   BalancerMember http://1.2.3.4:8009 route=NY
   BalancerMember http://1.2.3.5:8009 route=Paris
   ProxySet stickysession=city
</Proxy>

This way, when Tomcat sets the cookie called "city", httpd will parse
the cookie looking for the route (after the "." in the cookie value) and
match it to the BalancerMember being used.

-- 
Daniel Ruggeri


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message