5 questions to test your understanding
A web server finishes sending an HTTP response and sends a FIN segment to the client. The client is still uploading a large file. What happens next?
A developer notices that a busy web server accumulates thousands of sockets in TIME_WAIT state. They propose reducing the TIME_WAIT duration to 1 second to free ports faster. What are the two risks this creates?
A host that receives a FIN segment can still send data to the FIN-sending host before sending its own FIN, because TCP supports half-close.
When a TCP RST is sent, most buffered data in transit is delivered to the receiving application before the connection is fully torn down.
Explain why the TIME_WAIT state lasts for 2*MSL and what would go wrong if it were eliminated entirely.