1

Is there any detail on how bind 10 handles resolver timeouts?

The latest info I could find was on Bind 8.2.1+ http://fengnet.com/book/DNS.and.BIND.5th.Edition/dns5-CHP-6-SECT-2.html

The resolver timeout for the next round of queries is based on the number of nameservers configured in resolv.conf. The timeout for the second round of queries is 10 seconds divided by the number of nameservers configured, rounded down. Each successive round's timeout is double the previous timeout. After three sets of retransmissions (a total of four timeouts for every nameserver configured), the resolver gives up trying to query nameservers.

In BIND 8.2.1, the ISC changed the resolver to send only one set of retries, or a total of two queries to each nameserver in resolv.conf. This was intended to reduce the amount of time a user would have to wait for the resolver to return if none of the nameservers was responding.

GeorgeU
  • 496
  • 1
  • 5
  • 17
  • Related: http://serverfault.com/questions/479367/how-long-a-dns-timeout-is-cached-for – cnst Jan 07 '17 at 17:40

1 Answers1

2

It appears to be slightly different than that now in the latest bind10 development snapshot:

bind10-devel-20110819/src/lib/resolve/recursive_query.h:

     80     /// \param query_timeout Timeout value for queries we sent, in ms
     81     /// \param client_timeout Timeout value for when we send back an
     82     ///        error, in ms
     83     /// \param lookup_timeout Timeout value for when we give up, in ms
     84     /// \param retries how many times we try again (0 means just send and
     85     ///     and return if it returs).
     86     RecursiveQuery(DNSService& dns_service,
...
     93                    int query_timeout = 2000,
     94                    int client_timeout = 4000,
     95                    int lookup_timeout = 30000,
     96                    unsigned retries = 3);
polynomial
  • 3,968
  • 13
  • 24
  • thanks for finding this. Do you see anything about the query_timeout - when the query to a server fails, does it query another server - and it tries up to retries value? – GeorgeU Sep 07 '11 at 21:09
  • Yeah, looking at recursive_query.cc it basically keeps resending, waiting query_timeout for a response from each nameserver it queries. After client_timeout it sends back an error to the client who asked for an answer, however it continues to try and resolve the name until lookup_timeout at which point it actually gives up. – polynomial Sep 08 '11 at 00:08
  • and when it iterates through the servers, it moves to the enxt one on failure - is not querying multiple in parallel, correct? thanks for looking at this (not a C++ guy) – GeorgeU Sep 22 '11 at 15:06