TCP persistence timer and retention Timer

Source: Internet
Author: User

TCP persistence timer and retention timer 1. stick to the Timer 2. there are a total of four main timers in the active timer TCP. As mentioned above, the timeout timer is the most complex one in TCP, and the other three are: the 2MSL timer is used to prevent the deadlock between the two sides after the notice window is 0. The timer is used to process the semi-open connection 1. it is simple to stick to the timer principle. When the TCP server receives the client's 0-hop window message, it starts a timer to time, when the timer overflows, check whether the window has increased to the client. If a non-zero window is obtained, send data again, if the window is 0, a new timer is created to prepare for the next query. We can see through observation that the TCP persistence timer uses 1, 2, 4, 8, 16 ...... The ordinary Exponential Backoff sequence such as 64 seconds serves as the overflow time for each time. The TCP Window Protocol of confused window syndrome causes a problem commonly called confused window syndrome. The specific manifestation is that when the client notifies a small non-zero window, the server immediately sends small data to the client and is filled with its buffer. Once used, the network will be filled with small TCP datagram, thus affecting network utilization. This obfuscation of the sender and acceptor. TCP provides some suggestions (or rules ). The recipient does not notice a small window. The common algorithm is that the receiver does not advertise a window larger than the current window (which can be 0), unless the window can increase the size of a packet segment (that is, the MSS to be received) alternatively, you can increase the cache space of the recipient by half, regardless of the actual amount. The sender can avoid confusion window syndrome by sending data only when one of the following conditions is met: (a) a full-length packet segment can be sent; (B) messages can be sent at least half the size of the notification window of the receiver. (c) messages can be sent without receiving ACK (that is, we do not have unconfirmed data) or the Nagle algorithm cannot be used for the connection. Okay. Now let's recall that many TCP regulations are designed to send as much data as possible during a single transmission, such as the routing rule with ACK data packets and the Nagle algorithm, the policy for sending original data packets during re-transmission, and so on. 2. It is easier to keep a timer. Do you still remember that FTP or Http servers have the Sesstion Time mechanism? Because TCP is connection-oriented, there will be a "semi-open connection" that only connects and does not transmit data. The server must detect this connection and release this connection in some cases, this is the role of the active timer. The time limit varies with the server implementation. In addition, if one end crashes and restarts, if it receives the "active" detection from this end, send an RST data packet to help the other end the connection.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.