Congestion control and QUIC
If every sender transmitted as fast as possible, the network would collapse. TCP's congestion control lets millions of flows share links fairly, and QUIC rethinks the transport for the modern web.
Why congestion control
When traffic exceeds a link's capacity, queues grow, delays rise, and packets are dropped; retransmissions then add even more traffic. In 1986, parts of the early internet suffered congestion collapse, with throughput falling by a factor of about a thousand. Van Jacobson's 1988 algorithms added congestion control to TCP, keeping the internet stable since.
The congestion window
In addition to the receiver's window, a TCP sender keeps a congestion window (cwnd), limiting unacknowledged data to the smaller of cwnd and rwnd. Roughly, the sending rate is cwnd / RTT. TCP probes for available capacity by increasing cwnd and backs off when it detects congestion, usually through packet loss.
Slow start
A new connection starts with a small cwnd, commonly 10 segments today, and doubles it every RTT, increasing by one segment per ACK: exponential growth called, ironically, slow start. When cwnd reaches a threshold (ssthresh) or a loss occurs, TCP switches to more cautious growth. Slow start quickly finds roughly how much capacity is available.
AIMD
In congestion avoidance, TCP increases cwnd by about one segment per RTT (additive increase) and, on detecting loss, cuts it, typically by half (multiplicative decrease). This additive-increase, multiplicative-decrease (AIMD) pattern produces a sawtooth and, in theory, leads competing flows towards a fair share of the bottleneck. A timeout signals severe congestion and resets cwnd to a minimum.
Modern congestion control
CUBIC, the default in Linux since 2006 and later in Windows and macOS, grows cwnd as a cubic function of time since the last loss, suiting fast long-distance paths. Google's BBR (2016) instead estimates bottleneck bandwidth and minimum RTT, aiming to send at the bottleneck rate without filling buffers. Explicit Congestion Notification (ECN) lets routers mark packets instead of dropping them.
Fairness
When several TCP flows share a bottleneck, AIMD tends to give each a similar share, but fairness is per connection: an application opening many parallel connections gets more. Flows with shorter RTTs grow faster and can take more capacity. UDP applications lack built-in congestion control, so well-behaved ones implement their own to avoid harming others.
QUIC
QUIC, developed at Google from about 2012 and standardised by the IETF as RFC 9000 in 2021, runs over UDP and provides reliable, multiplexed streams with built-in TLS 1.3 encryption. It combines transport and security handshakes, often needing one RTT for a new connection and zero for a resumed one; avoids head-of-line blocking between streams; and supports connection migration when a phone switches from Wi-Fi to cellular. HTTP/3 runs on QUIC.
Worked example
A connection starts with cwnd = 10 segments and ssthresh = 80. Slow start: after successive RTTs cwnd is 20, 40, then 80, reaching ssthresh. Congestion avoidance then adds one per RTT: 81, 82, ... up to 100, when a loss is detected by triple duplicate ACKs. TCP Reno halves cwnd to 50 and continues additive increase: the sawtooth pattern.
Key takeaways
Congestion causes rising delays, losses, and potential collapse, as in 1986; Van Jacobson's 1988 algorithms added congestion control to TCP. Senders limit data in flight to the smaller of cwnd and rwnd, with rate about cwnd / RTT. Slow start doubles cwnd each RTT from a small start, often 10 segments. Congestion avoidance uses AIMD: add one segment per RTT, halve on loss, reset on timeout. CUBIC and BBR are modern algorithms; ECN marks instead of dropping. Fairness is per flow and favours short RTTs. QUIC (RFC 9000, 2021) runs over UDP with built-in TLS 1.3, multiplexed streams, fast handshakes, and connection migration; HTTP/3 uses it.
Flashcard
Throughput falls as retransmissions flood the network
Check your understanding
A TCP Reno sender has cwnd = 60 segments when three duplicate ACKs arrive. What happens to cwnd?
