Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i am building an adserver. In tests i see lots of TIME_WAIT state due to the use of an in memory db redis.

Forums suggested lowering the time wait value from registry.

Any down sides ?

share|improve this question

1 Answer 1

The purpose of the TIME_WAIT state is to facilitate reliable connection tear-down. Reliable connection tear-down in turn protects future connections from previous connection termination segments (FIN segments). So by lowering the "time_wait value" (more accurately the maximum segment lifetime, see below) you risk active TCP connections being terminated inadvertently.

Why is that so? For a reliable connection tear-down, TCP has to exchange three messages analogous to the three-way handsake. The actively closing end stays in the TIME_WAIT for twice the maximum segment lifetime (MSL) after sending the final tear-down acknowledgement (ACK). This is because your final ACK could have been lost in which case the remote end would timeout, resend the FIN segment and watis again for that final ACK from the local end. If you lower the MSL value, it becomes more likely that the socket-pair is reused soon, when there is still a FIN segment from the remote end in the network. Such a segment can subsequently be mistaken for a request to terminate the new connection.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.