Unfortunately its 'a REST APi which does not support cookies. 

I'm attempting to get it working as a proof of concept using this vmod 
https://github.com/v     arnish/libvmod-var 

I might extend it to support a hashtable for efficient lookups. 

-----Original Message-----
From: Lasse Karstensen [mailto:[email protected]] 
Sent: Tuesday, October 23, 2012 11:19 AM
To: Oddur Snær Magnússon
Cc: [email protected]
Subject: Re: Sticky Session with an assignable backend

Oddur Snær Magnússon:
> I have a problem where I need to be able to do "sticky session" based on some 
> identity, but be able to tell varnish which identity belongs to which backend.
> In my case, I have a value in the request header(oauth token) which should 
> always go to the same backend. I begin by sending the request to a random 
> backend, and if the users session does not live on that backend I get 
> X-Accel-Redirect header back telling me which backend that request should go 
> to.  I can easily do that part using a restart and send the request to the 
> correct one.
> But  from then on I want to remember that that specific identity should 
> always go to that given backend.

Given that the HTTP client supports it, I'd just put the backend information 
into a client side cookie. 

Send a set-cookie in deliver, and extract/remove it in recv on the next request.

--
Lasse Karstensen
Varnish Software AS
http://www.varnish-software.com/

_______________________________________________
varnish-misc mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

Reply via email to