HAProxy queue length

I have setup HAProxy 1.6.2 on a distributed setup and ran several workloads to test the load balancer. I used HATop and the inbuilt stat web page to check on the number of requests in the queue. Even though I had requests more than the maximum connections, I didn’t see the number for qcur change.

I’m pretty sure, the workload is enough to create a queue, but for some reason I am not able to do so. Any insight/help on this is much appreciated.

Hi,

Do you mean qcur is always 0?

Yes. I want to get some requests queued during a workload test.

Simply reduce drastically the server’s maxconn to a very low value. Even 1 if required.

Yes. I tried that, even then I couldn’t see any change in the QCUR value. Any configurations that need to be done?

This is my config file

global
    daemon
    maxconn 50
    stats socket /tmp/haproxy-stats.socket

defaults
    balance leastconn
    mode http
    maxconn 20
    timeout connect 5s
    timeout http-request 10s
    timeout client 80s
    timeout server 80s
    timeout queue 120s
    retries 3

frontend http_80_frontend
        bind 0.0.0.0:8280
        mode http
 maxconn 2
        acl is_4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org hdr_beg(host) -i 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test$
        use_backend 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org_http_80_backend if is_4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php$


backend 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org_http_80_backend
        mode http
        server 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.php3.domain6179c021-d8b4-4640-a71f-b8d469a23c60 52.77.222.56:80 maxconn 1
        server 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.php3.domaine0e7317f-fa43-4bdd-9597-695f0f9fa110 52.77.239.7:80 maxconn 1

listen stats
    bind :1936
    stats enable
    stats refresh 1s
    stats scope http_80_frontend
    stats scope 4b2a1ee5-a02f-8dab-7f78-c2baba1d739f.alias-php-http.test.org_http_80_backend
    stats uri /
    stats realm Haproxy\ Statistics
    stats auth user:password

Try increasing your frontend’s maxconn to 1000