🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #67416

Re: IHAVE - Accept from nnpt*.savvis.net

#67416
From: Curt Welch
Date: Sat, 13 Dec 2003 19:43
35 lines
3225 bytes
jeff@litech.org (Jeffrey M. Vinocur) wrote:
> In article <20031213111115.099$IH@newsreader.com>,
> Curt Welch <curt@kcwc.com> wrote:
> >
> >Yeah, most servers can't deal with a wildmat like that because they need
> >to do a forward lookup on the names you configure to to get the IPs.
>
> INN actually has code to do DNS wildcards for reader connections,
> but not for incoming peering connections.  (I don't know how much
> of the reason for this is that INN itself isn't supposed to have
> to worry about long DNS lookup times except when explicitly
> directed to reload by the admin, and how much is that nobody's
> bothered to port the code from nnrpd to innd.)

My server uses a select loop like inn, and because the DNS routines block,
I can't use them in my server to do lookups at connect time.  It's not just
a matter of the DNS being a bit slow, if it's told to try a large list of
non-existant servers, it will hang for many minutes.  Every time you get a
connection from a server with a mis-configured DNS, it would hang the
entire server for minutes.  That can never work.  Do do DNS you have to
either write a non-blocking version of the DNS routines (I looked at them
and decided they were far to large for me to justify that project), or you
fork a separte processes to do the DNS lookup for you and talk to over a
network connection that you can manage in your select loop.  Doing that has
been on my TODO list for a few years now for my server.

nnrpd has no problems with the DNS hanging since it's only blocking the one
connection which caused the hang in the first place.  But you couldn't just
take the nnrpd code and put it in the main inn processes unless you had
something to deal with the blocking (separate threads or a non-blocking
version of the dns lookup routines).

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20031213144359.403$wM@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newshosting.com!news-xfer2.atl.newshosting.com!38.144.126.100.MISMATCH!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <vtjpe3fkl07e93@corp.supernews.com> <20031213111115.099$IH@newsreader.com> <brfnup$3uc$1@puck.litech.org>

Show Full Headers
Complete Article Headers
Message-ID: <20031213144359.403$wM@newsreader.com>
Subject: Re: IHAVE - Accept from nnpt*.savvis.net
Date: Sat, 13 Dec 2003 19:43:59 +0000
From: curt@kcwc.com (Curt Welch)
References: <vtjpe3fkl07e93@corp.supernews.com> <20031213111115.099$IH@newsreader.com> <brfnup$3uc$1@puck.litech.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.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!nntp.giganews.com!newshosting.com!news-xfer2.atl.newshosting.com!38.144.126.100.MISMATCH!feed5.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com zHCe.3Ai3i4Jy2M@fx1wnw8pqjc3U3Ru+Z+fcfRAloUnf=Stb
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,
 ?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
 %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 35