Random DNS

Kevin Darcy kcd at daimlerchrysler.com
Mon Jun 5 21:35:47 UTC 2000


Thor Kottelin wrote:

> full-mp3 wrote:
> >
> > Anyone know how to do a random dns like eu.undernet.org plz ?
>
> I haven't tried that name, but it sounds like a round robin setup (several
> A records for the same name).

I tried the name a few times. It is definitely not in "fixed" order since the
answer varied, and since all responses were in the correct rotational order,
it's highly unlikely that it is in "random" order either. Of course, I don't
know whether the server I queried was even running BIND...

> This has little to do with randomness.

For "cyclic" ordering, as found in recent versions of BIND, the first address
*is* chosen at random, although the order of the addresses after that is
deterministic.

"Cyclic" is really the worst ordering to use for load-balancing: not only
does it suffer from the problem endemic to all non-deterministic schemes --
occasional, unpredictable "spiking" -- but it also suffers from the endemic
problem of rotationally-ordered schemes -- when a node is down, the next node
in order gets a disproportionate share of the hits because of client
failover. It's a pity that BIND doesn't offer good old-fashioned *real*
round-robin as an ordering option, which would at least alleviate the
"spiking" problem. It's an ever bigger pity that "cyclic" is the default
ordering scheme...

To answer the original question, if you want to sort your answers so that the
first address in the list is chosen at random, then just create multiple
A records for the name, and BIND will by default hand them out in
"cyclic" order. For the reasons cited above, however, you may want to change
the default to "random" order via the "rrset-order" option.


- Kevin




More information about the bind-users mailing list