Re: Nginx vs Twisted Web

Burak Arslan <[email protected]> Tue, 02 Jul 2013 15:48:33 +0300
Newsgroups gmane.comp.python.twisted.web
Message-ID <[email protected]>
On 07/02/13 06:08, Christopher Lozinski wrote:
> What is my conclusion?  Well I think Twisted web is a brilliant object
> model for networking software.  But dedicated software for web serving,
> like nginx performs way better
> and is much more reliable.


Hi,

I had to make a similar decision recently and chose to have nginx serve
static files (/assets/*) and forward other requests to twisted because
nginx supports sendfile. (see man 2 sendfile,
http://wiki.nginx.org/HttpCoreModule#sendfile) Not that I need the
miliseconds it shaves off of my response times, but I just think it
makes sense to use (tools that use) the right tool for the job.

I don't think there'd be much difference between the perceived
"reliability" of the  two approaches though -- both are fairly mature
code bases. Yes nginx is able to reload configuration without
restarting, but what good are static files if your app server is down
anyway?

I hope that helps,

Best regards,
Burak