sticky session

Per Buer perbu at varnish-software.com
Mon Aug 11 17:47:32 CEST 2014


Hi Ashish,


On Mon, Aug 11, 2014 at 5:39 PM, Ashish Nepal <aashisn at hotmail.com> wrote:

> Hi, I am not 100% sure how client.identity = req.http.cookie works,
> neither i got good firm understanding from varnish-cache website itself.
>
> can someone explain me if with below config i can get all request from one
> user to same backend?
>
> If yes,
> My test gives me diff backend, if no, can someone explain me how this
> works?
>
>  } elseif (req.http.host ~ "^test\.domain\.com$") {
>                  set client.identity = req.http.cookie;
>                  set req.backend = loc1;
>
>                  if(!req.backend.healthy) {
>                         set req.backend = loc2;
>                  }
>
>         }
>
>
The client director should have multiple backends in one director. Have you
set it up like this? I would also pick out just the cookie you need and not
the whole Cookie header from the client.

-- 
 <http://www.varnish-software.com/> *Per Buer*
CTO | Varnish Software
Phone: +47 958 39 117 | Skype: per.buer
We Make Websites Fly!

Winner of the Red Herring Top 100 Global Award 2013
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20140811/f363c145/attachment.html>


More information about the varnish-misc mailing list