FastCGI or Upstream proxy for python?

Cliff Wells cliff at develix.com
Thu Oct 9 21:07:05 MSD 2008


On Wed, 2008-10-08 at 09:44 +0100, Phillip B Oldham wrote:
> Nothing yet - was going to either use Paste/WebOb or web.py; looking for 
> benchmarks for the smaller frameworks. However, I'm not adverse to using 
> something a little different if its preferable for nginx. I understand 
> sockets are faster than TCP, but is fastcgi better than upstream?

I prefer proxying as it seems simpler to me.  Performance difference
isn't significant in any case.

For proxying, Paste's HTTP server is okay (I've not used web.py), but
I'd consider one of these instead:

CherryPy's wsgiserver - Fast and is only a single file:
http://www.cherrypy.org/browser/trunk/cherrypy/wsgiserver/__init__.py

Spawning - not as fast as CP, but more scalable:
http://pypi.python.org/pypi/Spawning/

FAPWS - Very, very fast (I've clocked 5000req/s serving a simple page),
but very bleeding edge:
http://github.com/piranha/fapws2/

All of them are WSGI compliant, so you should have no problem using
WebOb in any case.

Regards,
Cliff






More information about the nginx mailing list