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
- The receiver advertises a window, its free buffer space.
- The sender sends no more than that window.
- The receiver's buffer fills.
- It advertises a smaller or zero window.
- 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
- Open the interactive lesson, with a mini quiz.
- Take the Computer Networks quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Computer Networks quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Flow Control?
Where do people use Flow Control?
What is the most common mistake with Flow Control?
What should I learn before this topic?
How can I practice it?
Is Flow Control hard to learn?
How long does it take to learn Flow Control?
Which topics are related to Flow Control?
What should I study after Flow Control?
Related topics
- Three-Way Handshake (Computer Networks)
- Congestion Control (Computer Networks)
- UDP (Computer Networks)
- Sliding Window Protocol (Computer Networks)
- Control Flow Graphs (Languages & Compilers)
- Process Control Block (Operating Systems)
- Version Control Concepts (Software Engineering)