The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process. The actual value is determined by the system, but the upper limit is specified as SOMAXCONN in <sys/socket.h>.
On Solaris, the SOMAXCONN value in <sys/socket.h> is ignored. The particular maximum depends on the implementation of each protocol. For TCP, the default is 128.
Once the queue is full, the system will reject additional connect requests, so the backlog value must be chosen based on the expected load of the server and the amount of processing it must do to accept a connect request and start the service.
Once a server has called listen, the socket used can receive connect requests. We use the accept function to retrieve a connect request and convert that into a connection.
这里没有解释说listen之后,维护了2个队列!
第一句话的意思好像是(我也不确定)这个值是未完成(三次握手?)的连接的数量!
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process. The actual value is determined by the system, but the upper limit is specified as SOMAXCONN in <sys/socket.h>.
On Solaris, the SOMAXCONN value in <sys/socket.h> is ignored. The particular maximum depends on the implementation of each protocol. For TCP, the default is 128.
Once the queue is full, the system will reject additional connect requests, so the backlog value must be chosen based on the expected load of the server and the amount of processing it must do to accept a connect request and start the service.
Once a server has called listen, the socket used can receive connect requests. We use the accept function to retrieve a connect request and convert that into a connection.
这里没有解释说listen之后,维护了2个队列!
第一句话的意思好像是(我也不确定)这个值是未完成(三次握手?)的连接的数量!
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
不知道我的理解正确与否
所以6楼同学说的:backlog指的就是已经完成握手了的队列的大小
好像是不一样!
6楼同学的这段说明是从哪里摘下来的呢?
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established sockets waiting to be accepted, instead of the number of incomplete connection requests.
回14楼
是因为我在unix环境高级编程上看到这句:The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process
这个outstanding好像是‘未解决的,未完成的’意思,所以有疑问!
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process. The actual value is determined by the system, but the upper limit is specified as SOMAXCONN in <sys/socket.h>.
On Solaris, the SOMAXCONN value in <sys/socket.h> is ignored. The particular maximum depends on the implementation of each protocol. For TCP, the default is 128.
Once the queue is full, the system will reject additional connect requests, so the backlog value must be chosen based on the expected load of the server and the amount of processing it must do to accept a connect request and start the service.
Once a server has called listen, the socket used can receive connect requests. We use the accept function to retrieve a connect request and convert that into a connection.
这里没有解释说listen之后,维护了2个队列!
第一句话的意思好像是(我也不确定)这个值是未完成(三次握手?)的连接的数量!
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process. The actual value is determined by the system, but the upper limit is specified as SOMAXCONN in <sys/socket.h>.
On Solaris, the SOMAXCONN value in <sys/socket.h> is ignored. The particular maximum depends on the implementation of each protocol. For TCP, the default is 128.
Once the queue is full, the system will reject additional connect requests, so the backlog value must be chosen based on the expected load of the server and the amount of processing it must do to accept a connect request and start the service.
Once a server has called listen, the socket used can receive connect requests. We use the accept function to retrieve a connect request and convert that into a connection.
这里没有解释说listen之后,维护了2个队列!
第一句话的意思好像是(我也不确定)这个值是未完成(三次握手?)的连接的数量!
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established
sockets waiting to be accepted, instead of the number of incomplete connection requests. The maximum length of the queue for incomplete
sockets can be set using /proc/sys/net/ipv4/tcp_max_syn_backlog. When syncookies are enabled there is no logical maximum length and this setting is ignored.
backlog指的就是已经完成握手了的队列的大小,不accept能建立连接的大小就是它了。
正在握手的队列大小由/proc/sys/net/ipv4/tcp_max_syn_backlog指定。如果启用了syncookies未完成队列的大小是无限的,syncookies 主要是将在收到客户端SYN包后就分配资源改成在完成握手后再分配这些资源,避免同时收到大量的SYN包的需要分配大量资源而受到攻击。
不知道我的理解正确与否
所以6楼同学说的:backlog指的就是已经完成握手了的队列的大小
好像是不一样!
6楼同学的这段说明是从哪里摘下来的呢?
The behavior of the backlog argument on TCP sockets changed with Linux 2.2. Now it specifies the queue length for completely established sockets waiting to be accepted, instead of the number of incomplete connection requests.
回14楼
是因为我在unix环境高级编程上看到这句:The backlog argument provides a hint to the system of the number of outstanding connect requests that it should enqueue on behalf of the process
这个outstanding好像是‘未解决的,未完成的’意思,所以有疑问!