0

Environment: 5 apache instances (balancerX) which distribute the traffic among 3 application servers (serverX).

With mod_balancer configuration by request with same loadfactor, server1 has a huge load while the other ones are having less load, that's why the balancer configuration is applied in the same way to all the servers no matter the real load of them, so always the first connection to balancer1,2,3,4 or 5 is redirected to server1. Since users are assigned the balancers randomly due to a HW balancer (that unfortunately can't be managed), I can't control that the 3 servers are receiving the same amount of connections.

How can I configure it to have the same load on server1,2 and 3?

Schema:

Balancer1   Balancer2   Balancer3   Balancer4   Balancer5
---------   ---------   ---------   ---------   ---------
Server1     Server1     Server1     Server1     Server1
Server2     Server2     Server2     Server2     Server2
Server3     Server3     Server3     Server3     Server3
1

I think this is going to be difficult to achieve perfectly. But I would start by chaning the order of the BalancerMember directives on your 5 apache servers so they are different on each server. Something like:

Balancer1   Balancer2   Balancer3   Balancer4   Balancer5
---------   ---------   ---------   ---------   ---------
Server1     Server2     Server3     Server1     Server2
Server2     Server3     Server1     Server3     Server1
Server3     Server1     Server2     Server2     Server3

You'd need a 6th apache server to make it 100% even.

Please note the following options are Apache v2.4 specific, if you are using v2.2 then only use the first suggestion. I would also try the different load balancing methods to see if that made a difference. The options being lbmethod=bybusyness and lbmethod=bytraffic (make sure you load the relevant modules). If your underlying servers also use Apache you could also try lbmethod=heartbeat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.