Mathieu Sergent wrote on 02/16/2015 12:12 PM:
In each proposition, there is a single master (DNS, LVS...), which
load-balance on two HAProxy.
Me, I try to choose a solution with two master, which will be my two
HAProxy.
Maybe it's impossible and i dream ^^, but this is what I need.


well.. it all starts with a MAC address needing to be resolved from an IP. So if all your requests goes to one IP.. there will be one MAC responding to that ip - and hence one machine. Switches etc. cache which MAC belongs to which port etc. - so trying to fake MAC's and let 2 servers respond to the same MAC will give you issues :)

You could probably do something like setting up a mirror port (or a hub) in between two servers - and then each will get all traffic.. and then they must agree for EACH request- who shall respond to it, and also notice if a response (the other one should have handled) is not handled.. and react..

it's simpler (and hence more performant) to let one machine respond to the ip (controlled by keepalived) - and then just ensure that someone responds to that ip (VRRP does this). - and then let the active part - delay traffic to both.

But that will send all traffic past the active box first.. normally it's the responses that's large and hence that's normally ok.

LVS can do Direct Routing, where it leaves the destination IP alone, so it simply forwards the package to another MAC address - and you can then setup your other haproxy box, to also react to that ip. (I normally setup the ip on loopback interface - but take care that it does not disturb keepalived :)

so in reality someone has to be master.. and in normal "active/active" cluster setups - there is indeed a master - and the cluster then reelects a new master, whenever the master is inresponsive.


--
Regards,
Klavs Klavsen, GSEC - k...@vsen.dk - http://www.vsen.dk - Tlf. 61281200

"Those who do not understand Unix are condemned to reinvent it, poorly."
  --Henry Spencer


Reply via email to