Scaling the window size

TCP is a full-duplex communication protocol, in which the sender and receiver communicate with each other. Flow control is an end-to-end control method where a host transmits a window size with every acknowledgment, indicating how many bytes it can accept, so the sender does not transmit too much data and overwhelm the host.

Window scale (WS) is an option that allows the window size to be expanded, according to a scaling factor that is obtained from the TCP options exchanged during the three-way handshake. The WS value is used to increase the maximum window size that is allowed. Although optional, this provides information to the server of a more accurate Window Size value.

Let's outline why this is an important option. In the TCP header, the Windows field value is 16-bit, which permits a maximum size of 65,535 bytes. The original RFC for TCP was written in 1981. In the early 1980s, buffer sizes were small, so this value made sense. However, as time passed, it became evident that a larger value would be required, and the Window scale option provided a way to truly represent that value.

When using the Window scale option, the total value can be up to 230. This value as a metric is beneficial when data travels, especially on high-bandwidth WAN links, because a larger WS will improve performance. Intermediary devices can be tuned to accept larger WS; for example, when configuring a Cisco router that supports Window scaling, you can adjust this value up to 1,073,741,823 bytes.

To illustrate this, the following diagram shows a connection where the client advertises a WS of 35,000 bytes. The server begins to send the packets to the client in line with the WS:

Server sending data in line with a smaller WS

While in the connection, if the WS starts to drop, the server will need to throttle back the data so as not to overwhelm the client. However, if the client uses scaling and now advertises a WS of 70,000 bytes, the server can send twice as many packets and utilize the available bandwidth for a more efficient data transfer:

A larger WS allows the server to send more data

Networks can be unstable, and data transfer does not always go in an orderly fashion. This next option provides an overview of how a client can selectively acknowledge the data it has received, so the server only has to retransmit the missing bytes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.112.220