Agreement between web server and framework

The concept of uWSGI and uwsgi and WSGI and Nginx

1 WSGI is like a bridge, one side is connected to the web server, and the other side is connected to the user's application. It is the agreement between the web server and the framework.

The full name is Web Server Gateway Interface , or Python Web Server Gateway Interface . The server gateway interface is just a protocol.
It is an interface defined for the Python language.

  1. A simple and universal interface between a Web server and a Web application or framework , including two parts: server and application.
  2. The server is responsible for accepting requests from the client, forwarding the request to the application, and returning the response returned by the application to the client.
  3. The application receives the request forwarded by the server, processes the request, and returns the processing result to the server,

2 uwsgi protocol is an own protocol of uWSGI server

  1. Used to define the type of information to be transmitted. The first 4 bytes of each uwsgi packet is the description of the transmission information type,
  2. uwsgi is a wire protocol, not a communication protocol. It is often used here for data communication between the uWSGI server and other network servers.
  3. The agreement with WSGI is two things.

3 uWSGI is a web server that implements both uwsgi and WSGI protocols

  1. The program used to accept client requests and forward responses.
  2. A uWSGI web server, coupled with a web framework such as Django, can realize the functions of the website

4 Nginx distributes the client's request connection and the web server. This is the reverse proxy, or proxy server, implemented by Nginx.

  1. Commonly used high-performance proxy server
  2. The function of HttpUwsgiModule in Nginx is to exchange with uWSGI server
  3. Load balancing. . . . Powerful

Guess you like

Origin blog.csdn.net/weixin_42322206/article/details/100178296