[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[Libevent-users] evdns timeout behaviour
- To: libevent-users@xxxxxxxxxxxxx
- Subject: [Libevent-users] evdns timeout behaviour
- From: Catalin Patulea <catalinp@xxxxxxxxxx>
- Date: Fri, 6 Jul 2012 18:06:22 -0400
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: libevent-users-outgoing@xxxxxxxx
- Delivered-to: libevent-users@xxxxxxxx
- Delivery-date: Fri, 06 Jul 2012 18:05:52 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-system-of-record; bh=ovICXMVDF3O3/qeMqhmaIGvKnSlLH4+knZlC2hkA3EI=; b=UQNvHIVxNjFCuj7+QFLOTmEXvVRfPFgSgK5bE+iCli3QXdBgLqXiikVCnDpzfZgU6A eo1uy5fNE7QC56Xu5i187vXjt2zmkTvmgcnbEOkdn0o8YaIbWxGM+BX4Uv4ylgiG7Rne 4MHZLH2REAMAIFemxVvWeFGiZFXBa1K4c3s0iPXO4cgXT+uRgHm1GjTz2+hrl0S4R3mw bdEfRXFBVv3JaJzo4StI5Gnyx8YLbRNJ0BtWdVydZiwKryA+kJiZLftFvlb9vv4fRLBg hvMTqS39tugNQISr3cODye1KzxGzsCY5Yj43i4r2XJG56ligp4X+mCS1gHYyk3u/OyfC aMhw==
- Reply-to: libevent-users@xxxxxxxxxxxxx
- Sender: owner-libevent-users@xxxxxxxxxxxxx
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.)
Catalin