There are no tricks here, really. Apache simply spins up multiple processes and/or threads (depending on how it is configured), and a request is routed to the next available one.
The logic is exclusively in the web server.
سؤال
I learn about being asynchronous when i write code with twisted, but i wonder now how do common web servers process thing asynchronously. As a case of this below: apache get a client request from A, and there maybe some operations block the main process. If apache doesn't do some tricks here, then at the just time another client B send a request , and obviously client B will get no response. Right? I guess, every client request will be processed in a dependent process/thread?
And django is a web framework, the question is whether django has the logic about "not blocking", or the work is handled totally by web servers.
المحلول
There are no tricks here, really. Apache simply spins up multiple processes and/or threads (depending on how it is configured), and a request is routed to the next available one.
The logic is exclusively in the web server.