Quantcast
Channel: Serverphorums.com - HAProxy
Viewing all articles
Browse latest Browse all 5112

HAProxy 1.7.5: conn_cur value problem with peer stick-table (no replies)

$
0
0
Hello all,

I have problem to setup rate limiting with "conn_cur" information and
stick-table shared using peers. The counter always increase without
decrementing until key has expired.
Following my configuration and my tests:
I have 2 haproxy servers, a peers definition containing 2 servers and a
stick-table definition storing conn_cur and conn_rate(10s):

...
peers haproxysrv
peer haproxy1 10.0.0.2:9001
peer haproxy2 10.0.0.3:9001

frontend http
bind 0.0.0.0:80
stick-table type ip size 500k expire 10s store conn_cur,conn_rate(10s)
peers haproxysrv
tcp-request connection track-sc0 src
...


1/ Without the peer configuration and a test with ab binary, I have a
correct conn_cur value on each servers:

$ ab -n 2000 -c 20 http://10.0.0.2/
$ ab -n 2000 -c 20 http://10.0.0.3/

haproxy1# echo "show table http" | socat stdio
/var/run/haproxy/haproxy.stats
# table: http, type: ip, size:512000, used:1
0x7f59d568bb10: key=10.10.10.10 use=0 exp=6359 conn_rate(10000)=211
conn_cur=20
0x7f59d568bb10: key=10.10.10.10 use=20 exp=8116 conn_rate(10000)=190
conn_cur=20
0x7f59d568bb10: key=10.10.10.10 use=20 exp=5682 conn_rate(10000)=212
conn_cur=20

=> ab concurrency option set to 20 => conn_curr=20, the same when trying on
haproxy2

2/ If I launch the same test on both haproxy servers and peers
configuration activated, I can see the conn_cur counter always increasing

$ ab -n 2000 -c 20 http://10.0.0.2/
$ ab -n 2000 -c 20 http://10.0.0.3/

haproxy1# echo "show table http" | socat stdio
/var/run/haproxy/haproxy.stats
# table: http, type: ip, size:512000, used:1
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=7285 conn_rate(10000)=225
conn_cur=47
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=5337 conn_rate(10000)=213
conn_cur=52
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=7952 conn_rate(10000)=178
conn_cur=133
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=9589 conn_rate(10000)=218
conn_cur=259
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=6144 conn_rate(10000)=143
conn_cur=321
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=8115 conn_rate(10000)=190
conn_cur=553
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=7815 conn_rate(10000)=180
conn_cur=676
0x7f59d568b9a0: key=10.10.10.10 use=20 exp=7285 conn_rate(10000)=162
conn_cur=738

=> the conn_cur information becomes more and more higher, while it should
be at maximum 40 (2 x 20 concurrent connection with ab)

I don't believe this behavior is intended, it seems more to be a bug.

Please help me if I did a mistake in my configuration, with my
underdstanding of the conn_cur use or please report this problem as a bug.

My haproxy version is 1.7.5 in Debian (1.7.5-1~bpo8+1)

Thanks for your help.

Maxime

Viewing all articles
Browse latest Browse all 5112

Trending Articles