Re: Customized Stickiness

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

 



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@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[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