ComparisonDifficulty: Intermediate2 min

Flow Control vs Congestion Control

Both slow a sender down; one listens to the receiver and the other guesses at the network.

Flow control and congestion control both limit how much data a TCP sender has in flight, and they protect different things. Flow control protects the receiver from being sent more than it can hold, using a number the receiver reports. Congestion control protects the network between them from being overloaded, using an estimate the sender makes for itself.

Flow control and congestion control compared on who sets them and what they protect
PropertyFlow controlCongestion control
ProtectsThe receiver's bufferThe network between the two ends
Limit set byThe receiver, which advertises itThe sender, which estimates it
Carried in the headerYes, the window field in every segmentNo, it exists only inside the sender
Signal it reacts toThe receiving program reading more slowlyLost segments, or in some algorithms rising delay
A typical fault it explainsA slow program at the receiving endA busy or lossy path

The sender obeys whichever limit is smaller. On a fast path to a slow receiver, flow control decides how fast data moves; on a slow or busy path to a fast receiver, congestion control does.

The difference that matters most is who knows the limit. The receiver knows exactly how much room it has and says so, so the flow control window is a fact. Nobody tells the sender how much the network can carry; the congestion window is a guess, raised while things go well and cut when packets go missing.

That difference shows in diagnosis. A small advertised window is visible in a packet capture and points at the receiving program. A small congestion window is visible only as a sender that sends less than the receiver allows, which points at loss somewhere on the path.

The rule for telling them apart. Ask what the limit is protecting. If it is the program at the other end, it is flow control. If it is the network in between, it is congestion control.