DNS Round-Robin IP Address Limit Explained

domain-name-systemload balancingtraffic

I'm currently running a site whose trafic is distributed among 7 mirror servers right now (using DNS round robin). But soon more mirrors will be necessary given the high amount of traffic which is permanently growing.

Is there any practical o recommended limit for the number of IP addresses associated to a given domain name when using round robin DNS ??

Also, what kind of solution would you recommend when the number of mirrors is high (e.g. more than 10 or 20 mirrors)?

Thanks.

Best Answer

One thing to bear in mind is that by default, DNS lookups use UDP. If the response is larger than can fit in a single datagram, as many as will fit are returned and the TC (truncated) bit is set in the header.

The requester can choose to work with what was returned, or re-attempt the query using TCP.

Caching DNS servers are not supposed to cache truncated responses, as they don't know how complete the set of records returned is (the response doesn't say "I am giving you 12 of 28 records").

So the maximum number of records is a factor of how much you can stick in a UDP datagram. Remember that the response needs to include the authority section, which will vary in size based on the SOA record for the zone.

If you are using CNAME records, that will also increase the size of the response, as you get back the CNAME and the A record of the thing pointed to.

Your best bet is to play around with various numbers of A records using dig or "host -v" to see when the query crosses the max size of a UDP response.