HAProxy community

HAProxy cluster very slow to respond

#1

Afternoon - I have completed a cluster build of 2 x haproxy servers sat on 2 x Ubuntu Servers using Pacemaker / Corosync / Heartbeat. The cluster sits infront of 3 x MS IIS web servers

The resources appear to be configured ok and fail over works well.

I have 2 issues, which I suspect are related. When I call up a web page served by the IIS servers on the local same subnet it will initially take anything up to 9 seconds to load. If I then close the web page and reopen the link it is considerably faster.

The second issue is that if I then try and access the web pages from another subnet, sometimes it will load - slowly, but mostly it times out.

Clearly I have missed something - so in the first instance has anyone else suffered a similar thing?

Below is the base haproxy.cfg:

System information as of Tue Apr 2 15:02:49 UTC 2019

System load: 0.79 Processes: 141
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon

    # 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/
    # An alternative list with additional directives can be obtained from
    #  https://mozilla.github.io/server-side-tls/ssl-config-generator/?server=haproxy

defaults
log global
mode http
option httplog
GNU nano 2.9.3 /etc/haproxy/haproxy.cfg

    option  dontlognull
    timeout connect 5000
    timeout client  50000
    timeout server  50000
    errorfile 400 /etc/haproxy/errors/400.http
    errorfile 403 /etc/haproxy/errors/403.http
    errorfile 408 /etc/haproxy/errors/408.http
    errorfile 500 /etc/haproxy/errors/500.http
    errorfile 502 /etc/haproxy/errors/502.http
    errorfile 503 /etc/haproxy/errors/503.http
    errorfile 504 /etc/haproxy/errors/504.http

listen stats
bind *:1936
mode http
log global

    maxconn 10

    clitimeout      100s
    srvtimeout      100s
    contimeout      100s
    timeout queue   100s

    stats enable
    stats hide-version
    stats refresh 30s
    stats show-node
    stats auth xxxxx
    stats uri  /haproxy?stats

frontend http_front
bind 172.21.1.119:80
mode http
default_backend http_back

backend http_back
balance roundrobin
mode http
server xxxxxxxxx 172.21.1.169:80 check
server xxxxxxxxx 172.21.1.168:80 check

A tcpdump from a host on another subnet - the requests are inbound but dont sem to be responded to:

sysadmin@haproxy1:~$ sudo tcpdump -i eth0 host 192.168.75.54
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:52:40.263804 IP ukbcalt45324.autologic.int.63371 > haproxy.http: Flags [S], seq 2415765373, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:40.266058 IP ukbcalt45324.autologic.int.63372 > haproxy.http: Flags [S], seq 1828596436, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:40.513741 IP ukbcalt45324.autologic.int.63373 > haproxy.http: Flags [S], seq 289814379, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:43.264073 IP ukbcalt45324.autologic.int.63371 > haproxy.http: Flags [S], seq 2415765373, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:43.266619 IP ukbcalt45324.autologic.int.63372 > haproxy.http: Flags [S], seq 1828596436, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:43.513608 IP ukbcalt45324.autologic.int.63373 > haproxy.http: Flags [S], seq 289814379, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:49.264183 IP ukbcalt45324.autologic.int.63371 > haproxy.http: Flags [S], seq 2415765373, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:49.267135 IP ukbcalt45324.autologic.int.63372 > haproxy.http: Flags [S], seq 1828596436, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:52:49.514263 IP ukbcalt45324.autologic.int.63373 > haproxy.http: Flags [S], seq 289814379, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:53:01.397340 IP ukbcalt45324.autologic.int.63384 > haproxy.http: Flags [S], seq 1529278499, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
15:53:04.396828 IP ukbcalt45324.autologic.int.63384 > haproxy.http: Flags [S], seq 1529278499, win 64240, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0

0 Likes

#2

Please provide logs

0 Likes