round robin wierdness (how well does round robin load balance?)

Kevin Darcy kcd at daimlerchrysler.com
Thu Dec 6 00:17:54 UTC 2001


Barry Margolin wrote:

> In article <9um645$c5g at pub3.rc.vix.com>, Avery <daemon2k at yahoo.com> wrote:
> >My question is this:
> >
> >Is round robin effective for short duration bursts of traffic?  If it
> >is is there any DNS related issue that could be affecting/causing what
> >I'm seeing?
>
> Round robin is effective if there will be many clients distributed all
> around the Internet.  Individual client machines, browsers, or proxies may
> do some local caching of responses, so you're likely to see some skewing if
> all the traffic is coming from a single traffic generator machine.

BIND has not supported *true* round-robin for a number of years. The default
ordering scheme nowadays is something called "cyclic", where the (all-important)
first record in the response is chosen at random, and then all of the other
records are presented in round-robin order *relative* to that first record. So, in
addition to the skewing that Barry mentioned, you may also get skewing simply
because your PRNG happened to generate a string of identical numbers, much as it
is possible to get several "heads" in a row when flipping coins.

Note that for an RRset of only 2 records, "cyclic" ordering is functionally
identical to "random" ordering. For RRsets of greater than 2 records,
"cyclic" ordering is actually *worse* than "random" ordering because of a
phenomenon I call "failover skewing", i.e. when one node fails, whichever node
happens to be next in the rotation will get as much as twice its normal volume,
depending on whether the clients are smart enough to perform address failover.

Unfortunately, the only way to get *quality* RRset ordering is to store per-RRset
response state, and this consumes significant amounts of memory. Most people don't
care enough about ordering that they would be willing to risk a performance
bottleneck on their DNS servers.


- Kevin





More information about the bind-users mailing list