couple questions...

David Lang dlang at digitalinsight.com
Sat Aug 5 23:34:31 BST 2006


On Sat, 5 Aug 2006, Ricardo Kleemann wrote:

>> 
>> You will need to solve a few minor problems, as you'll end up with a
>> system with a pair of VIP addresses for your clients to connect to.
>> That means you'll need to do something like DNS round-robin; in turn
>> that means you'll need to endure the outage if  (for example) one of
>> your servers has to be taken (or goes) offline and stops responding.
>
> So you mean that round-robin DNS won't really work? I've always wondered how 
> resolution of round-robin DNS works... do lookups always swap between the 
> different IPs with each subsequent lookup?

it works reasoably well for load balancing, it has significant problems with HA.

> So for example, if I have round-robin DNS jumping between servers A/B, and A 
> goes down... if a client resolves the hostname to A, it will fail to connect, 
> then if it retries, will the hostname next time resolve to B?

all you can say is that everyone doing the lookup will get both addresses. 
statisticaly this will mean that about half the slients will go to each server. 
however some clients will never retry the DNS lookup so will never switch over 
to the second server. you need to test exactly how this works with your 
particular software

>> Alternatively you'll need something to manage both the LVS and HA
>> aspects of the system, like keepalived or heartbeat.
>
> Are these really necessary? If all I'm using it for is for the load 
> balancing, and LVS is capable of detecting a server going down, it will 
> simply direct connections to the alternate server. What would I use 
> keepalived or heartbeat for?

if each box is running LVS then you need heartbeat to failover the LVS (and it's 
IP address) from the box that failed to the box that's still running.

>> You will also need to solve the potential problem of both servers being
>> configured to handle both VIPs as both LVS director and realserver -
>> this one can tie you in knots very easily. I usually manage it with
>> fwmarks on the input interface (the one facing the clients).
>
> If I understand correctly, the realservers are the DB servers. The LVS 
> director is on the app server, which directs connections to one of the 2 DB 
> servers. Why would there have to be any sharing of VIPs? I don't think either 
> of the servers would be both director and realserver, would they?

you described that you wanted active-active with both boxes being active at the 
same time and each running LVS with round-robin DNS balancing between them. 
that's what we are responding to. if you are thinking of a single server running 
LVS that then connects to two other DB servers you would not use round-robin DNS 
(but you still need to make your LVS server redundant)

David Lang

Search lvs-users Archives
Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort

More information about the lvs-users mailing list