sticky session

Ashish Nepal aashisn at hotmail.com
Mon Aug 11 18:06:30 CEST 2014


Hey per,
Thanks for response, Yes multiple backend in both directors lo1 and loc2.
I can see cookie being same but still goes to to diff backend. when i look into varnishlog rxheader.
RegardsAshish
From: perbu at varnish-software.com
Date: Mon, 11 Aug 2014 17:47:32 +0200
Subject: Re: sticky session
To: aashisn at hotmail.com
CC: varnish-misc at varnish-cache.org

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.



-- 






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/0bd60c10/attachment.html>


More information about the varnish-misc mailing list