Hi Kyle, On Thu, Jan 05, 2012 at 10:06:30AM -0500, Kyle Brandt wrote: > Is it possible to balance different source IPs differently in the same > backend? I know I can redirect to different backends based on the source IP > and then balance there, but this invalidates a lot of the counters (i.e. > SrvConn) since the same server is shared in multiple backends.
No, you can't do this, there is one single LB algorithm in a backend. It can't be changed on the fly because there are tables or trees which are built depending on the algorithm and the list of available servers. I understand what you need, but this could be addressed in the future with shared server limits, a feature which I initially thought would be easy but is not at all. In the mean time, do you think we could work out a solution not involving the source-based balancing, eg using stick tables ? > I tried an acl and then "balance roundrobin if my_acl". This doesn't raise > any syntax errors from haproxy -- but it seems that this is just evaluated > as "balance roundrobin" from my tests. You guessed right. Most often the parser doesn't care about extra words, which is one of the reasons I'd like to rework it. Regards, Willy