Sticky Load Balancing with Varnish

Poul-Henning Kamp phk at
Wed Apr 14 23:04:23 CEST 2010

In message <1271268819.5141.85.camel at app-srv-debian-amdmp2.idni>, Niklas Norber
g writes:

>Does the hash director balance differently, in the big picture, than the
>already existing random director?

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.

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

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.


Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-misc mailing list