Sticky Load Balancing with Varnish

Niklas Norberg niklas.norberg at bahnhof.se
Thu Apr 15 13:10:47 CEST 2010



ons 2010-04-14 klockan 21:04 +0000 Poul-Henning Kamp writes:
> The hash director selects backend based on the object hash value
> (as produced by vcl_hash{}).  This allows you to distribute your
> content over your backends such that they pool their resources.
Aha, point taken. It seems to follow the main design idea
(http://varnish-cache.org/wiki/ArchitectNotes), nice.

> The client director will send the same client to the same backend
> all the time.
> 
> >The client director comes close to my intended setup but the problem
> >with balancing on client ip is, as have been mentioned before, that lots
> >of clients (real users behind their browsers) can share the same
> >ip-adress.
> 
> Yes, I'm aware of this.
> 
> I have a patch which I hope will be in 2.1.1 where you can control
> what the client director selects on, somewhat like you do with
> vcl_hash{} for the hash-key.

Ok, but it would be nice if this load-balancing supports backends that
uses session-cookies. And that the "control" can be choosen to look at a
LB-cookie.

In that case non-secure/common traffic can be load-balanced with the
hash director and the private with the client director.

I think it's vital that the private traffic for each end-client goes to
the same backend since backend-session-redundancy is expensive.


Thanks

Niklas Norberg







More information about the varnish-misc mailing list