More than one varnish

Baptiste bedis9 at gmail.com
Mon Apr 2 09:52:38 CEST 2012


Well, in HAProxy, you have two interesting balance methods for caching:
- balance uri (as mentionned previously)
- balance url_param


The url_param allows you to stick a parameter value to a backend
server, which may be usefull for websites loading images from a databe
wich this kind of URLs:
/image.php?imageid=1
/image.php?imageid=2
/image.php?imageid=3

With "balance uri", all these objects would be loaded from the same server.
With "balance url_param imageid", then each object may be loaded by a
different backend.

Note you can combine both parameters with "hash-type" to improve hit
rate when servers go up and down.

cheers



More information about the varnish-misc mailing list