我想达到6000个/秒的请求,并尝试使用多个proc设置来设置HaProxy,但出现此错误:
cpu-map需要一个进程号,包括“ all”,“ odd”,“ even”或 从1到64的数字,然后是带有数字的CPU范围列表 从0到63
以下是我正在使用的配置。
global
daemon
maxconn 200000
maxsslconn 200000
#stats socket /run/haproxy/admin.sock mode 660 level admin
stats socket 127.0.0.1:14567
nbproc 6
cpu-map auto:1/all 0
cpu-map auto:2/all 1
cpu-map auto:3/all 2
cpu-map auto:4/all 3
cpu-map auto:5/all 4
cpu-map auto:6/all 5
stats bind-process 6
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
tune.ssl.default-dh-param 2048
和
global
daemon
maxconn 200000
maxsslconn 200000
#stats socket /run/haproxy/admin.sock mode 660 level admin
stats socket 127.0.0.1:14567
nbproc 6
cpu-map 1 0
cpu-map 2 1
cpu-map 3 2
cpu-map 4 3
cpu-map 5 4
cpu-map 6 5
stats bind-process 6
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL). This list is from:
# https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
ssl-default-bind-options no-sslv3
tune.ssl.default-dh-param 2048
一切正常。