Nginx and SCGI

Piotr Sikora piotr.sikora at frickle.com
Fri Jan 8 22:43:10 MSK 2010


>> few months ago for my "proxy vs fastcgi vs scgi vs wsgi" tests
>
> Against what application framework did you run the tests?

> Did you publish the results anywhere?
> By what measure did proxy win?

No, I didn't publish the results (I know, shame on me) and the only thing 
left now is text file with *some* results (ironically, results for 
nginx+mod_scgi are missing).

Anyway, it looks like the test was "search for the best way to run WSGI 
applications".

The application in question was simple "Hello World!" backed by Google's 
webapp framework.

I tested Apache, Cherokee, lighttpd and nginx. Each server was tested (when 
possible) with FastCGI-to-WSGI, SCGI-to-WSGI and WSGI. Proxy was tested 
using CherryPy and Paste.

Some random thoughts:
1) I didn't like Cherokee and lighttpd,
2) SCGI seems to be ~20% faster than FastCGI (but this is probably because 
of small response size in test app),
3) CherryPy behind nginx beats every other web server (req/s) and only 
losses to standalone CherryPy (and I'm not comfortable enough to run it 
without "real" web server in front of it). At least it did at the time, now 
it probably looses also to Tornado behind nginx ;)

Proxy has also two very strong advantages over any Gateway Interface:
1) it's language & framework agnostic, and even if your framework can't talk 
HTTP you can always run Python apps using CherryPy's web server, Ruby apps 
using Thin and PHP apps behind Apache (because it's the only environment 
those broken apps works in),
2) there are no issues with pushing traffic over TCP/IP to other machines 
(think: clusters / web farms).

Also, this test was the reason why I started using nginx ;)

Best regards,
Piotr Sikora < piotr.sikora at frickle.com >




More information about the nginx mailing list