【转】uWSGI笔记——概念篇
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
?
uWSGI是一个Web服务器,它实现了WSGI协议、uwsgi、http等协议。
Nginx中HttpUwsgiModule的作用是与uWSGI服务器进行交换。
?
uwsgi同WSGI一样是一种通信协议,而uWSGI是实现了uwsgi和WSGI两种协议的Web服务器。
uwsgi协议是一个uWSGI服务器自有的协议,它用于定义传输信息的类型(type of information),每一个uwsgi packet前4byte为传输信息类型描述,它与WSGI相比是两样东西。
?
关于uwsgi协议看这里:The uwsgi protocol
?
nginx具备优秀的静态内容处理能力,然后将动态内容转发给uWSGI服务器,这样可以达到很好的客户端响应。
?
?
安装uWSIG
?
pip install uwsgi?
?
?
参考:
http://wsgi.readthedocs.org/en/latest/what.html
http://stackoverflow.com/questions/7739810/wsgi-vs-uwsgi-with-nginx
?