Questions: TCP Connection Termination and FIN/RST Handling

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

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?

AThe connection is immediately fully terminated — the server initiated close, so both directions shut down
BThe client can continue uploading; the FIN only closes the server-to-client direction, and the connection enters a half-closed state
CThe client's upload is aborted and any undelivered data is discarded
DThe client sends RST to signal that it is not ready to close
Question 2 Multiple Choice

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?

ASlower connection establishment and increased memory usage per socket
BLost final ACK cannot be retransmitted (the other side retransmits its FIN to a machine no longer waiting), and ghost segments from old connections can corrupt new connections reusing the same four-tuple
CIncreased CPU overhead for connection teardown and reduced throughput on the same socket
DRST storms and cascading connection failures on downstream servers
Question 3 True / False

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.

TTrue
FFalse
Question 4 True / False

When a TCP RST is sent, most buffered data in transit is delivered to the receiving application before the connection is fully torn down.

TTrue
FFalse
Question 5 Short Answer

Explain why the TIME_WAIT state lasts for 2*MSL and what would go wrong if it were eliminated entirely.

Think about your answer, then reveal below.