Varnish versus other reverse proxies
Well, I'm running Varnish on my webservers, primarily for performance reasons, although its load balancing featues are handy as well.
My use case is caching in front of Django-based websites, and it does wonders for page loading performance. I'm able to serve most pages directly from cache and handle a flood of visitors with little trouble.
The reason I chose Varnish was mainly performance/scalability. The main points:
- Varnish let's the kernel manage virtual memory, where Squid tries to keep separate disk and memory caches, can lead to the kernel and Squid squabbling a bit about what's to be paged out to disk.
- Varnish uses VCL, it's own domain specific configuration language, which compiles down to machine code via C. That is a very real performance benefit if you have a more than a little bit of logic in your configuration – conditional header stripping etc.
In my experience, Varnish performs a bit better than Squid in most cases, and a lot better on traffic spikes. On the other hand, configuring Varnish correctly is going to take some mailing-list-trawling, since there aren't as many ready-to-go-for-your-specific-use-case-documentation flowing around the net as there are for Squid – mainly due to Varnish being a fairly young project in comparison.