Java daily side (Part1: computer network) [19 / 11 / 02]

1.1 difference between RTT and RTO

RTT: the time taken from sending a packet to receiving the corresponding ack

RTO: retransmission time interval. After TCP sends a packet, it will start a retransmission timer. RTO is the retransmission time of this timer. Generally speaking, calculate a timer time at the beginning. If you reply to ACK, the retransmission timer will automatically lose effect, that is, you don't need to retransmit, but if you don't reply to ACK, the time of RTO timer will come again and retransmit, Since RTO is the timeout time sent by this packet, RTO needs a good algorithm to make statistics to better predict the timeout time. RTO is not a fixed write dead configuration, but calculated by RTT. RTO can only be calculated with RTT Based on RTO, there is a retransmission mechanism, and then there is a sliding window

1.2 TCP uses sliding window for flow control and out of order rearrangement

Sliding window has two main functions:

1. Ensure TCP reliability

2. Ensure the flow control characteristics of TCP

1.3 calculation process of window data

◇EffectiveWindow = AdvertisedWindow-(LastByteSent-LastByteAcked)

1.4 basic principle of sliding window

1.4. 1 sender of TCP session

It can be divided into four categories at any time

1: Has been sent and received a response from the client

2: Has been sent but has not received a response from the client

3: Not sent, but allowed to be sent to the opposite end

4: Not sent and not allowed to be sent to the opposite end

Where: 2 + 3 is the sending port

1.4. 2. Sliding principle:

1.5 receiver of TCP session

At a certain time, there are four states within the acceptance cache

1+2. Received, receipt sent

3. Not received, but can be received (ready to receive)

4. Not accepted or not accepted

Where 3 is the receiving window

It can be seen from the above that the most basic transmission reliability of TCP comes from the acknowledgement retransmission mechanism, and the reliability of TCP sliding window is also based on the acknowledgement retransmission

The size of the sliding window can be dynamically adjusted according to a certain strategy

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>