本文介绍了为什么要使用nginx而不是其内置服务器来部署龙卷风?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现我们可以通过触发类似python main.py之类的东西来运行龙卷风应用程序.但是其他所有人都说要与nginx一起部署龙卷风.有什么好处?我知道这有点愚蠢,但我真的很困惑.

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.

推荐答案

请参阅Tornado文档中有关Nginx的注释:

See the notes on Nginx in the Tornado docs:

http://tornado.readthedocs.org/en/stable/guide/running.html

由于一个Tornado进程只能利用一个CPU内核(,请参见更新了文档以获取对此的开发),请使用Nginx对多个Tornado进程进行负载平衡以使用多个内核此外,Nginx可能比Tornado更有效率的静态文件处理程序.

Since one Tornado process can only take advantage of one CPU core ( 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.

这篇关于为什么要使用nginx而不是其内置服务器来部署龙卷风?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 06:14