← Lessons

quiz vs the machine

Platinum1720

Networking

TCP Window Scaling

Learn how a handshake option lets TCP keep fast long distance links full.

5 min read · advanced · beat Platinum to climb

The Sixteen Bit Window Limit

The TCP header carries a receive window field that is only sixteen bits wide, capping advertised window size at about sixty five kilobytes. On a fast, long distance link this is far too small to keep the pipe full.

The Bandwidth Delay Product Problem

To saturate a link you must keep its bandwidth delay product of data in flight. A link with high bandwidth and high round trip latency needs megabytes outstanding. A sixty five kilobyte window leaves the sender idle, waiting for acknowledgments while the link sits mostly empty.

How Window Scaling Works

The window scale option, exchanged once during the handshake, defines a shift factor applied to every advertised window.

  • Each side sends a scale factor in the SYN segment.
  • The advertised window value is multiplied by two raised to that factor.
  • This lets effective windows grow to gigabytes.

Because the factor is fixed at connection setup, both sides must support the option for it to take effect.

The Payoff

With scaling, a sender can have enough data outstanding to keep a fat, high latency link saturated, turning a starved connection into one that reaches full throughput.

Key idea

Window scaling multiplies the small sixteen bit TCP window by a handshake negotiated factor so enough data stays in flight to fill fast high latency links.

Check yourself

Answer to earn rating on the learn ladder.

1. Why is the base TCP window too small for fast long distance links?

2. When is the window scale factor agreed?