🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78689

Re: Regarding INN - name to address resolution for peers

#78689
From: D. Stussy
Date: Sat, 09 Feb 2008 05:18
53 lines
4766 bytes
"Russ Allbery" <rra@stanford.edu> wrote in message
news:87tzkj15qe.fsf@windlord.stanford.edu...
> "D. Stussy" <spam@bde-arc.ampr.org> writes:
>
> > If it were my choice, I would have added the extra line to rotate
> > through the addresses upon this failure too.  Although Russ is logical
> > in his reason, that reason cannot be universally proven - while my
> > reason assumes that it can be disproven for some case.  There is no harm
> > in adding the code.  It may take modern processors an additional
> > microsecond to make the function call and return (if that) - but
> > compared to the fact that the feed is then put to sleep for x seconds to
> > try later, it's deminimus and doesn't delay the code.
>
> The reason why I disagree with this change has nothing to do with
> performance.  Rather, the first address returned by getaddrinfo is
> *preferred*; that sorting is often done on the basis of latency and other
> considerations by the resolver.  Hence, I don't want to discard that
> preference information due to an error that is unrelated to the address
> being attempted.

And that's where we differ.  Depending on HOW it's implemented, it could be
related to the address - if the setting is implemented in the address
family's driver/module instead of some AF-independent code.  In this latter
case, it could succeed for some address and fail (potentially forever, if
due to a bug) for some other.  Only by trying different addresses does one
escape this situation to find an[other] address that works (assuming one is
available).

I don't see where trying a second or subsequent address would discard prior
statistics that the program has gathered to express an ordering preference
to the getaddrinfo() call.  Any such preference designation is external to
the call and maintained by innfeed itself, and if there are prior
statistics, then that means that the failure this time is most likely
transitory, not permanent - but if another address is functional, then maybe
it is the better choice. The manual page for getaddrinfo() does not indicate
(nor does RFC 2553) that it orders the addresses returned in any manner
other than by parameters given by the calling routine.  If innfeed is
discarding preference information, it does so by its design - and I don't
see how simply trying an alternate address would cause that.

> If there is a transient resource exhaustion that prevents setting a socket
> to non-blocking that later resolves, I think it's better to return to the
> preferred address instead of one of the later addresses.
>
> It's really a pedantic point since this error condition is exceedingly
> unlikely, but I don't want to rotate addresses when there isn't a reason
> to do so.

Your reason to do so is to find and use one that works, not to keep trying
one that may be a problem forever.  The call shouldn't fail, but if it does,
all we know is that it has, not why it has.

Technical Details
Message-ID: <fojd9e$e8e$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mail
References: <fnqsnb$e8h$1@snarked.org> <fo82tr$14d$1@bongo.bofh.it> <fo8pcb$nkd$1@snarked.org> <87ejbs0ytv.fsf@windlord.stanford.edu> <fo8uhn$o2q$1@snarked.org> <87odavzzlq.fsf@windlord.stanford.edu> <fo93cm$oik$1@snarked.org> <87prvbyhy9.fsf@windlord.stanford.edu> <fo969n$qhl$1@snarked.org> <87fxw71bi4.fsf@windlord.stanford.edu> <foaqf4$jnr$1@snarked.org> <87lk5zrntp.fsf@windlord.stanford.edu> <fob7v7$kma$1@snarked.org> <87hcgmn3wz.fsf@windlord.stanford.edu> <fodcpa$12p$1@snarked.org> <87prv94slm.fsf@windlord.stanford.edu> <fodncj$1s2$1@snarked.org> <878x1x1r5s.fsf@windlord.stanford.edu> <fodtia$36i$1@snarked.org> <fohnj8$7ub$1@news.trigofacile.com> <foiice$bgm$1@snarked.org> <87tzkj15qe.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <fojd9e$e8e$1@snarked.org>
Subject: Re: Regarding INN - name to address resolution for peers
Date: Fri, 8 Feb 2008 21:18:32 -0800
From: "D. Stussy" <spam@bde-arc.ampr.org>
References: <fnqsnb$e8h$1@snarked.org> <fo82tr$14d$1@bongo.bofh.it> <fo8pcb$nkd$1@snarked.org> <87ejbs0ytv.fsf@windlord.stanford.edu> <fo8uhn$o2q$1@snarked.org> <87odavzzlq.fsf@windlord.stanford.edu> <fo93cm$oik$1@snarked.org> <87prvbyhy9.fsf@windlord.stanford.edu> <fo969n$qhl$1@snarked.org> <87fxw71bi4.fsf@windlord.stanford.edu> <foaqf4$jnr$1@snarked.org> <87lk5zrntp.fsf@windlord.stanford.edu> <fob7v7$kma$1@snarked.org> <87hcgmn3wz.fsf@windlord.stanford.edu> <fodcpa$12p$1@snarked.org> <87prv94slm.fsf@windlord.stanford.edu> <fodncj$1s2$1@snarked.org> <878x1x1r5s.fsf@windlord.stanford.edu> <fodtia$36i$1@snarked.org> <fohnj8$7ub$1@news.trigofacile.com> <foiice$bgm$1@snarked.org> <87tzkj15qe.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!news.linkpendium.com!news.linkpendium.com!news.snarked.org!not-for-mail
Newsgroups: news.software.nntp
Lines: 53
Reply-To: "D. Stussy" <replies@newsgroups.kd6lvw.ampr.org>
NNTP-Posting-Host: pool-71-160-235-237.lsanca.dsl-w.verizon.net
X-Trace: snarked.org 1202534510 14606 71.160.235.237 (9 Feb 2008 05:21:50 GMT)
X-Complaints-To: newsmaster@snarked.org
NNTP-Posting-Date: Sat, 9 Feb 2008 05:21:50 +0000 (UTC)
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478