by Péter Szabó for
This talk presents an automated, safe, 0-downtime deployment setup for Python web applications running on a single Unix server, using existing open source technologies (proxy-capable web servers such as Apache and nginx, SSH, Git) and some custom scripts and Python modules. The setup works with Django or any other WSGI-capable web application, and it can use processes, threads, and/or coroutines (i.e. greenlets or tasklets with I/O libraries gevent and Syncless) for running workers in parallel. The setup also works not only with HTTP, but with other TCP-based servers.
The most important unique feature of this deployment setup is that the old version continues running with 0 downtime in case of a startup or unit test failure. Other features: dynamic worker pool size to accommodate increased load; a development system can run in parallel with the production system for manual testing.