`
heipark
  • 浏览: 2077852 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

uWSGI笔记——概念篇

阅读更多

What is WSGI ?

WSGI is the Web Server Gateway Interface. It is a specification for web servers and application servers to communicate with web applications (though it can also be used for more than that)

 

WSGI是一种Web服务器网关接口。它是一个Web服务器(如nginx)与应用服务器(如uWSGI服务器)通信的一种规范。

 

关于WSGI协议看这里:WSGI

 

what is uWSGI ?

uWSGI是一个Web服务器,它实现了WSGI协议、uwsgi、http等协议。

Nginx中HttpUwsgiModule的作用是与uWSGI服务器进行交换。

 

WSGI vs uwsgi(小写) vs uWSGI ?

uwsgi同WSGI一样是一种通信协议,而uWSGI是实现了uwsgi和WSGI两种协议的Web服务器。

uwsgi协议是一个uWSGI服务器自有的协议,它用于定义传输信息的类型(type of information),每一个uwsgi packet前4byte为传输信息类型描述,它与WSGI相比是两样东西。

 

关于uwsgi协议看这里:The uwsgi protocol

 

有了uWSGI为什么还需要nginx?

nginx具备优秀的静态内容处理能力,然后将动态内容转发给uWSGI服务器,这样可以达到很好的客户端响应。

 

why uWSGI ?

how to use uWSGI ?

 

安装uWSIG

 

pip install uwsgi
 

 

 

参考:

http://wsgi.readthedocs.org/en/latest/what.html

http://stackoverflow.com/questions/7739810/wsgi-vs-uwsgi-with-nginx

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics