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