[ldns-users] ldns_resolver_retry

Jelte Jansen jelte at NLnetLabs.nl
Mon Apr 6 12:28:28 UTC 2009


Henri Asseily wrote:
> Hi, the docs say for ldns_resolver_set_retry: "Set the resolver retry
> interval (in seconds)."
> But I think the code says that it's the number of retries, where retrans
> is the retransmission interval.
> Also, it's not really retries, it's tries (setting to retries to 0 would
> not make a query).
> 

right, i'll fix that, thanks.

> I'm trying to keep to a single nameserver, and do udp > edns0 udp > tcp
> as quickly as necessary, then fail to another nameserver and do that again.
> Would that do the trick:
> 
> ldns_resolver_set_usevc(resolver, FALSE);
> ldns_resolver_set_edns_udp_size(resolver, 4096);
> ldns_resolver_set_fallback(resolver, TRUE);
> ldns_resolver_set_fail(resolver, TRUE);
> ldns_resolver_set_retry(resolver, 1);
> ldns_resolver_set_retrans(resolver, 2);
> 

And then set another nameserver and call the resolve function again? (if
you don't set fail(), ldns will do that for you)

Do remember that caching resolvers can take more than a few seconds for
normal valid queries to be processed and answered, if the answer wasn't
cached already, so a lot of valid replies might be dropped due to these
settings (possibly making the process worse; it will then ask the next
server, which probably doesn't have the answer cached either, so it too
will take a few seconds, timing out yet again, etc).

Jelte

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.nlnetlabs.nl/pipermail/ldns-users/attachments/20090406/1f874cd2/attachment.bin>


More information about the ldns-users mailing list