-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Deployment
Most Tornado apps are run as single processes. For production, there are no officially endorsed/preferred ways of managing your Tornado deployments, however this page will recommend and gather some best practices.
When debug mode is enabled, templates are not cached and the app will automatically restart during development. This will fail if a Python syntax error occurs, however.
You might want to run your app from a terminal multiplexer like screenor tmux for more flexibility in leaving things running and tracing fatal errors.
Typically in production, multiple tornado app processes are run (at least one per core) with a frontend proxy. Tornado developer bdarnell has a tornado-production-skeleton illustrating this using Supervisor (process management) and nginx (proxying).
The official docs includes an example for running nginx as a load balancing proxy and for serving static files. *