Reduce the TIME of too many Linux servers

  
 

The meaning of the TIME_WAIT state:

After closing the SOCKET after the client and the server establish a TCP/IP connection, the port status of the server connection is TIME_WAIT

Is not all active shutdown? Will the socket enter the TIME_WAIT state? Is there any situation that causes the actively closed socket to enter the CLOSED state directly?

The active disconnected party will enter the TIME_WAIT state after sending the last ack. Staying at 2MSL (max segment lifetime) time is essential for TCP/IP, that is, <;Solution"

There are two main reasons why TCP/IP designers have designed this way. Prevent the packet in the last connection, reappear after getting lost, affecting the new connection (after 2MSL, all duplicate packets in the previous connection will disappear). Reliably closing the last ack(fin) sent by the TCP connection on the active shutdown side may be lost. At this time, the passive party will re-finify. If the active party is in the CLOSED state, it will respond to rst instead of ack. So the active party is in the TIME_WAIT state, not CLOSED.

TIME_WAIT does not take up a lot of resources unless it is attacked.

You can enter the following command in the Squid server: #netstat -n

Copyright © Windows knowledge All Rights Reserved