LearnViz CompSci
Home / Learn / Computer Networks / Flow Control

Intermediate Topic 22 of 50 Computer Networks

Flow Control

Preventing a fast sender from overwhelming a receiver.

How it works

Flow control prevents a fast sender from overwhelming a slow receiver. In TCP, the receiver advertises a window size, the amount of data it can currently buffer, in every acknowledgement, and the sender must not have more unacknowledged data in flight than that window. When the receiver's buffer fills, the window shrinks to zero and the sender pauses until a window update arrives.

Step-by-step walkthrough

  1. The receiver advertises a window, its free buffer space.
  2. The sender sends no more than that window.
  3. The receiver's buffer fills.
  4. It advertises a smaller or zero window.
  5. The sender pauses until space is freed and a window update arrives.

Where it is used

Streaming downloads, file transfers and database replication rely on flow control to match speeds between machines. Applications can also use back-pressure in their own protocols and queues.

Common pitfall

Flow control is about the receiver, whereas congestion control is about the network; they are often confused. Small buffers limit throughput on high-latency links, because the window must cover the bandwidth-delay product. Zero-window stalls and silly window syndrome waste capacity. Tune socket buffers and use window scaling.

Where it fits in the course

Flow Control is topic 22 of 50 in Computer Networks, rated Intermediate. It follows Three-Way Handshake. The next topic is Congestion Control.

Practice and explore

How to study this topic

  1. Read the explanation above and restate the definition in your own words.
  2. Open the interactive lesson and answer its mini quiz.
  3. Read the common pitfall, then write a short example that avoids it.
  4. Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.

Frequently asked questions

What is Flow Control?
Preventing a fast sender from overwhelming a receiver. It belongs to Computer Networks and is an intermediate-level topic.
Where do people use Flow Control?
Streaming downloads, file transfers and database replication rely on flow control to match speeds between machines.
What is the most common mistake with Flow Control?
Flow control is about the receiver, whereas congestion control is about the network; they are often confused.
What should I learn before this topic?
Start with Three-Way Handshake, the topic just before it in Computer Networks.
How can I practice it?
Answer the mini quiz in the interactive lesson, then take the Computer Networks quiz.
Is Flow Control hard to learn?
It is an Intermediate topic. Be comfortable with the Beginner topics in this area first, then read the common pitfall carefully, since it is where most mistakes happen.
How long does it take to learn Flow Control?
Most learners can read the explanation and finish the interactive lesson in under an hour. Fluency comes from applying the idea, so plan a few short practice sessions with the quiz.
Which topics are related to Flow Control?
Three-Way Handshake, Congestion Control, UDP are closely connected. The full list is in the related topics section of this page.
What should I study after Flow Control?
Continue with Congestion Control, the next topic in Computer Networks.

Related topics