Article View: news.software.nntp
Article #44916Re: Pipelining IHAVE commands with INN
From: Curt Welch
Date: Wed, 08 Mar 2000 00:00
Date: Wed, 08 Mar 2000 00:00
189 lines
9666 bytes
9666 bytes
Brad Knowles <brad@shub-internet.org> wrote:
> In article <20000308115245.420$Lt@newsreader.com>, curt@kcwc.com (Curt
> Welch) wrote:
>
> > The problem with streaming is that once a server says "yes, I want
> > that article", there's no telling how long it might be before the
> > article will actually be sent. And no real requirement that it be
> > sent at all.
>
> True enough, but if that's going into a precommit cache, you can
> just age stuff out of that cache that is more than X seconds old without
> being followed up by receiving the actual article.
Yes, that's what I do. I say that below. But if for example you have
a small number of peers (2 or 3) which offer you one class of articles (say
the large ones), then for some articles in the day, you can almost gurantee
that the other two feeds will offer you the article within that X seconds.
And then you are left trusting that first feed to actually deliver what it
said it had. If it ever fails to do so, you have lost the article for
good.
> > If it says, "238 Yes I want that article" to all duplicate checks, then
> > there's going to be a lot of wasted bandwidth when all the feeds
> > send the same article multiple times.
>
> Yup, that's bad. You don't want to do this.
>
> > If it says "431 Not now, try later", (the right think to do in my mind)
> > it's unclear how many feeding sites will actually honor that correctly
> > (i.e. actually hold it and try it again later).
>
> I'd be willing to bet that INN is the only widely available news
> transit software that handles this correctly. I'd like to see this get
> fixed in Diablo, myself.
Mine does. But it's not widely available.
> > I just stopped in the middle of writting this and checked the Diablo
> > 1.11 (a very old version of Diablo) source. Sure enough, it treats a
> > 431 the same as a reject. Looking at the comments however, it looks
> > like at one time, it used to treat it the same as a "OK, I want" it
> > response.
>
> Looking at the comments of dnewslink.c for 1.24-REL, it appears that
> if the remote end responds with a 431, dnewslink will treat this as a
> 238 and will send the article.
The comments in my version say the same thing. The code howerver doesn't
match the comments. Does your code look like this:
case ERR_RESEND:
if ((s = LocateStream(ptr, STATE_POSTED)) != NULL) {
delMe = 1;
r = T_REJECTED; /* XXX */
if (s->st_DumpRCode < 0)
r = T_REJECTED;
break;
}
/*
* fall through. Consider a resend-later response to a check,
* which is really a completely illegal response, to be the
* same as OK_STRMCHECK and let the 'takethis' statemachine
* deal with it.
*/
The translation of that C code is:
"if the article matching the message-id in the response is in my
list of outstanding articles which I have sent a check for, delete it,
and count it as a reject."
> I'd really like to see dnewslink put this back into a queue for
> retrial at a later time.
Sure, that would be nice. But it would require a bit work I belive to
add that.
> I'd also like to see diablo optionally respond
> with a 431 (based on a per-feed configuration option), for articles that
> are in the precommit cache, but are not yet in the history database.
Yeah, I didn't check that. It seems to just use the "438 NO" answer
for articles in the precommit cache. A very dangerous thing to do if
you actually want "all" the articles.
> > What my server is currently doing is answering "431 try again later" on
> > the dups, but I have a 10 second time limit on that.
i.e. I answer try again for articles in the precommit cache and time out
message-ids from the cache after 10 seconds if they haven't shown up.
> I believe that this will hurt you with your Diablo peers -- you'll
> waste bandwidth.
I'm guessing you read the code wrong. So instead of wasting bandwidth,
I'm risking loosing articles. But either way, it's a problem.
> Although I do not have first-hand experience to back
> up my belief, I suspect that this will also be a problem with
> bCandid/Typhoon, DNews, and probably even NNTPRelay.
It would be interesting to know more about this. What I want to do if I
can find the time is add code to analize more of this on my incomming
feeds. i.e., keep track, by Message-ID of what was offered from who
and when. Then watch for re-transmits, or articles that were never
delivered even though I got the CHECK for them. That would tell me what
these other servers were doing without having to dig into their code.
> > That's why I say IHAVE is better. Understand?
>
> If you could get the majority of news transit servers to properly
> react to a 431, would that make you happy, and finally convince you that
> CHECK really is better than IHAVE?
:). We'll see.
> > You know, what we really should be doing is using IHAVE for all
> > articles over a given size (5K I think would work). With larger
> > articles, you don't need streaming.
>
> But doesn't IHAVE also place a higher load on both the sending and
> receiving ends, making it more difficult to serve a given number of
> peers?
No, not at all.
A IHAVE is the same load as a CHECK + TAKETHIS. It's actually a little
less because you only have to process one command instead of two.
The reason IHAVE's don't work well is not because they put more load
on the server, but because when the server is loaded down, it can't
respond quick enough to the IHAVE's. And that lag causes the overall
thoughput of a single connection to drop to unworkable levels because
the pipe is sitting there unused while we wait for the server to answer
the question.
streaming just allows you to make better use of a single pipe. The client
can be stuffing articles into the pipe while waiting for the server to
respond to that last check etc.
Overall, both sides have to do just as much work either way.
> Also, you're the one who was talking about how streaming IHAVE made
> more and more sense, as you got to larger and larger articles, or you
> got higher and higher latency between peers.
streaming makes more sense for _small_ article and high latency.
Think of an extreme case; A single 100GB article being sent to the moon.
Who cares if it takes 16 seconds for the server to respond to the IHAVE
if you are going to spend the next 3 days sending the article?
But 100 million 1K articles to the moon will take forever with an IHAVE
stream if each response took 16 seconds but transmitting the data only took
.1 seconds. The pipe to the moon would be unused 99% of the time.
> Wouldn't you be creating
> exactly the problem that CHECK is supposed to solve relative to IHAVE,
> since CHECK is designed to be streamed and IHAVE isn't?
I'm not sure what you are saying here. But an IHAVE feed doesn't need
to put any extra load on the server. The only problem is that a busy
server can't service the incomming feed fast enough to make it work
well at 10 articles per second. But if you are only sending large
articles on the IHAVE feed, then the IHAVE's per second drops from 10
to 1. And that shouldn't be a problem for an IHAVE feed to a busy server.
> > A few parallel IHAVE feeds will work fine and is
> > likely to be far more relieable.
>
> For those running news transit software that doesn't open more than
> one connection to the remote end unless there is a backlog, doesn't this
> pose a problem? INN would be fine, but Diablo would be hurt.
Diablo can can do it. You just set up multiple feed definitions. In one
you include all the small files. In the other you include only the large
files (did Diablo ever get the minsize command added? You would need that
to exclude the small files from the large file feed). Then just set up the
nostream option in the dnntpspool.ctl file for the large file feed. If it
has minsize working, you could do it today.
If one IHAVE feed isn't enough for the large articles then Diablo will
open more after it backlogs. I'm guessing it will work fine.
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20000308144707.860$xL@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.mbox.zip!not-for-mailReferences:
<20000307112107.524$na@newsreader.com> <brad-208040.20222807032000@news.skynet.be> <20000307144134.035$KD@newsreader.com> <brad-E330A5.20514107032000@news.skynet.be> <952460805.821101@news.netscum.dk> <20000307170425.247$Qv@newsreader.com> <brad-BF24CC.08211508032000@news.skynet.be> <20000308115245.420$Lt@newsreader.com> <brad-964AFF.19323608032000@news.skynet.be>Show Full Headers
Complete Article Headers
Message-ID: <20000308144707.860$xL@newsreader.com>
Subject: Re: Pipelining IHAVE commands with INN
Date: Wed, 08 Mar 2000 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <20000307112107.524$na@newsreader.com> <brad-208040.20222807032000@news.skynet.be> <20000307144134.035$KD@newsreader.com> <brad-E330A5.20514107032000@news.skynet.be> <952460805.821101@news.netscum.dk> <20000307170425.247$Qv@newsreader.com> <brad-BF24CC.08211508032000@news.skynet.be> <20000308115245.420$Lt@newsreader.com> <brad-964AFF.19323608032000@news.skynet.be>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 594836575
X-User: Curt@NewsReader.Com
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
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Newsgroups: news.software.nntp