In Linux, when an app creates a socket in the listen state, it assigns two queues to the socket.
SYN queue: Holds the socket in the SYN_REC state, specified by the kernel parameter tcp_max_syn_backlog.
Accept queue: Stores the socket in the established state, specified by the kernel parameter Somaxconn and the application itself, such as: Redis:tcp-backlog, take the minimum value in Somaxconn and Tcp-backlog.
The socket in the accept queue is consumed by the application.
The SYN queue is not full and the accept queue is full, at this point:
1) When the ACK of the TCP third handshake arrives at the server and the accept queue is full, the kernel loses the ACK packet.
2) due to the TCP retransmission mechanism, the sever end in the timeout period does not receive ack,server will retransmit syn+ack,client end multiplicity ACK packet.
3) After the retry number set by/proc/sys/net/ipv4/tcp_synack_retries has not received the ACK packet, it will no longer retry.
Reference article:
Http://veithen.github.io/2014/01/01/how-tcp-backlog-works-in-linux.html
http://blog.itpub.net/15480802/viewspace-1399303/
This article is from the "AMY" blog, please make sure to keep this source http://amy2015.blog.51cto.com/11407620/1767296
TCP/IP Backlog