Load balance DNS requests

Solution 1:

DNS is Already Load Balanced

DNS (in most cases) is inherently load balanced through one of two mechanisms.

NS Records are Returned in Random Order

Most DNS servers will return NS inquiries in a random order.

Note the two queries below. See how on a subsequent query, the order of the nameservers is changed.

dig @8.8.8.8 NS serverfault.com


;; ANSWER SECTION:
serverfault.com.        300     IN      NS      ns1.serverfault.com.
serverfault.com.        300     IN      NS      ns3.serverfault.com.
serverfault.com.        300     IN      NS      ns4.serverfault.com.
serverfault.com.        300     IN      NS      ns2.serverfault.com.



;; ANSWER SECTION:
serverfault.com.        300     IN      NS      ns2.serverfault.com.
serverfault.com.        300     IN      NS      ns3.serverfault.com.
serverfault.com.        300     IN      NS      ns1.serverfault.com.
serverfault.com.        300     IN      NS      ns4.serverfault.com.

DNS Resolver Behavior

Most DNS resolvers will pick the first nameserver in the list and query it. Some will pick a nameserver at random.

In either case, if your DNS server is randomizing your NS records, then traffic should be balanced.

Load Balanced DNS

In your case, you are pointing NS1/NS2 to the same IPs. There's no need for this. However, if you had.

ns1.domain.com 10.0.0.1
ns1.domain.com 10.0.0.2
ns2.domain.com 10.0.0.3
ns2.domain.com 10.0.0.4

You would not be splitting traffic for NS1 over two servers. This would spread the requests for NS1 over the two servers. Before DNS providers started using anycast approaches, this was and is a popular technique.

(Note there are some changes with IPv6.
See http://blogs.technet.com/b/networking/archive/2009/04/17/dns-round-robin-and-destination-ip-address-selection.aspx)