How nginx stream module reuse tcp connections?

allenhe nginx-forum at forum.nginx.org
Mon Mar 8 02:03:48 UTC 2021


Hi,
Thanks for the reply!

So, if there is no error and the downstream/upstream didn't actively close
the connection,  the nginx won't timeout and close the tcp connection with
the downstream or with the upstream at all?  is that correct? and I suppose
the SO_KEEPALIVE option is turn on by default on connection sockets, right?

The "session" refers to  the ngx_stream_session_t in the source code, I want
to know if the tcp load balance (select upstream) is triggered just once per
"session" just like http does with ngx_http_request_t?


Regards,
Allen

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,290851,290909#msg-290909



More information about the nginx mailing list