Burning Varnish at the stake

August 22nd, 2009

I have to revise everything I said about varnish before. Meanwhile it is too hard to count the number of times, that I had to restart my instances in the last few weeks and especially today. While packet loss keeps increasing inside the Hetzner network, varnish more and more shows up as a real problem, refusing to serve images randomly with increasing frequency.

I used Varnish till today to cache images hosted on S3, but I am finally so absolutely disappointed (mostly because our users are also with us just because of varnish), that I decided to go back to good ol’ lighttpd with a proxy and caching solution I wrote in PHP (like I did before). The initial reason to switch over to varnish was, that I searched for an uncomplicated way of proxying the images to save bandwidth costs including that I do not have to touch the servers every week like I did before, but unfortunately I ended up touching them twice a day just to restart Varnish. I don’t even dare to think about the traffic peaks caused by this and all the hours I lost while logging into several servers.

I guess this is a clear case of “if you don’t do everything yourself”. However, I completely rewrote my own caching solution, made it completely independent of the backend systems and implemented a SQLite database into every instance so that it’s possible to let it clean up itself once a day via a cron job and generate some basic statistics. -> “Minimal Image Proxy 2″ was born and is already running on our image servers. It’s 3,2kb zipped.

Sigh. Finally I am really looking forward to get some peace of mind and significantly lower traffic bills from Amazon now. And it definitely feels really good again to replace troublemaking programs by a hand-crafted beautiful piece of specialiced software.

Leave a Reply