5 ms·
> 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
by xiongchiamiov 16y ago
> 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.
- mechanical_fish 16y agoDitching 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.
- wiredfool 16y agoIs 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?
- splitrocket 16y agonothing 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: http://www.coldhardcode.com/2009/04/varnish-and-movabletype-for-co.html http://www.coldhardcode.com/2009/04/varnish-and-movabletype-... The same is true for wordpress: http://www.varnish-cache.org/trac/wiki/VarnishAndWordpress http://www.varnish-cache.org/trac/wiki/VarnishAndWordpress
- deleted 16y ago[deleted]
- xiongchiamiov 16y agoI can only speak for Cherokee, as that's the only one I've used extensively. A thread[0][1] came up recently about the possibility of including .htaccess support in Cherokee; I can't predict if it'll go anywhere. Configuration is done through a web-based GUI (something I'd normally abhor), with wizards for all sorts of common tasks (it's only a few clicks for a working Wordpress install, for instance). The website documentation is horribly out of date for most things, however, but the mailing list is quite helpful for anything you can't figure out. [0]: http://lists.octality.com/pipermail/cherokee/2010-October/013694.html http://lists.octality.com/pipermail/cherokee/2010-October/01... [1]: http://lists.octality.com/pipermail/cherokee/2010-October/013701.html http://lists.octality.com/pipermail/cherokee/2010-October/01...
- ErrantX 16y agoI'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 :)
- pronoiac 16y agoOn 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.
- cstross 16y agoLet 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) ...
- tomfakes 16y agoIf 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
- pronoiac 16y agoI 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.
- mst 16y agoHonestly - 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 :)
- aaronblohowiak 16y agoWhy is varnish fragile? It is a bit odd to configure, but that seems like a set and forget kind of a thing.
- wwortiz 16y agoCherokee 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.