Tell HN: Have a look at Varnish
Hey Everyone!
I just wanted to share with you the link to an incredible HTTP accelerator: http://varnish-cache.org/
We've been testing a lot of different stacks for our startup (Tyba) and using NGINX (behind) + Varnish (upfront) has allowed us to go from 9 reqs/sec (loading a Wordpress site) to 2500 reqs/sec.
I know it's not a novelty but I wanted to share it in the hope it helps the few people who don't know about it.
Kind regards,
Eiso
23 comments
[ 4.6 ms ] story [ 63.4 ms ] threadTo give some context, this describes how Varnish combines mmapping with a nice memory partitioning scheme to get free caching from the OS, instead of fighting the OS' tendency to cache and managing it yourself.
Also, the guy that wrote it (Poul Henning-Kamp) is very responsive when it comes to answering questions or fixing issues, they have an IRC channel at #varnish on irc.linpro.no.
Definitely a piece of software worth looking in to when your website gets bigger.
I still love Nginx though :-)
[1] http://labs.frickle.com/nginx_ngx_cache_purge/
It's also likely[1] faster and more well behaved under high loads, simply because it has been around for much longer and seen more tuning in large deployments.
[1] Disclaimer: I haven't benchmarked them against one another, that's merely my common-sense assessment.
You can get fancy[1] by writing your own modules or by building on top of helpers like ngx_devel_kit, but it gets messy very quick.
Implementing complex rules inside the config file is possible to a degree - but an utter nightmare. The syntax is extremely limited and the semantics are hard to predict (order of execution).
So, what nginx is lacking is a proper scripting interface with full control over the request pipeline. ngx_lua and ngx_v8 are in the works but not production-ready, yet.
Personally I'd go as far and say the entire config file should simply be ripped out and replaced with a scripting language.
[1] http://agentzh.org/misc/slides/nginx-conf-scripting/nginx-co... (press cursor right to walk through slides)
[1] http://github.com/chaoslawful/lua-nginx-module/commit/26d9dc...