Understanding of a TCP connection's disconnected queue

Source: Internet
Author: User

TCP server in the TCP/IP protocol, the TCP protocol provides a reliable connection service, using three handshake to establish a connection.

First handshake: When a connection is established, the client sends a SYN packet (SYN=J) to the server and enters the Syn_send state, waiting for the server to confirm;

Second handshake: The server receives the SYN packet, it must confirm the customer's SYN (ACK=J+1), and also send itself a SYN packet (syn=k), that is, the Syn+ack packet, when the server enters the SYN_RECV state;

Third handshake: The client receives the server's Syn+ack packet, sends the acknowledgment packet ack (ACK=K+1) to the server, the packet is sent, the client and the server enter the established state, and the handshake is completed three times.

After three handshakes, the client and server begin transmitting data, and in the above process there are some important concepts:

Not connected queue: In the three-time handshake protocol, the server maintains an disconnected queue, which is listed as a SYN package (SYN=J) for each client, which indicates that the server has received a SYN packet and has issued a confirmation to the customer that it is waiting for the customer's confirmation package. The connections identified by these entries are in the SYN_RECV state of the server, and when the server receives the customer's confirmation package, the entry is deleted and the server enters the established state.

Backlog parameter: Represents the maximum number of seats that are not connected to a queue.

Syn-ack the number of times the server sends the Syn-ack package, if not received the customer confirmation package, the server for the first retransmission, waiting for a period of time still not received the customer confirmation package, the second retransmission, if the retransmission times than the system specified maximum retransmission times, the system will remove the connection information from the semi-connection queue. Note that the time to wait for each retransmission is not necessarily the same.

Half-Connection survival time: Refers to the maximum time that the entry of a semi-connected queue survives, that is, the maximum time that the service receives a SYN packet to confirm that the message is invalid, which is the maximum waiting time sum of all retransmission request packets. Sometimes we also call the half-connection survival time timeout time, syn_recv survival time.

Understanding of a TCP connection's disconnected queue

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.