Flow Control
TCP Flow Control
TCP Flow control is the mechanism you use to not overflow the hosts.
- Recall: the sliding window at receiver. There is a possibility that that the sender may overrun the receiver's buffer capacity.
- Flow control attempts to ensure that the buffer at the receiver and sender has capacity to process the data.
Advertised Window
TCP uses advertised window, a mechanism for the receiver to let the sender know of its capacity, which grows and shrinks depending on the amount of data, so that the sender knows how much data to send.
The receiver uses an advertised window (RWND) to prevent the sender from overflowing its window.
- receiver indicates the value of RWND in its ACKs
- Sender ensures that the number of bytes in flight <= RWND.
On the receiver side:
- note is buffer size and that is the start of the sliding window.
And on the sender side:

Sliding window and flow control interaction. How do senders and receivers slide their window when using flow control?
- sender: window advances when new data ACK'd
- receiver: window advances as receiving process consumes data
- receiver advertises to the sender where the receiver window currently ends (the "righthand edge") and the sender agrees not to exceed this amount.
Note: UDP does not have flow control, meaning that data can be lost due to buffer overflow.
Advertised window essentially limits rate:
- sender can send no faster than bytes/sec
- receiver only advertises more space when it has successfully consumed old arriving data
- Consider what happens when RWND = 0. The sender cannot send data, so the sender keeps probing with dummy data with one data bytes
In the original TCP design, there was one sole protocol mechanism controlling sender's rate: congestion control.
Linked from Computer Networks, Congestion Control