> 4. Tune Apache now — you won't get a chance to do it when the stampede arrives!
Or take the easy route and ditch Apache.
I'm not saying that Apache can't be great (people who know much more than me use it), but if you need to quickly serve up a ton of requests without bothering to tune this and tweak that, there are better choices, in particular for static pages.
Cherokee's my preferred, but lighttpd, Nginx, thttpd, etc. are all good, too.
Ditching Apache is only "easy" if (a) your blog software isn't designed around Apache-isms like .htaccess and mod_rewrite, and (b) you have time to find and comprehend the documentation for your alternative server.
Nginx is great, for example, but the docs are primitive compared to those for Apache, which has been around forever and which has spawned thousands of hints and snippets all over the web.
EDIT: At this point I should probably say out loud that for accelerating static pages it might well be simpler to get a reverse proxy, e.g. Varnish, running in front of Apache than to actually ditch Apache.
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) ...
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.
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 :)
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.
On one memory-constrained server, I have nginx reverse proxying to Apache, so the Apache-isms are not an immediate problem. I have nginx bypassing Apache for some static files. Having a ton of slow connections was a problem for Apache, but not for nginx.
Cherokee is actually pretty good at following .htaccess and mod_rewrite for the big blogging/cms engines (like drupal, wordpress). It is much easier to configure, though perhaps a bit more tedious, as it is all done through the web gui.
Other than that Apache is pretty much king with compatibility and nginx is pretty hard to get to similar qualities off the bat.
But if you have the space something like a reverse proxy for Apache with sane times set would probably be the better option.
I use cherokee on VPS's though and it works great.
I've moved almost exclusively to Nginx, once you get your head round how to do the "Apache-isms" (great potential neologism that :D) in Nginx configurations it becomes second nature.
Cherokee is a possible alternative too; that has some default configs for Wordpress etc. that work well. But for anything custom I found it a nightmare to get "just so".
Nginx is a neat alternative to Varnish as well; for example I'm having great success sitting it in front of a Cherokee site (serving the http) to provide SSL :)
Is varnish a drop in fix for something like this while everything is going to hell, or is there some monkeying that has to be done to make it play nice with movable type?
nothing really is a drop in solution for traffic spikes, however, there are a plethora of articles about how to make Varnish play nicely with moveable type:
I understand this is HN and all, but has anyone even bothered to take a peak at the EXTRAORDINARY content that was behind the spike?
In a nutshell, it is a transcript of a British parliamentary session in which the speaker claims a shadowy yet totally legitimate organization--"Foundation X"--is willing to donate billions to the British government no strings attached. It is extremely engrossing.
Sky news is reporting on it too, and while it looks like it could be a work of fiction (it sure reads like one - Dan Brown comes to mind), it apparently isn't.
I seriously considered Typepad, but once I worked out how much it would cost it was cheaper to stick with a dedicated colo server (hint: there's more than one blog on the system I run, and there's also a mailman server and some other stuff).
Also: I've been running on a Linux colo since 1996/7, and I really don't feel the need to take a couple of weeks off work to re-jig my entire online presence. This is the first time I've ever had anything like this load level. If it starts happening regularly, I'll reconsider my strategy. Until then, it's a one-off.
" I don't have an exact breakdown of what just happened, because my logfile analyser is still churning, from 2am last night.That's because the Apache logfile today is over 500Mb it's normally about 150Kb.
"
The post is timed at 11:31.
I think another lesson learned is that the log analyzer needs to be analyzed.