TCP Congestion Control
Problem
The receiver may be perfectly capable of handling 1 Gbit/s.
But the network between you might only have 20 Mbit/s available.
Sending faster creates queues and packet loss.
How does TCP avoid overwhelming the network itself?
Solution — Congestion Control
The sender maintains a congestion window (cwnd), limiting how much data can be sent but still unacknowledged.
In loss-based algorithms, acknowledgments allow this window to grow; signs of packet loss cause it to shrink.
The sender obeys the smaller of the receive window and congestion window: if rwnd is 32 KB and cwnd is 10 KB, at most 10 KB can remain unacknowledged.
Core idea: flow control protects the receiver; congestion control protects the network.