Card 11/ 11
Recap: How TCP Delivers Reliably
Numbered bytes, two windows and a resend make the promise, and waiting for order is its cost.
TCP's promise of a complete, ordered stream rests on a few mechanisms, and each has a cost.
- Sequence numbers count bytes; the acknowledgement names the next byte expected. A SYN and a FIN each use one number.
- The handshake, SYN, SYN-ACK, ACK, agrees both starting numbers and costs one round trip.
- Flow control keeps the sender within the receiver's advertised window.
- Congestion control keeps the sender within its own estimate of the network's capacity, starting small and cutting on loss.
- Three duplicate acknowledgements or a timer trigger a retransmission.
- Closing takes a FIN in each direction, and the side that closes first waits in TIME_WAIT.
- Head-of-line blocking stalls every byte behind a loss, and reuse saves the cost of new connections.
| Mechanism | Guarantees | Costs |
|---|---|---|
| Sequence numbers and acknowledgements | Every byte accounted for | A header field and replies in return |
| Handshake | Both ends agree on numbering | One round trip before data |
| Flow control | The receiver is never overrun | The sender waits on a slow reader |
| Congestion control | The network is not overloaded | A slow start and cuts after each loss |
| Retransmission and ordering | No gaps, no reordering | Everything behind a loss waits |
← → move through sections and cards