load balancing DNS

Nirav Mehta nirav.mehta at baltimore.com
Wed Jul 26 12:49:41 UTC 2000



{{{
A name server looking up a name first needs the list of NS records for the
zone the name belongs to.  The name server might already have the NS
records in its cache or it will retrieve them in the course of answering
this query.  These multiple NS records are the heart of your question: How
does the querying name server decide which NS record to use, which
authoritative name server to ask?  Mr. DNS is glad you asked.

The querying name server calculates and stores a round trip time (RTT) for
each name server for a zone (i.e., for each NS record).  The RTT is the
time--in milliseconds--that it takes that name server to respond to
queries.  When faced with multiple sources of information about a zone in
the form of multiple NS records, the querying name server asks the name
server with the lowest RTT.  In the case of a tie, it picks among them at
random.  After a name server is queried, the querying name server updates
its RTT.}}

When a name server first caches a list of NS records, the RTT for all of
them is zero.  Because it chooses among name servers with equal RTTs at
random, each name server will be queried once.	From then on, it favors the
name server with the lowest RTT.  But what if something happens to that
name server with the lowest RTT?  Fortunately, whenever a querying name
server consults the name server with the lowest RTT, it decrements all the
other name server's RTTs a little bit.	Over time, the other RTTs creep
down and will eventually be queried.  Of course, if they are slow to
respond, their RTT goes back up and they're not consulted again for a
while.}}}

1) Are you referring to the default behavior of a BIND name server upon
receiving multiple NS records for a domain?

2) Is there another way to make the requesting name server query a new
authoritative name server for every query (load balancing) without requiring
any configuration in the requesting name server?

3) How can an authoritative name server ensure that NS records for a
subdomain are not cached? A TTL of zero perhaps?  Is there any requirement
such as minimum BIND version to support zero TTL?

Nirav Mehta
nirav.mehta at baltimore.com




More information about the bind-users mailing list