Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No TIME_WAIT connections, why?

If I have sysctl tw_reuse=0 and tw_recycle=0, and netstat doesn't report any TIME_WAIT connections, that means...? It's local network connections between two servers, A -> B, A has TIME_WAIT connections to B in netstat, but B to A not.

like image 741
ThomK Avatar asked Oct 27 '25 03:10

ThomK


1 Answers

Only the side of the connection that closes the communication can be in TIME_WAIT state, see the relevant UNIX Socket FAQ sequence diagram.

Remember that TCP guarantees all data transmitted will be delivered, if at all possible. When you close a socket, the server goes into a TIME_WAIT state, just to be really really sure that all the data has gone through.

like image 69
Simone Avatar answered Oct 28 '25 18:10

Simone



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!