如果我想使用一个主塔应用程序与Apache,我应该使用的mod_wsgi或代理粘贴? [英] If I want to use a pylons app with Apache, should I use mod_wsgi or proxy to paste?
问题描述
或者我应该使用一个完全不同的服务器?
Or should I be using a totally different server?
推荐答案
Nginx的与mod_wsgi的要求使用异步非阻塞框架和安装,并且不太可能与主塔摸出框。
Nginx with mod_wsgi requires the use of a non-blocking asynchronous framework and setup and isn't likely to work out of box with Pylons.
我通常与代理路由到一个独立的主塔过程使用PasteScript#CherryPy的WSGI服务器(作为它的性能更高的比粘贴#HTTP之一,尽管如果有泄漏不会回收线程... )。
I usually go with the proxy route to a stand-alone Pylons process using the PasteScript#cherrypy WSGI server (as its higher performing than the Paste#http one, though it won't recycle threads if you have leaks...).
如果你在使用Apache,并设置其的您的服务器(这样你就可以编译和运行Apache的mod_wsgi),我建议使用该设置为较少的维护,有效地利用多个内核。随着代理设置,你必须使用多个粘贴过程mod_proxy_balancer的有效利用多个内核/处理器。
If you're set on using Apache and its your server (so you can compile and run Apache mod_wsgi), I'd suggest using that setup as its less maintenance to effectively utilize multiple cores. With a proxy setup, you'd have to use the mod_proxy_balancer with multiple paste processes to effectively utilize multiple cores/cpus.
如果您要部署到别人的阿帕奇(共享主机),mod_proxy的一般是在Apache的2.2及以上的更容易解决方案,它的股票。
If you're deploying to someone else's Apache (shared hosting), mod_proxy is generally the easier solution as its stock in Apache 2.2 and above.
就个人而言,我一般用的nginx +代理多个贴膜流程部署。
Personally, I usually deploy with nginx + proxy to multiple paster processes.
这篇关于如果我想使用一个主塔应用程序与Apache,我应该使用的mod_wsgi或代理粘贴?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!