Hi,

We are using HAproxy 1.8.8-1ubuntu0.4 for key based tracking on Ubuntu
18.04. The client is sending api-key in request header (Ex. curl -H
"api-key: 56365443625").
However stick table only showing 3 keys.

The conf is something like that

global
        log /dev/log    local0
        log /dev/log    local1 notice
        chroot /var/lib/haproxy
        stats socket /var/run/haproxy.sock mode 666 level admin expose-fd
listeners


defaults
        log     global
        mode    http

frontend http_front
        bind *:80
        bind *:443 ssl crt /etc/ssl/private/cert1.pem
        redirect scheme https if !{ ssl_fc }
        option forwardfor


        acl triad03 hdr_dom(api-key) -i 0704b6c e494126cd3 7ea36ea8b027c
7ffd0690a40  d700c45
        acl triad06 hdr_dom(api-key) -i 070erferc d660089d 787bh009
89089dd  sd8678s78d6

        #Load Balacing Global
        acl has_auth_header req.fhdr(api-key) -m found

        http-request track-sc0 req.hdr(api-key) table sec_table if triad03
has_auth_header
        http-request track-sc1 req.hdr(api-key) table min_table if triad03
has_auth_header
        capture request header api-key len 64


backend default
         balance roundrobin
        server dev-05 105.202.106.147:80 check
        server dev-06 105.201.69.36:80 check

backend sec_table
         stick-table type string len 64 size 500k expire 5s store
gpc0,gpt0,http_req_rate(1s)

backend min_table
          stick-table type string len 64 size 500k expire 5s store
http_req_rate(60s)


As you can see triad03 matching 5 keys. And requests is coming from all 5
keys, but stick-table only shows 3 keys in it (First, second and 4rth).


watch -n1 'echo "show table sec_table" | socat stdio
unix:/var/run/haproxy.sock'
# table: sec_table, type: string, size:512000, used:3

Why is that? Does this have anything to do with MAX_SESS_STCKTR ? Bur here
I am only using two counter sc0 and sc1.

What am I doing wrong? Please help.


Thank You,
Victor John

Reply via email to