We all know that TCP is a reliable, connection-oriented transport layer protocol. We always hope that TCP can transmit data as quickly as possible. If there is such a situation that the sender sends data very quickly and the receiver has exhausted its resources and has no time to receive it, then the excess data will be discarded, which violates the principle of TCP reliability.
Therefore, it is necessary to introduce a method of flow control: to prevent the sender from sending too fast, so that the receiver can receive the data smoothly without causing congestion of the network link. Ideas Following this idea: let the sender not send too fast. Then let the receiver control the sender's data size, and notify the sender how much space is left to receive data each time it responds. Of course, the actual interaction is not that simple, it just provides a way of thinking. Using this idea, the sliding window method was born. Sliding Window The sliding window is like a window that tells the sender the size of the data that can be sent. It can also be said that the window marks the size of the receiver's buffer. The window size also indicates how much data can be sent at a time, and this window can slide, hence the name sliding window. How to tell the sender the window size? How to inform the sender of the window size? Do we need to resend a packet of data to tell the other party? This is obviously unreasonable. We can use the confirmation response packet cleverly. Having a confirmation response packet is not enough. What if it is the first interaction? Therefore, we need to inform the other party during the three-way handshake. (rwnd means receiving window) In the original confirmation response strategy, each time data is sent, an Ack response is required. The next data segment will be sent only after receiving the Ack. What if the sender does not receive the Ack response? This method is too inefficient. With the use of a sliding window, data can be sent multiple times as long as it does not exceed the other party's window size. This greatly improves efficiency. Sliding Window Details
Examples A sends data to B. When the connection is established, B tells A: "My receiving window rwnd = 400 (bytes). Note: The capital ACK above the arrow in the figure represents the confirmation bit ACK in the header, and the lowercase ack represents the value of the confirmation field. The above process is as follows:
|
<<: Summarize various issues between wireless AP and AC of WiFi system
[[416919]] Image source: https://pixabay.com/imag...
LRU Introduction LRU is the abbreviation of Least...
Although 5G licenses have been issued, the commer...
The latest survey report from network security ve...
According to the China Central Radio and Televisi...
Industry data: Gartner conducted a survey and int...
Integrated wiring is a modular and highly flexibl...
Edge computing is changing the way millions of de...
In the past two days, a marketing campaign that o...
2019 was the first year of 5G commercialization i...
[51CTO.com original article] The most tense and e...
Google Fiber will launch symmetrical 5Gbps and 8G...
On March 31, Samsung Electronics announced that i...
UFOVPS is a Chinese hosting company founded in 20...