Timeout semantics of Unbound differ radically from Bind 9

Aaron Hopkins lists at die.net
Sun Apr 10 04:08:59 UTC 2016


On Sun, 10 Apr 2016, Dhalgren Tor via Unbound-users wrote:

> While I appreciate the elegance and persistence of Unbound's timeout
> scheme, it breaks Tor and probably breaks other high-volume DNS
> requesters that expect the simple ten-second timeout behavior of
> 'named'.

Under the covers, Tor uses eventdns.  Looking at the eventdns source
(https://github.com/torproject/tor/blob/master/src/ext/eventdns.c), it
appears that by default it times out after 5 seconds, and considers the
nameserver to be down if it gets 3 timeouts in a row.

If it's down, it blocks all new requests (not just for that domain) and
tries to use the nameserver again after 10, 60, 300, 900, and 3600 seconds.

> Unbound would reply to DNS queries with an appropriate SERVFAIL message
> after ten seconds while continuing with the usual persistent effort to
> resolve the record and then cache the result if successful.

Answering with something within 15 seconds does seem important for eventdns.

However, eventdns also only allows 64 requests to be in flight at once.  If
all of those are trying to query domains that are timing out, all other
requests will just wait.  So it would actually be better for eventdns if
unbound would answer SERVFAIL immediately if unbound believes all of the
nameservers for a domain are broken and it won't be retrying soon.

                                     -- Aaron



More information about the Unbound-users mailing list