How Does Nginx forward connections?

sammy_raul sammyraul1 at gmail.com
Sun Mar 13 13:59:39 UTC 2016


Hello All,

I am thinking, how does Nginx forward TCP connections. Does it create a
single TCP connection to backend server (considering single backend) or as
many as clients connected to the Nginx proxy. What I mean to say is, as
Nginx Proxy receives a client connection, it must call Accept and create a
new Socket connection and call Connect on it every time, it receives a new
client connection.
Or does it create a single Socket to the backend at the start of Nginx and
basically sends the data over this single connection. If it is a single
connection, how does Nginx knows which client to reply when it receives
reply from the backend server.

How does it work?

Can anyone please provide some details?

Thanks,
Raul



--
View this message in context: http://nginx.2469901.n2.nabble.com/How-Does-Nginx-forward-connections-tp7596539.html
Sent from the nginx mailing list archive at Nabble.com.



More information about the nginx mailing list