<div dir="ltr"><div><div><div><div><div>Greetings!<br><br></div>I couldn't find my answer of following questions in the manual or somewhere else. Your help is much appreciated!<br><br></div>1) does nginx manage frontend/nginx and nginx/backend connections separately? In another word, will a nginx/backend connection be bond to a certain frontend/nginx connection for the lifetime of the frontend/nginx connection that is also kept-alive? My guess is it's not, nginx uses M:N model which M is the number of frontend/nginx connections that may or may not be kept-alive and N is the number of nginx/backend kept-alive connections, and M connections share N connections.<br>
<br></div>2) If my guess is correct, how does nginx make sure the request/response pair is not broken/mismatched? Nginx wil NOT send new request to a backend until the response of the last one is received, right?<br><br></div>
3) If I'm still on the right track: because nginx has to wait the response from a backend connection, it cannot reuse it for next request. That's why nginx still needs to open new connections to backend even there are existing connections. But It will only do so when all the existing connection are non-idle (i.e. responses from them haven't been fully received).<br>
<br></div>Thank you!<br></div>