Varnish and sticky sessions

aotto at mosso.com aotto at mosso.com
Sat Nov 21 19:53:23 CET 2009


Hash by client source port number and you'll get a nice even distribution.

Adrian
Sent via BlackBerry by AT&T

-----Original Message-----
From: "Albert Lash" <albert.lash at docunext.com>
Date: Fri, 20 Nov 2009 13:24:54 
To: Artur Bergman<sky at crucially.net>
Cc: varnish-dev at projects.linpro.no<varnish-dev at projects.linpro.no>; Robert Olsson<robert.olsson at qbranch.se>
Subject: Re: Varnish and sticky sessions

Use of a cookie would definitely work, and there are probably a bunch of
other simpler methods too. One example - I would add client ip addresses
to the hash and select a backend based upon it, randomizing previously
unknown ip addresses. Depending on where the clients are, the load balance
might become off-balance... my mileage always vary.

I vote for keeping it as a documented configuration rather than a built-in
feature.

> set a cookie and direct on that cookie?
>
> On Nov 20, 2009, at 1:21 AM, Robert Olsson wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hello!
>> Is there any plan to support sticky sessions in varnish?
>> Some of the sessions will be a cookie-based logins and I need them
>> to use the
>> same backend (in varnish point of view) during the whole session.
>> First when the backend server stop answering connections the clients
>> (or sessions)
>> will be directed to another backend server.
>>
>> Is this possible to solve today in current stable release or will it
>> be
>> supported in a future version of varnish?
>>
>> Thank you for your answers :)
>>
>> //Robert Olsson
>> - --
>> Med vänlig hälsning / Best Regards
>> Robert Olsson
>> Change Consultant
>>
>> Qbranch Stockholm AB
>> Office: +46 8 672 50 00
>> Cellphone: +46 732 312 475
>> Fax: +46 8 13 70 70
>> Address: Primusgatan 18
>> SE-112 62 Stockholm
>> QBRANCH: VI FÅR IT ATT FUNGERA
>> Om du inte är den mottagare för vilken meddelandet är avsett,
>> bör du radera det och helst underrätta avsändaren om detta.
>> Du får då enligt lag varken kopiera innehållet eller vidarebefordra
>> meddelandet till någon.
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.9 (GNU/Linux)
>>
>> iEYEARECAAYFAksGX6AACgkQJ0skqjbzPOPlcQCcDv7+55VQn44Mnvg+zzlxQaXj
>> RCIAoJikczc63Edc/i9V7cKZEYvb5jip
>> =u9uA
>> -----END PGP SIGNATURE-----
>>_______________________________________________
>> varnish-dev mailing list
>> varnish-dev at projects.linpro.no
>> http://projects.linpro.no/mailman/listinfo/varnish-dev
>
>_______________________________________________
> varnish-dev mailing list
> varnish-dev at projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-dev
>


-- 
http://www.docunext.com/

_______________________________________________
varnish-dev mailing list
varnish-dev at projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-dev


More information about the varnish-dev mailing list