出于某种原因,当使用 wlc 或 lc 调度程序时,ipvsadm 似乎并没有平等地平衡我的真实服务器之间的连接。一台真正的服务器会收到大量请求,而其他服务器收到的连接相对较少。
我的 ldirectord.cf 文件如下所示:
quiescent = yes
autoreload = yes
checktimeout = 10
checkinterval = 10
# *.example.com http
virtual = 192.0.2.111:http
real = 10.10.10.1:http ipip 10
real = 10.10.10.2:http ipip 10
real = 10.10.10.3:http ipip 10
real = 10.10.10.4:http ipip 10
real = 10.10.10.5:http ipip 10
scheduler = lc
protocol = tcp
service = http
checktype = negotiate
request = "/lb"
receive = "Up and running"
virtualhost = "site.com"
fallback = 127.0.0.1:http
Run Code Online (Sandbox Code Playgroud)
我认为可能导致问题的奇怪事情(但我真的不确定)是 ipvsadm …