

modwsgi: Python WSGI adapter module for Apache - ccarpenterg
http://code.google.com/p/modwsgi/

======
whalesalad
We're using this with apache on schoolrack.com. A couple of application
servers running mod_wsgi behind HAProxy and Nginx. Works like a dream. Our
site is pretty snappy =)

This is fairly common knowledge but if you use Apache with Keep-alive off and
serve all your static content with something else (such as Nginx in our case),
and only use Apache for dynamic requests it isn't such a dog. I'm not a
computer scientist and haven't really bothered to get real solid statistics
and reasons behind why mod_wsgi outperforms mod_python, but right off the bat
you'll notice it uses significantly less memory.

I'm also experimenting with straight up nginx -> fastcgi for a few other
projects but am not using it in production for no reason other than Apache +
mod_wsgi has proven itself to be reliable and fast as hell.

------
jacquesm
Use this instead of 'mod_python', especially if you're going to use Django.

~~~
fefzero
Why should I use it (I'm especially interested in the Django case)?

~~~
olefoo
1\. the primary maintainer of mod_wsgi is the primary maintainer of mod_python
and his focus is on wsgi

2\. WSGI is a standard interface defined for python programs in PEP 333 so you
should in theory be able to run your program against the builtin wsgi server
that ships in the standard library and get the same results as you would
running it on any of the webservers that support the WSGI protocol

~~~
benatkin
3\. With mod_wsgi, you can easily restart a django app without restarting
apache, by touching the wsgi file.

~~~
jacquesm
touching the settings file works as well, and almost all of the regular pages
will be reloaded as well as soon as you've saved them.

Rarely do you have to do anything other then just saving the file.

------
dryicerx
I've been using it for the past couple of months and absolutely love it. It's
fast, a lot less memory usage, and a lot stable.

------
TimothyFitz
And remember kids: WSGI rhymes with Whiskey.

~~~
Raphael
That is so SCSI!

------
mattj
I've used this before, and I highly recommend using fcgi instead. Modwsgi (at
least when I tried it) was less stable and not as performant.

------
jokull
At one point we did a lot of testing with different Django deployment setups.
We ended up using mod_wsgi. It was fast and stable.

It would be sweet if you could point it at your virtualenv in a configuration
parameter (to make it use your project specific Python binary and site-
packages).

~~~
roam
Here you go then: <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>

------
inklesspen
I'm actually a fan of reverse-proxying to a production-ready appserver like
paste.httpserver.

------
suhail
<3 nginx + fastcgi

~~~
truebosko
Personally, I've had some issues with fastcgi (for PHP) when you get a lot of
simultaneous requests. It would hang, and eventually lock up with no exit
except a killing of processes. Not sure if it's just my setup, or the
software, or what have you but that's my experience so far.

Needing to make some time to try PHP-FPM and see how that works out.

