我对redis.conf中的tcp-backlog
感到困惑:
# TCP listen() backlog.
#
# In high requests-per-second environments you need an high backlog in order
# to avoid slow clients connections issues. Note that the Linux kernel
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
# in order to get the desired effect.
tcp-backlog 511
“tcp-backlog”是“完成连接队列”的大小(即三次握手已经完成,如这里所描述的),而不是“未完成连接队列”。
如果它表示“完成连接队列”,那么为什么我要提高“tcp_max_syn_backlog”呢?它限制了一个未完成的连接队列的大小。