How to avoid haproxy reload impact on balancing algorithm


#1

####In haproxy node before reload there were two backend A and B
At this stage there are total 20 connection on haproxy
A: 10
B: 10
####Now After reload there are four backend old one : A,B and new one : C & D
At this stage there are total 40 connections on haproxy( 20 new and 20 old) ,
Old BKD A: 10 old + 5 new
Old BKD B: 10 old + 5 new
New BKD C: 5 new
New BKD D: 5 new

Please confirm is it feasible to have scenario like this where haproxy post reload can decided that backend A and B are having enough connection so it should route traffic to C and D only
Old BKD A: 10 old + 0 new
Old BKD B: 10 old + 0 new
New BKD C: 10 new
New BKD D: 10 new
and in above scenario if still it increasing suppose 8 more connections then
Old BKD A: 10 old + 2 new
Old BKD B: 10 old + 2 new
New BKD C: 12 new
New BKD D: 12 new


#2

You want to switch to leastconn then:
http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#4.2-balance