Hi Maxime, On Fri, May 19, 2017 at 02:28:40PM +0200, Maxime Guillet wrote: > 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.
Well, yes and no. The principle of stick table synchronization is primarily for stickiness and secondarily for active-backup table replication, so the last which pushes a value should overwrite the previous one. In that sense, it's expected that the values you find are around 20. What you're seeing still makes me think it's a bug (since it sounds like we're adding up some values here), but I don't know if it's a side effect of the update or not. Specifically it's possible that this replication would prevent a session from decrementing its reference on close for example. It could also be a stupid copy-paste of the conn_cnt replication, which would then be wrong. At first glance what I'm seeing in the code looks like a simple replication so I can't explain how what you're seeing happens for now :-/ Willy