WSGI vs uWSGi与Nginx [英] WSGI vs uWSGi with Nginx

查看:183
本文介绍了WSGI vs uWSGi与Nginx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以在使用 WSGI VS uWSGI 与Nginx。

Could anyone please explain pros/cons when using WSGI VS uWSGI with Nginx.

目前我正在建立一个Django网站的生产服务器,我已经准备好但无法决定是否应该与WSGI或uWSGI一起使用。请你详细解释一下每个配置的区别?

Currently i am building up a production server for the Django website which i have prepared but unable to decide whether should i go with WSGI or uWSGI. Could you please explain in detail what differentiates each configuration? Which configuration should scale the best?

提前感谢

推荐答案

好的,这个混乱是因为几个来源缺乏细节,这些协议的命名以及WSGI的实际情况。

Ok, guys this confusion is because of lack of detail from several sources, and the naming of these protocols, and what WSGI actually is.

总结:


  1. WSGI和uwsgi 都是ARE 协议,而不是服务器。它用于与Web服务器进行通信以进行负载平衡,特别是利用纯HTTP无法提供的额外功能。到目前为止,Nginx和Cherokee已经实现了这个协议。

  2. uWSGI是一个服务器,它实现的协议之一是WSGI(不要将uwsgi协议与uWSGI服务器混淆)。 WSGI是一个Python 规范。 WSGI规范有几个实现,它不仅用于应用服务器/ Web服务器,而且还有不少WSGI应用服务器(即CherryPy,也就是具有符合WSGI生产要求的Web服务器) ,如果你没有足够的困惑已经!)。

  3. 将uwsgi与WSGI进行比较是将桔子与苹果进行比较。

  1. WSGI and uwsgi both ARE protocols, not servers. It is used to communicate with web servers for load balancing and especially to take advantage of extra features that pure HTTP can not provide. So far Nginx and Cherokee have implemented this protocol.
  2. uWSGI is a server and one of the protocols it implements is WSGI (do not confuse the uwsgi protocol with the uWSGI server). WSGI is a Python specification. There are several implementations of the WSGI specification and it's intended to be used for more than just application servers/web servers, but there are quite a few WSGI application servers (ie. CherryPy, which also happens to have a production ready WSGI compliant web server, if you weren't confused enough already!).
  3. Comparing uwsgi to WSGI is comparing oranges to apples.

这篇关于WSGI vs uWSGi与Nginx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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