Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I compared changing the Apache MPM, Varnish & nginx for a high-traffic, low memory (256M) server.

* Changing Apache would have required changing other packages - PHP wasn't thread-safe.

* Varnish looked fragile. I wish I still had my notes about why I thought that.

* Nginx in front of Apache was relatively quick to setup & really great in practice - restarting an order of magnitude less often.

If the nginx config file would be useful as a starting point, I offer it.

Edit: formatting.



Honestly - publish it on a blog somewhere or shove it into a github repo or whatever - but if it was useful to you, it's quite possibly useful to somebody else so you should publish by default rather than merely offering.

I'm not sure if it would help me, but I'm almost certain it would help other people - so please, consider your offer accepted if you can find somewhere easy to publish this :)


Why is varnish fragile? It is a bit odd to configure, but that seems like a set and forget kind of a thing.


The Varnish configuration is hairy - manually tweaking cookies to cache images for everybody while avoiding duplication, denormalizing headers so that IE & Firefox can both get the benefit of compression, dealing with pragma & cache-control, etc.

(Compression & other varying content was a headache - separately caching & serving gzip, deflate, & unpacked versions, without any built-in compression.)

Those tweaks looked time-consuming to set up, hard to test, & liable to break quietly. A buffer in the way that simply & quickly gets a response from (& then frees up) Apache, then slowly feeds the response to the client, provides most of the benefit; nginx fills this role well for me.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: