1838318 Members
3091 Online
110125 Solutions
New Discussion

Re: NS record

 
Wilfred Chau_1
Respected Contributor

NS record

Hi, I know with /etc/resolv.conf, if the first nameserver is not available/down, there is a 75 sec timeout before it will switch to the second name server. What about NS record within BIND? If a nameserver listed in a domain/zone is unavailable, how long will it take to switch to use the next nameserver?
3 REPLIES 3
U.SivaKumar_2
Honored Contributor

Re: NS record

Hi,

With Multiple NS records , BIND swithover depending upon the RTT ( round trip time) .

Ref:
"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.
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.

So to answer your question, it isn't just the primary master who is consulted--all the authoritative name servers for a zone are consulted by other name servers. A querying name server will eventually favor the authoritative name server which responds the fastest. "

regards,
U.Sivakumar


Innovations are made when conventions are broken
Wilfred Chau_1
Respected Contributor

Re: NS record

Thanks U.Sivakumar

So if the first name server is unavailable, will the querying name server keep trying until the RTT of the second NS is the same or lower than that of the first?

Is there a # of retries per second for the querying name server, should the first NS not available?
U.SivaKumar_2
Honored Contributor

Re: NS record

Hi,
The very first time a name server queries multiple NS records , it randomly fixes RTT.

When one server is unavailable , it's RTT is
considered as infinity So immediately next NS records is queried .

All NS records are queried in the first go and
BIND later locks to lower RTT one.


There is no timeout algorithm with NS records
query from a name server. As the switchover needs to be fast.


regards,
U.SivaKumar
Innovations are made when conventions are broken