我们使用nbproc 10
多进程 HAProxy。服务器采用 Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz。
在配置中:
nbproc 10
cpu-map 1 0
cpu-map 2 1
cpu-map 3 2
cpu-map 4 3
cpu-map 5 4
cpu-map 6 5
cpu-map 7 6
cpu-map 8 7
cpu-map 9 8
cpu-map 10 9
stats socket /var/run/haproxy/socket1 process 1
stats socket /var/run/haproxy/socket2 process 2
stats socket /var/run/haproxy/socket3 process 3
stats socket /var/run/haproxy/socket4 process 4
stats socket /var/run/haproxy/socket5 process 5
stats socket /var/run/haproxy/socket6 process 6
stats socket /var/run/haproxy/socket7 process 7
stats socket /var/run/haproxy/socket8 process 8
stats socket /var/run/haproxy/socket9 process 9
stats socket /var/run/haproxy/socket10 process 10
请帮我解决这个问题!
答案1
尝试将负载平衡算法从 roundrobin 改为 leastconn。