django_user wrote:
Apache may be too bloated for a Linode 360.
I disagree with this. Apache has a bad rap because of the default configuration that is shipped with most major distributions. Apache can be tuned to sing carols on a Linode 360, right alongside MySQL (similarly tuned).
Among my top 3 languages that I work in regularly, Python is number 2 these days -- and when I dabbled in Django, I followed their recommendation precisely and used Apache and mod_wsgi. I've also had success adapting the Lighttpd section of
this guide to nginx, as well. Your mileage may vary.
I just hate seeing folks immediately write off Apache because it's "bloated"; it's not Apache that's bloated, it's the things that we add to each Apache process. Along those lines, I think there's a general lack of knowledge regarding tuning Apache. I regularly see folks who apparently don't touch the Apache configuration after they install it, and are then surprised when the OOM killer starts tearing up their setup.
Instead of relying on the small "get up and running" tutorials (even the Linode Library -- by all means use it, but don't use it solely), a wise system administrator will fully read the documentation for a product and
understand it before putting a product in heavy production. I feel there is too little of this today, due to various things -- most of them misdiagnosed as ADD and the inability to focus for long periods of time. (I suffer from this, and I don't think it's ADD.)
That's what happens with Apache. Someone follows a quick start guide and
never touches the configuration again, they run out of memory on their equipment and the entire stack goes down, then Apache gains a reputation as being bloated.
Sorry to tangent from your original question!
django_user wrote:
nginx has a mod_wsgi module, but it seems to have many limitations.
You don't have to run Django via mod_wsgi under nginx. The way I ran PHP under nginx (which helped Wordpress survive Slashdot on a Linode 540) was via FastCGI. Python can be coerced to do FastCGI, but it doesn't have built-in support for it like PHP does. There's a few guides out there that I've adapted to my needs; I
regularly come back to this one.
django_user wrote:
I'm currently leaning towards trying Apache. I will do some load tests before making the final decision. But I'm curious to see what others are using and would like to hear their opinions.
Install Apache, slash MaxClients down quite a bit, and (for prefork MPM) make sure Apache doesn't spawn more than a few processes with mod_anything. How many req/min does your site do right now?
django_user wrote:
Would you please share your Linode type, website setup and size?
When I ran Django, I did Apache with mod_wsgi and MySQL on a Linode 360. It was for development, so I tuned it to handle two concurrent requests -- with that setup, I had about 150 MB of RAM remaining for cache (and the Linode was doing some other things).