Why use nginx to deploy tornado instead of its built-in server?

≯℡__Kan透↙ 提交于 2019-12-05 01:54:31

问题


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.



来源:https://stackoverflow.com/questions/23394080/why-use-nginx-to-deploy-tornado-instead-of-its-built-in-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!