On Fri, Jul 6, 2012 at 6:06 PM, Catalin Patulea <catal...@google.com> wrote: > Hi, > > I'm interested in what happens when a freshly created evdns with more than > one nameserver encounters a timeout on the first request. > > It seems evdns distinguishes between retransmits and reissues. Retransmits > are triggered by timeouts and always point to the same ns, chosen at > first-transmit time. Reissues, on the other hand, are triggered by bad > responses from nameservers, like NOTIMPL or REFUSED, and do cause a new ns > to be picked in a round-robin fashion. > > The net effect is that on a fresh evdns with 2 nameservers, a single > evdns_resolve is tried only against one nameserver. A second evdns_resolve > is needed to talk to the second ns. > > This is different from glibc (2.7), where a new nameserver appears to be > chosen before each retransmit. I'm not sure whether glibc makes any > distinction between retransmit and reissue. > > Can anyone comment on these semantics? What was the rationale? Is there any > way to get evdns to behave like glibc without significant code changes? (I > don't see anything obvious in evdns_set_option.)
I'm not aware of any deep reason for the current behavior; if somebody wanted to do a patch so that retransmission happened to a different nameserver on timeout too, that would be fine with me. (Unless somebody knows a reason why that would be a terrible idea.) yrs, -- Nick *********************************************************************** To unsubscribe, send an e-mail to majord...@freehaven.net with unsubscribe libevent-users in the body.