Article View: news.software.nntp
Article #16934Re: bug in INN1.4unoff4 streaming code
From: Jerry Aguirre
Date: Sat, 12 Apr 1997 00:00
Date: Sat, 12 Apr 1997 00:00
105 lines
6234 bytes
6234 bytes
In article <01bc4549$27b69ea0$1f8fe680@spring>, Chris Sedore <cmsedore@maxwell.syr.edu> wrote: >Well, it depends on your perspective of the mode command. It really (in >this case) is a misnomer--it just verifies a capability rather than >actually causing a mode switch. Part of the question is whether streaming In the INN implementation of streaming! I considered implementing it by forking off a separate stream-only server that would handle the connection. Consider the "mode reader" command which under INN sets up a separate process that will not understand "IHAVE". In INN it would be fairly trivial to modify it to support mixed check/ihave commands. Just have IHAVE free the message ID buffer. But it might not be so easy for another implemetation. You have to ask yourself are you working on a robust portable protocol or a hack that will only work with certain implementations. Remember the "be conservative in what you send" part? Sorry if I sound too critical. I just think it is not a very good idea to switch back and forth. >Most of the articles are rejected because they arrived before my >transmission completed. The main disadvantage to takethis is that I cannot How do you know this? Do you also have access to the server to check its logs? >determine if an article was really rejected, or if it was just too slow in >coming. This is important if I'm trying to determine whether to stay in >nocheck mode, or if I am calculating whether or not to close my check >window down. IHAVE seems not to suffer from this problem as badly as >streaming. I'm suspicious that this is a implementation issue somewhere in >INN, though this is little more than a guess since I have not checked the >source code. There is code in innd to lock a message ID while it is being sent. If innd gets an IHAVE for a new article then it will lock that ID for 60 seconds(?). If a second feed does an IHAVE of the same ID it will just hang the second connection waiting for the first to finish transferring the article. If the article is there within the timeout then the second feed will refuse the article because it has already been processed. Thus there is no window for duplicates. (Unless the first sender is very slow and the lock times out.) This is not ideal as a slow feed can stall others who are trying to send the same article. There was some work in progress to have a different IHAVE response code, the "send it later" response. Instead of hanging the second connection it would return a "send it later" response. The second feed would be free to offer other articles. Hopefully it would retry the potential duplicate later and it would then be refused if the original transfer had been sucessful. Under streaming mode there is a fully implemented "send it later" response code. What may be causing increased duplicates is how the check and takethis code interacts with the message ID locking. It was not very clear to me which was the best way to handle that. Should a "check" command lock the ID on the assumption that the message will be sent soon? Remember that there is no assumption with check that the article will soon follow. With a large window and several "takethis" articles in the pipe it could be quite some time before the article was received. And if the other feeds are using IHAVE then they will stall. I think what I did was to not lock the message ID on the check but did lock on the takethis command. Certainly this provides a window for duplicates. I think this is inherent in achieving good thruput. If the "send it later" response were generally implemented then it might make sense to lock the ID on a check command. Yes, it might delay other sending of that article, but not permanently. The lock time might also need to be bumped up a bit to allow for the stream window and the megabyte articles being sent. An interesting enhancement to streaming trasmisson would be to use the number of bytes in the pipe as a limit in addition to the number of check/takethis commands. For small articles one requires a large window to achieve good thruput. But for large articles a window of 2 would provide the same thruput and a greatly reduced chance of duplicates. This might be more effective than trying to separate the cause of article rejections. >I'm about ready to add a new command to NNTPRelay to enable it to return >438 when an article was received on another connection prior to the >termination on the current connection. Maybe "mode advstream", though I >think this should be the default behavior. I ran a fairly big server with at least 10 major incomming feeds plus quite a few slower feeds. Every day I would get the log summary which included the number of duplicates received. Yes, there were some but I never saw enough for me to worry about. Sites sending me groups I didn't want was a bigger problem than duplicates. If your incomming feeds are diverse enough then the order of the articles will be sufficiently different that duplicates will not be a big problem. If your incomming feed sites are so closely coupled that they are in "sync" then they are not providing real redundancy. By this I mean that if you are fed by two sites that are each fed from UUNET then they will offer you the articles in the same order with a greater chance of duplicates. But if UUNET were down then all your feeds would be down. Can you quantify the percentage of duplicates you are seeing?
Technical Details
Message-ID:
<5imno1$5km$1@fes.whowhere.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:
<01bc4481$01766ea0$1f8fe680@spring> <5igq95$2mk$1@fes.whowhere.com> <01bc4549$27b69ea0$1f8fe680@spring>Show Full Headers
Complete Article Headers
Message-ID: <5imno1$5km$1@fes.whowhere.com> Subject: Re: bug in INN1.4unoff4 streaming code Date: Sat, 12 Apr 1997 00:00:00 +0000 From: jerry@rigel.whowhere.com (Jerry Aguirre) References: <01bc4481$01766ea0$1f8fe680@spring> <5igq95$2mk$1@fes.whowhere.com> <01bc4549$27b69ea0$1f8fe680@spring> 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: 232424574 Distribution: inet Organization: WhoWhere?; Mt. View, CA USA Newsgroups: news.software.nntp