[Twisted-web] Nginx vs Twisted Web

Richard Wall m-lists at the-moon.net
Tue Jul 2 07:25:35 MDT 2013


On 2 July 2013 12:26,  <exarkun at twistedmatrix.com> wrote:
> On 03:08 am, lozinski at freerecruiting.com wrote:
<snip>
>> Then I wonder about reliability.  Nginx has a larger installed base,
>> more bug reports presumably more reliable.   Plus it includes a process
>> monitor that
>> keeps things running.  I think twisted web includes monitoring software,
>> but perhaps not as robust and mature.
>
> Twisted Web doesn't include any monitoring software, although Twisted Runner
> does include "procmon" which launches and re-launches a program as
> necessary, so perhaps this is what you're referring to here.
>
> There are also lots of other projects that do what "procmon" does (as well
> or better) and are entirely compatible with Twisted Web, so there's no
> shortage of options here.

Worth mentioning that Twisted works very well with Systemd for process
monitoring. And it supports Systemd socket activation too (unlike
Nginx)
 * https://twistedmatrix.com/documents/current/core/howto/systemd.html
 * http://trac.nginx.org/nginx/ticket/237

This may also partly satisfy your configuration reload requirement. In
so far as you can restart the Twisted process without dropping any new
connections. Systemd keeps listening on port 80 queuing up new
connections until Twisted starts up again.

What I don't know is whether you can shutdown Twisted web gracefully
ie wait for established connections to close.

I also don't know if systemd would start a new twisted process until
the old one had died.

Another problem is that Twisted doesn't yet support SSL on adopted sockets.

-RichardW.



More information about the Twisted-web mailing list