client.identity and client director -- How?
Michael Bu
michael.bu at gmail.com
Wed Dec 1 20:16:28 CET 2010
Hi All,
I want to know how to setup a client director and make use of
client.identity to force the request always going to the same backend
instance (ie. sticky).
Here's my setup:
backend a {
.host = "192.168.1.4";
.port = "8880";
}
backend b {
.host = "192.168.1.5";
.port = "8880";
}
director tomcat client {
{
.backend = a;
.weight = 1;
}
{
.backend = b;
.weight = 1;
}
}
sub vcl_recv {
## set sticky bit for backend director ##
set client.identity = regsub(req.http.Cookie, ".*JSESSIONID=.*\.(\w).*",
"\1");
set req.backend = tomcat;
}
Unfortunately the above setup didn't work as expected.
Could some one please give me some advice?
Thanks in advance!
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101202/d4c8c6a0/attachment-0003.html>
More information about the varnish-misc
mailing list