TCP connections
TIME-WAIT
Also called time_wait
The state the side that closes first keeps for a while, so stray packets cannot join a new connection.
After the last ACK, the side that closed first stays in TIME-WAIT for 2 MSL, 60 s on Linux, so a late segment of the old connection is dropped instead of landing in a new one on the same addresses and ports. The cost: a client holds each source port for that minute, and 28,232 ports / 60 s allow about 470 new connections a second to one server address and port.
Sixty seconds on Linux. On busy clients opening many short connections, TIME-WAIT entries can pile up and use
up ephemeral ports.