Let\'s assume there is a client that makes a lot of short-living connections to a server.
If the client closes the connection, there will be many ports in TIME
Each connection is identified by a tuple (server IP, server port, client IP, client port). Crucially, the TIME_WAIT
connections (whether they are on the server side or on the client side) each occupy one of these tuples.
With the TIME_WAIT
s on the client side, it's easy to see why you can't make any more connections - you have no more local ports. However, the same issue applies on the server side - once it has 64k connections in TIME_WAIT
state for a single client, it can't accept any more connections from that client, because it has no way to tell the difference between the old connection and the new connection - both connections are identified by the same tuple. The server should just send back RST
s to new connection attempts from that client in this case.