Understanding TCP packet reordering and sequence numbers
This is an easy networking question that tests foundational knowledge of how TCP ensures reliable, in-order delivery despite the best-effort nature of the underlying IP layer. It appears frequently in interviews at firms building trading infrastructure, market data systems, or any application where network reliability matters.
The question probes whether you understand the mechanisms TCP uses to detect when packets arrive out of order, buffer them, and reassemble them correctly. A strong answer explains the role of sequence numbers, acknowledgments, and receive-side buffering in maintaining the illusion of a reliable, ordered byte stream to the application layer.
- TCP sequence number space and wraparound
- Receive buffer and gap detection
- Selective acknowledgment (SACK) vs. cumulative ACKs
- Retransmission and duplicate handling