I recently started experimenting with the web server / Python infrastructure and Tornado for web development. I used to use PHP with my own infrastructure on the LAMP stack. With PHP, deploying updated code / new code is as easy as uploading it to the server due to the interaction of mod_php and Apache.
When I add new code or update code in Python / Tornado, do I need to restart the Tornado server? I saw that this is problematic if you have several active users.
(a) Should I reboot the server, or is there another / better way?
(b) If so, how can I avoid disconnecting users / getting errors / etc. upon restart (which may take a few seconds)?
[One possible consideration is to use a page flipping paradigm with Nginx pointing to the server, starting a new server instance with updated code, redirecting Nginx, and deleting the original server ...?]
source share