Problem on round robin DNS

Kevin Darcy kcd at daimlerchrysler.com
Tue May 23 20:19:58 UTC 2000


Barry Margolin wrote:

> In article <20000523125125.A88713 at lucifer.bart.nl>,
> Jeroen Ruigrok van der Werven  <asmodai at bart.nl> wrote:
> >-On [20000523 06:46], Ching, Calvin KW (Calvin.KW.Ching at cwhkt.com) wrote:
> >>A round robin DNS is configured to return two IP addresses of a domain name,
> >>e.g. www.abc.com. It is supposed that it can return the IP in strictly round
> >>robin fashion like the following:
> >
> >[snip]
> >
> >>However, we found that it is not strictly following this sequence. It
> >>sometimes returns like this:
>
> Are you sure you're the only one querying the server?  If someone else is
> also looking up the same name while you are, they'll interrupt your
> sequence.
>
> >For all I know, its totally random what the server returns as the first
> >address.
>
> By default it's strict round-robin, although in BIND 8 you can configure
> other orders, including random.

Nope. What ISC calls "cyclic" isn't strict round-robin. The "cyclic" algorithm as
implemented in 8.2.2-p5 consists of picking the first address at random and then
observing proper rotational order relative to that (see src/bin/named/ns_resp.c
lines 3107 through 3111). So for an RRset of only two addresses, there is
currently no difference between so-called "cyclic" and "random". Older versions
used to implement *real* round-robin because they did the sorting via database
manipulations, thus keeping state. But now the sorting is done statelessly
on-the-fly, so true round-robin is not possible.

Looks like BIND 9 operates on the same principle. Sigh...


- Kevin




More information about the bind-users mailing list