load-balancing in DNS using two A records

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Dec 20 18:22:22 UTC 2011


On 20.12.11 19:37, Martin T wrote:
>I have seen setups where one domain name has two address records.
>First IP address is in the ISP-A network and the other one is in the
>ISP-B network. In case I execute "host www.<domainname>.com", I always
>get two IP addresses as a reply and they always appear by turns. Am I
>correct, that setup like this provides redundancy as well as
>load-balancing?

Kind of. It's much better to have real load-balancing and vailover by 
multiple links or L3 load balancers. 
> Is there some common method in BIND to give out IP
>addresses by turns? Last but not least, how do application layer(for
>example www, ssh) handle such setup?

bind usually gives all possible addresses for a name in random order. 
You can affect this a bit by using "sortlist" statement, where you can 
tell BIND which address to prefer for which client (and, intermediate 
server may re-sort according to its knowledge)

When one of those ip fails, you can expect half of your connections to 
such host fail, and it's up to the client how to handle this situation. 

Long time ago when we were trying to have multiple web servers for 
redundancy and balancing, we have found that multiple IP's is not a 
good solution (parts of web pages didn't load). We selected L3 
switches then...

Different situation is when you have multiple providers and want to use 
multiple uplinks with different IPs for the same servers. While this 
can work with some NAT playing, it should be better to ger your 
provider-independent address space (if possible) and use separate 
uplinks. That gives you much better line saturation.
-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Nothing is fool-proof to a talented fool. 



More information about the bind-users mailing list