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
_______________________________________________
varnish-misc mailing list
[email protected]
http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to