[lvs-users] how to run load balancer in Active - Active mode but using a single IP address
siim at p6drad-teel.net
Tue Jan 26 12:35:19 GMT 2010
Atul kumar wrote:
> I have configured the LVS/Ldirector in HA setup. 2 servers for Load Balancer
> (LB), 2 for web servers. The heartbeat failover is working fine and the LB
> too is working fine. But I want to run the LB in Active / Active mode. But
> the restriction for me is with the IP address. I have only one public IP
> which I want to use for this Active / Active LB setup.
AFAIK there are 3 ways of doing active-active with LVS:
1. Using multiple IPs and multiple A DNS records
You have multiple public IPs and let DNS round robin (or another
external process - perhaps at the client) balance the initial
connections between the LVSs which in turn balance the connections
between any number of real servers.
This is definitely the most simple approach if you just have a few
VIPs and need to have 2 active-active LBs.
Saru (IIRC) uses a shared MAC so that all load balancers get all the
traffic and then agrees among the load balancers which part of the
traffic each load balancer should actually balance.
See, http://www.ultramonkey.org/papers/active_active/ for more
This code is probably somewhat old and I'm not sure if it's
maintained. Also as all LBs get all the traffic, the amount of traffic
you can handle is limited by the speed of the slowest network
interface on your LBs.
3. Multipath routes from router to LVSs
If you can configure the routers or set up a routing protocol (like
OSPF) between the routers and the load balancers then you can organize
that the routers have a multipath route to the VIP through all of the
Then the routers would handle the first tier of balancing the traffic
between load balancers, which in turn would balance the traffic
between all the real servers.
This requires support from the routers on your network, which you may
or may not have.
You can check the list archives and possibly the howto (for saru at
least) - there have been some discussions regarding this.
More information about the lvs-users