Jacob Kaplan-Moss wrote:
On 12/20/06 2:23 PM, Chad Whitacre wrote:
> I'm interested in deploying Django as a pure-Python HTTP daemon, much
> like Zope and CherryPy are deployed. Is this done at all w/ Django?

I'm pretty sure that's how Simon is serving his new site -- see
http://simonwillison.net/2006/Dec/20/nginx/#comments.  Simon, if you're
reading this, want to chime in?

This is a long term point of frustration for me. I /was/ using CherryPy
- for all of 8 hours - but it just didn't seem stable enough. What I
really want is a pure-Python server that can serve up a WSGI
application and doesn't need to be baby-sat. For whatever reason,
CherryPy was giving me "bad gateway" errors to my nginx front-end. I
could have set up something like supervisord, daemontools or monit to
monitor and automatically restart it but I'd rather avoid the
administration overhead.

So, I'm now serving simonwillison.net using a stripped down
mod_python/Apache server (mod_python is pretty much the only module
loaded) that's sat behind nginx, which is configured to serve up my
static files and proxy the dynamic requests through to Apache. I'm
using Apache as a python application server basically because I can
rely on it staying up. It's been working great so far.

nginx is fantastic as a front-end static file server / proxy /
load-balancer (when I was running CherryPy I had two CherryPys
load-balanced by nginx). Well worth checking out.

One alternative I haven't explored fully yet is fastcgi, in particular
the fastcgi variant which is managed by the web server (so you don't
have to manage the fastcgi processes yourself).

So... if anyone knows of (or wants to write) a robust pure-python WSGI
server that comes with tools for properly managing it as a daemon, I'm
all ears. Until then, I'll probably stick with mod_python/Apache.

Cheers,

Simon


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

Reply via email to