TCP Flow Control and Congestion Control
Two limits on sending
Flow control protects the receiver buffer. Congestion control limits the load placed on the network path. The advertised receive window (rwnd) comes from the receiver; the congestion window (cwnd) is maintained by the sender. In a simple steady model without recovery complications, additional send allowance is max(0, min(rwnd, cwnd) − bytes in flight). Application availability, pacing and implementation rules can reduce actual sending further. A zero receive window is not proof of network congestion.
Window scaling and MSS
The TCP header window field has 16 bits. When window scaling is negotiated in the SYN exchange, a later advertised field of 16000 with shift 3 represents 128000 bytes (16000 × 8). The SYN window itself is not scaled. Each direction has its own scale. MSS (maximum segment size) is a TCP payload size limit advertised by a peer; it is not the IP MTU. Actual payload can be smaller because of path MTU, options or application writes.
Worked example: identify the active limit
These fictional snapshots are independent, with all windows in bytes. At A the receiver limits sending; at B the network congestion window is smaller. At C the existing flight fills the effective window. At D the receiver has closed its advertised window; normal new data must wait, although persist probing is a separate mechanism.
Case rwnd cwnd flight additionalA 8000 12000 5000 3000B 16000 6000 4000 2000C 8000 6000 6000 0D 0 6000 0 0Congestion response is algorithm dependent
In the classic RFC 5681 model, slow start increases cwnd rapidly as new data is acknowledged; congestion avoidance grows more cautiously (roughly one MSS per RTT in the classic additive model). The slow-start threshold separates growth regimes. Classic fast retransmit uses three duplicate ACKs to detect probable loss, and fast recovery regulates transmission while recovering. Timeout recovery is more conservative. ECN can signal congestion using IP markings and transport feedback without requiring that a particular packet be dropped. Modern algorithms differ: CUBIC (RFC 9438) uses a time-dependent cubic growth function. Do not infer the sender algorithm from a single packet or assume a fixed OS default.
Diagnose before changing settings
Receiver window exhaustion suggests checking whether the application reads data promptly. Congestion-related evidence calls for checking path load, queue delay and endpoint statistics. Both limits can coexist. Increasing buffers blindly can increase memory use and queueing delay. Use the manual task to compare windows and justify the active limit; no system tuning is required.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
TCP Flow Control and Congestion Control Quiz
Apply transport reasoning to fictional traces and calculations.
rwnd is 9000 bytes, cwnd 6000 and flight 2000. What additional allowance does the simple model give?
A later TCP window field is 10000 and the negotiated shift is 2. What receive window does it represent?
What does a zero advertised receive window directly indicate?
What is ECN intended to communicate?
Why is one packet insufficient to identify a sender’s congestion algorithm?