Home > Uncategorized > DNS round robbin with failover

DNS round robbin with failover

If you have two A records for the same subdomain in DNS, then the DNS server will alternate which ones it returns, in a round-robbin fashion.

I’ve noticed that NS records in DNS also work on a round robbin feature, NS records also alternate.

This implies that you could create a distributed load balancer with failover using only DNS

Server A ip (Multihomed; 1.1.1.1 and 1.1.100.1)
NS NS1.SERVER.COM
NS NS2.SERVER.COM
A NS1 1.1.1.1
A NS2 1.1.100.1
A www 1.1.1.1

Server B ip (Multihomed; 2.2.2.2 and 2.2.200.2)
NS NS1.SERVER.COM
NS NS2.SERVER.COM
A NS2 2.2.2.2
A NS1 2.2.200.2
A www 2.2.2.2

SERVER.COM delegated with nameservers NS1.SERVER.COM and NS2.SERVER.COM

Now, the A records are not load balanced but the NS records are.

So theoretically, a DNS client, connecting randomly to NS1 or NS2 will be given either 1.1.1.1 or 2.2.2.2 as an IP address, depending
on what nameserver it contacted.

If the DNS on NS1 goes down, then the client will automatically contact NS2. and be given server 2’s IP address. The logic being, that if the DNS
server is down, the webserver probobly is too.

In this case, the A records are not load balanced but the NS records are.

I assume this would not get past ZoneCheck for delegation of some top level domains like .fr, .de  or .no, but it might work for a .com

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: