In our test environment we've identified a strange HAProxy behavior. We're using the standard RHEL 7 provided
haproxy-1.5.18-8.el7.x86_64
RPM.
According to our understanding, the total number of accepted parallel connections is defined as maxconn*nbproc
from global
section of the haproxy.cfg
.
However if we define:
maxconn 5
nbproc 2
we'd expect total number of parallel connections to be 10. But we can't get over maxconn
defined 5.
Why is the nbproc being ignored?
Here is the complete haproxy.cfg:
# Global settings
global
log 127.0.0.1 local2 warning
log 10.229.253.86 local2 warning
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 5
user haproxy
group haproxy
daemon
nbproc 2
# turn on stats unix socket
stats socket /var/lib/haproxy/stats
stats socket /var/run/haproxy.sock mode 600 level admin
stats socket /var/run/haproxy_hamonit.sock uid 2033 gid 2033 mode 600 level admin
stats timeout 2m
defaults
mode tcp
log global
option tcplog
option dontlognull
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 30s
timeout server 30s
timeout http-keep-alive 10s
timeout check 10s
bind-process all
frontend ha01
bind 10.229.253.89:80
mode http
option httplog
option http-server-close
option forwardfor except 127.0.0.0/8
default_backend ha01
backend ha01
balance roundrobin
mode http
option httplog
option http-server-close
option forwardfor except 127.0.0.0/8
server server1 10.230.11.252:4240 check
server server2 10.230.11.252:4242 check
listen stats 10.229.253.89:1936
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
stats auth admin:foo
Asked by Jaroslav Kucera
(10882 rep)
Jun 3, 2019, 11:53 AM
Last activity: Jun 6, 2019, 02:24 PM
Last activity: Jun 6, 2019, 02:24 PM