3

Do DNS resolvers (the ones at the ISP or Opend DNS or Google) have specific timeout period of waiting for a server to respond? If so is it in an RFC or is it just custom to each resolver?

I heard a rumor it is 2 seconds, but have not seen anywhere.

ps. not the local machine resolver, like the one windows has. http://technet.microsoft.com/en-us/library/cc961411.aspx

2 Answers 2

4

RFC 1034 ( http://www.faqs.org/rfcs/rfc1034.html ) Section 5

RFC 1035 ( http://www.faqs.org/rfcs/rfc1035.html ) Section 7

RFC 1536 ( http://www.faqs.org/rfcs/rfc1536.html )

It's important to note there are generally two types of resolvers... stub resolvers and iterative resolvers.

Stub is the kind you're likely to have on your personal system. Iterative is the kind that OpenDNS and other ISPs run. They do the "heavy lifting" lookups and are more likely to cache results (though many stub resolvers now also cache).

The resolver timeout/retry/retransmit algorithm is specific to each implementation.

2
  • +1 for the RFC references. It looks like rfc1536 describes the behavior in BIND 4.2-8.2 which made 3 queries to each nameserver. Apparently this was changed in 8.2.1 to just 2 queries per nameserver. Dec 1, 2010 at 16:42
  • The algorithm used by BIND resolvers is quite interesting, how it "locks on" to the best performance nameservers and yet gives the others a chance to shine as well. Dec 1, 2010 at 20:03
1

I'm not sure if it's an RFC or if each resolver is going to have it's own default.

Typically a resolver will query all the nameservers in order with a low timeout at first. Then it will increase the timeout and query again unless it received an error from the DNS system.

But according to DNS and BIND, 5th edition here is how timeouts work in BIND. BIND tends to be the reference implementation of DNS. The following is how bind 8.2.1 and later behave.

If only one nameserver is configured it will query it with a timeout of 5s and if that timesout then a second query will be attempted with a timeout of 10s. Then if that fails a hard failure will be returned.

If more than one nameserver is configured then it will query each of them in sequence with a timeout of 5s. Then it will loop back through the nameservers in order again with a time out of 10s for the first nameserver, 10/2 for the second nameserver, and 10/3 for the third nameserver. If all of these time out then a hard error is returned. With 3 nameservers it could take up to 33s for the lookup to really fail. Of course most of the time the DNS system either gives you an ip address or a lookup failure before this happens. So I would only expect this to happen if your internet connection is down.

3
  • That is the same one I saw, which seems a little high. 5 Seconds? books.google.com/…
    – GeorgeU
    Dec 1, 2010 at 16:36
  • Yeah that's the same book/chapter I got the information from. Dec 1, 2010 at 16:54
  • Is there any way to reduce the default timeouts? Say, 1 second/2 seconds Sep 29, 2022 at 10:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .