4.3. Varnish

  1. Varnish is a smart caching reverse-proxy, probably best described as a web
  2. application accelerator. Varnish doesn't implement SSL/TLS and wants to dedicate
  3. all of its CPU cycles to what it does best. Varnish also implements HAProxy's
  4. PROXY protocol so that HAProxy can very easily be deployed in front of Varnish
  5. as an SSL offloader as well as a load balancer and pass it all relevant client
  6. information. Also, Varnish naturally supports decompression from the cache when
  7. a server has provided a compressed object, but doesn't compress however. HAProxy
  8. can then be used to compress outgoing data when backend servers do not implement
  9. compression, though it's rarely a good idea to compress on the load balancer
  10. unless the traffic is low.
  11.  
  12. When building large caching farms across multiple nodes, HAProxy can make use of
  13. consistent URL hashing to intelligently distribute the load to the caching nodes
  14. and avoid cache duplication, resulting in a total cache size which is the sum of
  15. all caching nodes.