On Tue, Jun 2, 2015 at 6:36 PM, N P <nvn...@yahoo.ca> wrote:
> Hi,
>
> I want to send two transactions with different weights to different servers.
> I have done this using frontend, backend, and ACL as can be seen from the
> below config.
> The other requirement is to also use leastconn balancing.
>
> The problem is that in this setting, leastconn applies within each backend
> and the selected server is not essentially the GLOBAL least loaded server in
> total (maybe due to a bug in the system). Note that, same servers are used
> in the backends with different weights.
> From what I understood from the code, the problem seems to be that each
> backend tracks the number of connection of its own servers separately.
> Therefore, although a server is overloaded in one backend, the other backend
> might think that it is completely free.
>
>
> My requirement is to forward requests to different servers with different
> weights, but select the least loaded server in total. I checked Haproxy code
> to see what I need to change, but could not figure it out. I am not very
> familiar with HAProxy code and structure. I wonder if there is an easy
> solution to do this, or if some one can help me with some directions to do
> this; either to config HAProxydifferently or to change its code to address
> my requirement.
> Any help is appreciated.
>
>
> My setting is:
>
> backend BK1
>    balance leastconn
>    server web1 000.000.000.000:00 weight W1
>    server web2 111.111.111.111:11 weight W2
>
> backend BK2
>   balance leastconn
>   server web1 000.000.000.000:00 weight W3
>   server web2 111.111.111.111:11 weight W4
>
>
> frontend http
>   bind *:80
>   mode http
>   acl myACL url_beg /MYURL
>   use_backend BK1 if myACL
>   default_backend BK2


Hi,

Your health checks should be able to report an overloaded server, or
better, using the agent-check for this purpose.

Baptiste

Reply via email to