TCP Flow Control and Windowing
- Networking Fundamentals & OSI Model
- TCP/IP Model
- Network Topologies
- IP Addressing & Subnetting
- Routing Algorithms & Protocols
- Switching Concepts
- Transport Layer Protocols (TCP & UDP)
- Application Layer Protocols
- Network Security & Firewalls
- Wireless Networking & Wi-Fi
- Network Address Translation (NAT)
- DNS Deep Dive
- Congestion Control & Flow Control
- Error Detection & Correction
- Network Devices
- VPN & Tunneling
- Load Balancing & CDN Networking
- Socket Programming
- Network Troubleshooting Tools
- Physical Layer & Transmission Media
- Data Link Layer & MAC Addressing
- Ethernet Protocol
- ARP (Address Resolution Protocol)
- ICMP Protocol
- Unicast, Multicast, Broadcast and Anycast
- Proxy Servers
- Port Numbers Reference
- Network Performance Metrics
- Quality of Service (QoS)
- Software-Defined Networking (SDN)
- HTTP/2 and HTTP/3 Overview
- 5G and Mobile Networks
- IoT Networking Basics
- VoIP Networking Basics
The Problem: A Fast Sender, a Slow Receiver
If a sender transmits data faster than a receiver can process it, the receiver's incoming buffer fills up and starts dropping data - wasting bandwidth on data that has to be resent. Flow control exists so the receiver can tell the sender exactly how much it's ready to accept.
The Receive Window: A Running Capacity Signal
Every TCP acknowledgment includes a "window size" value: the amount of additional data, in bytes, the receiver is currently willing to accept before its buffer fills up.
Receiver's buffer: [ used ][ used ][ free space ]
Window size advertised to sender: however much free space remainsHow the Sender Uses This Information
The sender is only allowed to have that many unacknowledged bytes "in flight" at once. If the receiver's window shrinks (because its buffer is filling up), the sender must slow down and send less at a time - and if the window grows again, the sender can speed back up.
Why It's Called a "Sliding" Window
Sent & Acked | Sent, awaiting Ack | Allowed to send next | Not yet allowed
<------ current window ------>
(the window "slides" forward as acknowledgments arrive)As earlier bytes get acknowledged, the window slides forward, allowing new bytes to be sent - a continuously adjusting balance between how much data is safely "in flight" and how much the receiver can currently handle.
Why This Matters in Practice
Flow control is what prevents a fast server from overwhelming a slow mobile device on a weak connection, automatically throttling the data rate to match what the receiver can actually keep up with - all without either side needing to guess a fixed speed in advance.