apporc
apporc

Reputation: 982

How do web servers like apache do things asynchronously? Does django have relative logic too?

  1. 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?

  2. 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.

Upvotes: 1

Views: 158

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599778

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.

Upvotes: 1

Related Questions