在生产中,阿帕奇+ mod_wsgi的或Nginx的+ mod_wsgi的? [英] In production, Apache + mod_wsgi or Nginx + mod_wsgi?

查看:198
本文介绍了在生产中,阿帕奇+ mod_wsgi的或Nginx的+ mod_wsgi的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

要使用什么样的一个中型至大型蟒蛇WSGI应用,阿帕奇+ mod_wsgi的或Nginx的+ mod_wsgi的?


哪个组合将需要更多的内存和CPU时间?

哪一个是更快?

这是已知为比另一个更稳定?


我还想到使用CherryPy的WSGI服务器,但我听说它不是很适合一个非常高负载的应用程序,你知道这不?



注意:我没有使用任何Python的Web框架,我只是写从头开始,整个事情

注意:其他建议也欢迎

What to use for a medium to large python WSGI application, Apache + mod_wsgi or Nginx + mod_wsgi?

Which combination will need more memory and CPU time?
Which one is faster?
Which is known for being more stable than the other?

I am also thinking to use CherryPy's WSGI server but I hear it's not very suitable for a very high-load application, what do you know about this?

Note: I didn't use any Python Web Framework, I just wrote the whole thing from scratch.
Note': Other suggestions are also welcome.

推荐答案

有关nginx的/ mod_wsgi的,请确保您阅读:

For nginx/mod_wsgi, ensure you read:

<一个href=\"http://blog.dscpl.com.au/2009/05/blocking-requests-and-nginx-version-of.html\">http://blog.dscpl.com.au/2009/05/blocking-requests-and-nginx-version-of.html

由于nginx怎么是下面一个事件驱动的系统中,它具有有利于诸如阻塞应用程序作为与基于WSGI应用的情况下的行为特征。更糟糕的情况是,与多进程nginx的配置,您可以看到用户的请求被封锁,即使一些nginx的工作进程可能是空闲的。阿帕奇/ mod_wsgi的没有这个问题,因为Apache进程将只接受请求时,它有足够的资源来实际处理请求。因此阿帕奇/ mod_wsgi的将给予更多的predictable和可靠的行为。

Because of how nginx is an event driven system underneath, it has behavioural characteristics which are detrimental to blocking applications such as is the case with WSGI based applications. Worse case scenario is that with multiprocess nginx configuration, you can see user requests be blocked even though some nginx worker processes may be idle. Apache/mod_wsgi doesn't have this issue as Apache processes will only accept requests when it has the resources to actually handle the request. Apache/mod_wsgi will thus give more predictable and reliable behaviour.

这篇关于在生产中,阿帕奇+ mod_wsgi的或Nginx的+ mod_wsgi的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆