North American Network Operators Group

Date Prev | Date Next | Date Index | Thread Index | Author Index | Historical

DNS Round Robin

  • From: Roy
  • Date: Sat Apr 23 17:56:34 2005

Something I seem to have found and wonder if anyone else sees this.

One of my users has been using round robin DNS to attempt to load balancing using two IP addresses. A query for www.whatever gives both addresses with a TTL of zero. One address is obviously less than the other numerically. Subsequent queries show alternating results where the first address given switches back and forth. This is the desired result.

Here's where is goes weird. If I do the queries through a caching NS running bind 9.3.0, the order that the addresses is always the same with the lower one first which clearly defeats the purpose of the load balancing.

If I specify "rrset-order {order random;};" as an option in the caching NS then queries come back with random results.

My theory is as follows. The query causes the caching NS to get the two answers but the software stores them in numerical order. The default for bind is to "round-robin" so it choses the first (and thus the lower IP address) as the first value. Since the TTL is zero, the software then discards the data so it never gets to select the second value in its robin robin scheme.

Does this sound plausible? Has anyone else observed this? Is it a bug or a feature?

Roy Engehausen