🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #78687

Re: Regarding INN - name to address resolution for peers

#78687
From: Russ Allbery
Date: Fri, 08 Feb 2008 21:46
31 lines
3261 bytes
"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.

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.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <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!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!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>

Show Full Headers
Complete Article Headers
Message-ID: <87tzkj15qe.fsf@windlord.stanford.edu>
Subject: Re: Regarding INN - name to address resolution for peers
Date: Fri, 08 Feb 2008 13:46:33 -0800
From: Russ Allbery <rra@stanford.edu>
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>
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!headwall.stanford.edu!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Lines: 31
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: news.Stanford.EDU 1202507193 17548 171.64.19.147 (8 Feb 2008 21:46:33
 GMT)
X-Complaints-To: news@news.stanford.edu
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)
Cancel-Lock: sha1:KnBWoavCuylyX2wigu7LJrjUpFQ=