TCP Windowing: How a Sender Knows When to Keep Going
Send a little data, wait for confirmation, then send a little more. That approach can leave a connection idle while each reply travels back. TCP windowing allows more data to keep moving during the wait.
Windowing controls how much data a TCP sender can have outstanding at once. TCP, short for Transmission Control Protocol, is a set of rules for transporting data between applications.
A TCP window describes a range of numbered bytes, units used to measure data. TCP sends those bytes in segments; a window can cover data from several segments.
What Does Internet Speed Really Measure?
Two Limits on One Transfer
The receiving computer has a buffer: temporary memory that holds incoming data until an application can use it. It tells the sender how much it is prepared to accept by advertising a receive window.
The sender also maintains a congestion window, a separate limit intended to keep it from putting too much data onto the network. Room at the destination doesn't mean every link along the way has unlimited capacity.
Under ordinary sending rules, the smaller window limits the outstanding data. Anything sent but not yet confirmed as received counts against that allowance. The TCP congestion-control standard defines this distinction.
Consider a small example. Suppose the effective allowance is 6,000 bytes and the sender already has 4,000 bytes outstanding. At that moment, no more than 2,000 additional bytes fit:
6,000 bytes allowed − 4,000 bytes outstanding = 2,000 bytes available.
- Keep work, guest and smart-home gear apart with up to 32 VLANs on one small switch.
- Copy any port's traffic to your laptop with port mirroring and see what is on the wire.
- Set it up from a web page instead of learning a command line.
Other constraints may reduce that amount. The sender can continue as space becomes available; it doesn't have to finish a whole 6,000-byte block and then stop for a reply.
How the Window Slides
An acknowledgment, or ACK, confirms received data. TCP's acknowledgments are cumulative: for example, an ACK naming byte 4,001 confirms that all earlier bytes in the sequence have arrived.
An ACK can cover data from several segments. TCP doesn't require a separate immediate reply for every segment. Data and acknowledgments can keep moving in opposite directions as the transfer progresses.
Acknowledgments and updates to the receiver's advertised capacity move the usable range of bytes. That's the “sliding” in a sliding window. The TCP specification explains the byte numbering and window rules.
TCP can acknowledge data still waiting in its buffer for the application. That acknowledgment confirms arrival, but it doesn't automatically mean more receiving space is free.
A zero window means the receiver has no room for ordinary new data. TCP sends probes to discover when that changes, so a pause needn't mean the connection has failed.
TCP or UDP: Which One Carries Your Data?
Why More Bandwidth May Not Help
Bandwidth is a connection's carrying capacity. Throughput is the rate at which data actually moves. A sender can reach its window limit and wait for acknowledgments even while the link has spare capacity.
The longer the round trip, the longer data can remain outstanding. If the window is too small for the path's capacity and delay, the sender may be unable to keep that capacity busy.
Imagine expanding a connection's capacity while keeping its window and round-trip delay unchanged. If the window was already the limiting factor, the expansion alone won't remove that limit. More possible capacity and more permitted outstanding data are separate changes.
Cisco illustrates this relationship with a controlled lab example in its analysis of TCP throughput and delay.
- Give a desktop, console or TV a steadier connection than Wi-Fi.
- Tell your cables apart at a glance with five different colors.
- Stay ready for faster internet with support for speeds up to 10 Gbps.
Scaling Changes the Allowance
TCP's window scale option allows larger receive windows. Both ends must offer the option when they set up the connection. The agreed scale remains fixed for each direction during that connection, though the advertised receive window can change.
The window-scaling specification addresses paths that can carry substantial amounts of data while acknowledgments are still traveling back. A larger allowance can help keep those paths occupied.
The larger allowance changes how much data can wait for acknowledgment; it doesn't enlarge each segment or add bandwidth. A slow application still needs time to use the arriving data, and the sender still has to respect its congestion limit.
ACK Piggybacking: When a Receipt Rides With the Data

TCP: Putting the Missing Bytes Back in Order

Bandwidth Explained: Why a Fast Plan Can Still Feel Slow

QUOTE:
"Amateurs hack systems, professionals hack people."

