I found out that we can run the tornado application from just firing something like python main.py
. But everyone else says to deploy tornado with nginx. What are the benefits? I know it's a bit foolish, but I really am confused.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
See the notes on Nginx in the Tornado docs:
http://tornado.readthedocs.org/en/stable/guide/running.html
Since one Tornado process can only take advantage of one CPU core (Edit: See updated docs for a development on this), use Nginx to load-balance multiple Tornado processes to use multiple cores Additionally, Nginx is likely a more efficient static file handler than Tornado.