Jose Galvez wrote:
> Anyone using mod_wsgi with Apache? how good is that for deployment,
> better/worse then mod_proxy with paster?

I'm using Apache2 + mod_wsgi 2.0 as a process controller and nginx to
serve static content and proxy dynamic requests to apache2.

Apache2 uses the worker (threaded) MPM and is configured to be pretty
lightweight [1] by only loading a minimal set of modules, turning
keep-alive off and having a limited amount of threads. This is possible
because it runs behind nginx which takes care of spoon-feeding the slow
clients over a keep-alive connection making dynamic requests to the
Apache backend quite fast since they're local. Since nginx does some
caching of the response, these requests are quite fast and don't tie up
a heavy python process for too long so a small pool of workers can
handle moderately high loads.

The reason I use it over paster+supervisord is because I find it *much*
easier to set up and maintain and more powerful (mod_wsgi can be
configured to spawn wsgi applications into separate processes under
their own user/group, restart them if they crash, kill them if they
deadlock, isolate them in their own virtualenv, etc...).

As you see, It's more or less the typical supervisord + paster + nginx
setup but changing paster and supervisord with apache+mod_wsgi because I
find the later much easier to configure and maintain.

Alberto

[1] The master process only eats around 4M resident size on my machine.
The slave processes which host the python app take up much more but I
guess it's roughly the same they would take using paster or any other
python webserver since it is the actual python app.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to