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)?


5 Answers 5


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.

  • 1
    actually cacheing servers are allowed to cache responses if the entire section was received. If the 'answer' section is fine but the 'additional' section was truncated it would be fine to cache that answer.
    – Alnitak
    Jul 8, 2009 at 14:19

There is no hard limit, but most sites do not run more than 5 or 10 mirrors. Mirroring through DNS round robin is most useful if the sites are geographically separate so that there is redundancy in addition to load sharing.

As the number of mirrors increases, the efficiency of using DNS round robin as load sharing decreases because DNS round robin does not account for different requests requiring more resources. It is better to use front end load balancing to distribute the workload by CPU load and server availability, which will also simplify maintenance since a server can be immediately taken down without a DNS change resulting in clients trying to access a downed server from cached DNS records.


I'm late to this question, but I thought it would be nice to mention the actual limits of what you can do. There is no theoretical limit I know of, but several ISPs won't take anything past 36. Actually, if you include more than that, it not only won't include the extra servers, they'll ignore you entirely. Verizon and Comcast were the two I had problems with, but I'm sure others are affected to.

That said, if you have enough traffic to warrant 36 mirrors, please don't use round-robin DNS.


If you have lots of servers, perhaps the best answer is to do like Akamai and use anycast DNS servers and round robin. In other words, the DNS servers for the zone are distributed around the net, all with the same IP addresses, and routing points clients at the closest servers network-wise. Each server answers in round-robin for a subset of the full list of possible servers.


We do something very similar but we use hardware load-balancers (Cisco ACEs btw), this way the only limit is the subnet size (if that).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .