程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

uwsgi WSGI uWSGI Python

編輯:Python

WSGI Divided into two parts : A for “ The server ” or “ gateway ”, The other is “ Applications ” or “ Application framework ”. Dealing with a WSGI When asked , The server will provide environment information and a callback function for the application (Callback Function). When the application finishes processing the request , Through the callback function mentioned above , Send the result back to the server .

So-called WSGI middleware At the same time API Both sides of , So you can WSGI The server and WSGI Mediation between applications : from Web From a server perspective , Middleware plays application , From an application perspective , Middleware acts as a server .“ middleware ” Components can perform the following functions :

  • rewrite environment variable after , According to the goal URL, Route request messages to different application objects .

  • Allow in one process Running multiple applications or application frameworks at the same time .

  • Load balancing And remoting , By means of The Internet Forward request and response messages on .

  • Post process the content , For example, application XSLT Style sheets

WSGI It's an agreement , The server implements WSGI standard ,application Application implementation WSGI standard , In this way, the server and application can be combined


uWSGI It's a Web The server , It has achieved WSGI agreement 、uwsgi、http Such agreement .Nginx in HttpUwsgiModule Its function is to communicate with uWSGI The server exchanges .

it is to be noted that WSGI / uwsgi / uWSGI The distinction between these three concepts .

  • WSGI Is a communication protocol .

  • uwsgi It's a line protocol, not a communication protocol , This is often used in uWSGI Data communication between server and other network servers .

  • and uWSGI Is to implement the uwsgi and WSGI Two kinds of agreement Web The server .

uwsgi The agreement is a uWSGI The server has its own protocol , It is used to define the type of information transmitted (type of information), every last uwsgi packet front 4byte Description of the type of information transmitted , It is associated with WSGI There are two things in comparison .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved