A
A
Art0052020-11-12 15:34:46
Django
Art005, 2020-11-12 15:34:46

How do WSGI servers work?

For the second day I want to figure out how it works and what WSGI does. Right now my head is full of mess.
Here is a source found where more or less a lot of things are covered. Questions will be from there
https://lectureswww.readthedocs.io/5.web.server/ws...
Thanks in advance for your answers.
I will write as I roughly imagine it, correct if there are errors.
If a dynamic file is requested from the web server, it sends the request to the application, where it is received by the wsgi server, sets the environment variables and starts the web application with these environment variables and the start response function.
1) What are the differences between different wsgi servers (superficially) and what main function does it have
2) What is the start-resonse function, what does it do and what does the write object return?
3) Where does the code from the django view work here, which should return the http response body to us
4) What else should I read to understand all these connections between web servers and wsgi servers?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-11-12
@Art005

1. WSGI is a protocol, respectively, the differences in implementation methods and the presence of additional goodies
2, 3. the implementation of this function (start-resonse) is just django and takes over, there is a wsgi.py file in the django project, start with it
4. without concepts

V
Vadim, 2020-11-12
@Viji

4) https://www.youtube.com/watch?v=WqrCnVAkLIo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question