Problem on round robin DNS

Kevin Darcy kcd at daimlerchrysler.com
Tue May 23 22:18:25 UTC 2000


Mark.Andrews at nominum.com wrote:

> > 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 na
> > me,
> > > >>e.g. www.abc.com. It is supposed that it can return the IP in strictly ro
> > und
> > > >>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" algorith
> > m as
> > implemented in 8.2.2-p5 consists of picking the first address at random and t
> > hen
> > 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 versio
> > ns
> > used to implement *real* round-robin because they did the sorting via databas
> > e
> > 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
> >
> >
> >
>         Cyclic is statistically identical to round-robin.
>
>         For load balancing "random" generally gives better results
>         especially when one of the servers has failed.  Cyclic (and
>         round-robin) overload the server after the failed server.
>         Random does not have this problem.

There are pros and cons to both deterministic and non-deterministic ordering
schemes. You list one of the pros for random, and I concur. The con is that
non-deterministic ordering schemes are subject to anomalous "spikes" whereas true
round-robin -- and obviously "fixed" -- is not. I'll note that "cyclic" is kind of
the worst of both worlds in that it is subject to *both* random spiking and the
disadvantage that you cite.


- Kevin





More information about the bind-users mailing list