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
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.
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.