News for hackers. Stuff that matters.
Re:Ouch by cstross on Thursday November 04, 2010 @05:24PM (#1870853)
Let me add: I am paid to write books, not paid to ride herd on servers. Apache's what I know from days of yore; switching to a new platform means taking an opportunity cost hit.

Having said that, I'm looking at Varnish (once the stampede dies down) ...

Re:Ouch by tomfakes on Thursday November 04, 2010 @10:21PM (#1871733)
If you add Varnish, you'll still need Apache.

If you switch to nginx, then you probably won't need varnish at all and can replace Apache.

The nginx config is much, much, much easier to work with than Apache. Transferring complex rewrite rules is the hardest thing to get right when moving over, but everything else is much easier.

Smart lobsters use nginx

Re:Ouch by pronoiac on Thursday November 04, 2010 @10:52PM (#1871809)
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.

Re:Ouch by mst on Friday November 05, 2010 @12:01AM (#1871977)
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 :)

Re:Ouch by aaronblohowiak on Friday November 05, 2010 @02:04AM (#1872199)
Why is varnish fragile? It is a bit odd to configure, but that seems like a set and forget kind of a thing.
Re:Ouch by pronoiac on Saturday November 13, 2010 @03:32PM (#1901640)
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.