M
M
myxasa2017-05-24 10:40:46
Nginx
myxasa, 2017-05-24 10:40:46

How does nginx parallelize requests?

If I open two tabs in the same browser with the same script where sleep(10); //secs then the script will work first in one tab, and then in another.
If you open a tab on another computer, the script will complete the work in parallel
How can I explain this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sasha, 2017-05-24
@madmages

https://en.wikipedia.org/wiki/Event_loop

L
Lynn "Coffee Man", 2017-05-24
@Lynn

nginx has nothing to do with it. It's your browser that notices that the second tab goes to the same address as the one already open and doesn't send the request. hopes that the answer received on the first request can be used in the second too. If you add headers that allow caching, then it will be so.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question