Computer Networks · Module 6 — Transport Layer
Flow control and congestion control
The receiver stores arriving data in a buffer — a chunk of memory — until the application reads it. If data arrives faster than the application reads it, the buffer fills, and anything more is dropped.
Sign in to track your score
Two completely different things can force a sender to slow down. The receiver cannot keep up. Or the network in between cannot keep up. Students merge these two constantly. Interviewers know that.
Why & what
Why flow control exists. The receiver stores arriving data in a buffer — a chunk of memory — until the application reads it. If data arrives faster than the application reads it, the buffer fills, and anything more is dropped.
A fast server can easily overwhelm a slow laptop. So the receiver needs a way to say "slow down, I am full."
What flow control is. Flow control stops the sender from overwhelming the receiver.
The receiver puts a window size in every ACK it sends: the number of bytes of free buffer space it has left. The sender may not have more than that unacknowledged at any moment. This is the sliding window.
If the buffer fills completely, the receiver advertises a window of zero, and the sender pauses.
What congestion control is. Congestion control stops the sender from overwhelming the network.
The receiver may be perfectly fine while a router halfway along the path has a full queue and is dropping packets. No router sends a complaint. So the sender has to guess, using the only signal it has: lost packets mean congestion.
The sender keeps a second window, the congestion window, which it manages itself.
- Slow start begin small, and double the window every round trip. Despite the name, it grows very fast.
- Congestion avoidance — after a threshold, grow by one segment per round trip instead of doubling.
- On loss — cut the window sharply and build up again.
That grow-slowly, cut-sharply pattern is called AIMD (Additive Increase, Multiplicative Decrease). It is what keeps the internet from collapsing when everyone browses at once.
How it works
- Aisha's laptop advertises a receive window in every ACK — say, 64 KB free.
- The server also keeps its own congestion window, starting small and doubling each round trip.
- Before sending, the server takes the smaller of the two windows. That is how much unacknowledged data it may have in flight.
- If a segment is lost, the server treats it as congestion, cuts its congestion window, and slows down.
- As ACKs keep arriving cleanly, the window grows again, and the speed climbs back up.

Common confusion
Students think flow control and congestion control are two names for the same thing.
Actually, they solve different problems and get their information in opposite ways.
- Flow control protects the receiver. The receiver tells the sender its window in every ACK. It is explicit.
- Congestion control protects the network. No router tells the sender anything. The sender infers trouble from packet loss. It is a guess.
One is a stated limit. The other is a guessed limit. The sender always obeys whichever is smaller at that moment.
Interview angle
Asked as: "Difference between flow control and congestion control?" The examiner is specifically checking whether you can separate them.
Model answer:
Flow control prevents a fast sender from overwhelming a slow receiver. The receiver advertises a window size in every acknowledgement, showing how much free buffer space it has, and the sender keeps its unacknowledged data within that. If the buffer fills, it advertises a zero window and the sender pauses. Congestion control prevents the sender from overwhelming the network itself. No router reports congestion, so TCP infers it from packet loss. The sender maintains a congestion window, growing it exponentially during slow start, then linearly during congestion avoidance, and cutting it sharply on loss. That is additive increase, multiplicative decrease. The key difference is scope and signal: flow control is about the receiver and is explicitly advertised, congestion control is about the network in between and is inferred. The sender sends the minimum of the two windows.
- 1.
Flow control protects
- 2.
How does a TCP sender learn that the network is congested?
- 3.
What does AIMD stand for in behaviour terms?
- 4.
A sender's congestion window allows 10 segments and the receiver advertises room for 4. How many does it send?