NameServer Selection

Kevin Darcy kcd at daimlerchrysler.com
Tue Sep 28 19:43:00 UTC 2004


Giordano, Bryan wrote:

>I'm trying to understand the algorithm that BIND 9.2.2 uses to figure out
>which Nameserver to use when there are multiple ones returned from a query.
>Situation : 
>I want the address for foo.bar.com.  I query the root DNS servers and find
>out that foo.bar.com is served by ns1.bar.com and ns2.bar.com.  
> 
>1. How does BIND decide which of the two NS servers should be queried?   
>2. What if NS1 goes down?  
>3. I've heard that there are weights assigned based on the number of
>successful queries made to each NS.  Is this so?
>4. If weights are assigned, when are they reset?  
>
BIND keeps track of the RTT (round trip time) averages for each 
nameserver it talks to, and will, generally speaking, prefer servers 
with better averages. Nameservers that don't respond at all are 
considered to have an extremely "bad" RTT, and are penalized accordingly.

Actually, it's a little more complicated than that: the 
nameserver-selection algorithm will, for instance, occasionally retry a 
"bad" nameserver, in case the problem that was causing it to be slow or 
unreachable was only a temporary one...

                                                                         
                                             - Kevin




More information about the bind-users mailing list