Article View: news.software.nntp
Article #8834Re: Let's put compression into NNTP -- I am willing to pay
From: Joe Greco
Date: Thu, 27 Jun 1996 00:00
Date: Thu, 27 Jun 1996 00:00
137 lines
7558 bytes
7558 bytes
In news.software.nntp article <4qt7k2$3hf@dfw-ixnews1.ix.netcom.com>, bugs@freebsd.netcom.com (Mark Hittinger) wrote: :I've experimented with this at Netcom and its probably worth tossing what :I learned on the table. I run a large master/slave configuration with :lots of slaves in two distant locations. The feeds to the slaves need to be :consistent and hot so that everything is synchronized correctly. It is :attractive to consider compression in that scenario because xreplic does :not have streaming. : :With a number of streaming feeds you find that response to ihave/sendme :feeds suffer and response to reader connects suffer. Unoff4 and two later :patches partially address this problem, however, adding a decompression :step here makes this worse. : :I played with a "cxreplic" (compressed xreplic) variant for the slaves but :they had a similar problem of poor response to reader connects. I use :two feeds to each slave, and the one cxreplic feed would cause the response to :cxreplic on the other feed to suffer. : :I've heard rumors that people are working on making innd connect over :a different port for feeds - so that nnrpd can be invoked via inetd. This :would solve the reader connect problem. This is easy to do TODAY - my "connectd" program and a small patch to INN to move "119" to some other port (I use "1119") allow you to do it and also bypass inetd. This allows you to kill readers without having to play games as root to twiddle inetd, and will eventually allow limits on per-host number of simultaneous readers, etc. :What we probably need to do to solve the streaming/compression response :problem is break innd up into some pieces. I am thinking I need a wrapper :that binds to port 119 and forks off nnrpd's fast - but also forks off :"feed listeners". Seperate feed listeners would solve the ihave/sendme :response time problem and we could place the decompression step there. :The "feed listeners" prep the incoming feeds for final delivery to an :innd. (I realize we'd have some history file problems here guys - but :thats another deal :-) ). Been there, done that. The problem is that you cannot afford to dbzincore the history in each of fifty different inbound connections, it eats up too much VM. That is of course the trivial and obvious thing to do. More elegant solutions could include: 1) a shared memory segment for the DBZ index file 2) a master "history" daemon responsible for handling all "external" history reads I went on a rant a few months back about how broken the current paradigm is, and the majority reaction was, "You're outta your mind". See below for a brief overview. :This also fixes the window where you can't do anything because of expire :or because of a renumber. Readers can't connect, you can't post, you :can't accept articles from a feed and queue them, etc. Y...eaaaah... ecchy to do it though (more code). :-) :For now I've modified nnrpd to drop rejected posts into in.coming ala UUCP :days, and then rnews can come in later to clean things up. Theoretically :I should still be able to accept articles from a feed into a 'holding area' :on my turf while these renumbers are going on. Does nnrpd do enough syntax and sanity checking to allow this? (I know, RTFS, I'm just too lazy). :I'd like to hear comments from anybody that is thinking about the "feed :listener" idea and find out the achilles heel in it. I know work is :in progress on innfeed (the outgoing side of the house), but the incoming :side of the house probably needs to be addressed as well. It needs it a hell of a lot more than the outgoing side does, IMNSHO. The problems with outgoing are an ARTIFACT caused by the incoming problems. THIS suggestion, a kind of "first generation" variant of the "multi-process INN news system", is exactly what I think you are looking for: ---------------------- ----------------------------------------- | connectd, bound to | | innd - modified, so that a client may | | reader port (119) | | either connect directly to innd, or | | spawns nnrpd's | | innd can fork it off to "nntpd", based| | asynchronously | | on a configuration file | ---------------------- ----------------------------------------- | | | | | | | ---- ---- ---- ---- ---- ----------------- ----------------- nnrp nnrp nnrp nnrp nnrp | spawned nntpd | | spawned nntpd | ---- ---- ---- ---- ---- ----------------- ----------------- | | in reality it would be ------------------------------------ nicer to have a threaded | historyd - responsible for doing | nnrpd capable of handling | message-ID lookups and returning | multiple nnrp sessions in | ACK/NAK's to the nntpd's | one process... ------------------------------------ INND retains "final control" over everything, and in this particular architecture, the ONLY change that NEEDS to be made to INND is to add code to spawn off connections to nntpd (and that can be functionally similar to or identical to the nnrpd spawning code..). A nntpd would spawn historyd if a historyd was not already running (or if the historyd crashed, etc). Each spawned nntpd would open a connection to the historyd to handle history database transactions. Each spawned nntpd opens a local socket to innd, and handles the front line battle of taking to the remote site. The spawned nntpd would need to understand both streaming and non-streaming protocols, xreplic, etc. It would essentially receive an IHAVE or an article, ask historyd whether or not the article was in history, and based on historyd's response it would either reject the article OR pass it along to phase two processing. At this point we have a clean data stream of articles that have probably not been received locally. Phase two processing involves either handing them off to innd via the local socket, probably with streaming protocol and "takethis", or if innd is throttled or dead, pass it into ~news/in.coming like a UUCP batch would be done. This effectively splits up each inbound feed into a largely asynchronous (yet SMALL) process that continues to run no matter what else is going on. Note: I did a proof-of-concept of all of this. It didn't split the history lookups into a separate process, and it didn't do streaming. It worked _VERY_WELL_ until the feed I was using it on decided to switch from single-channel innxmit to 5-channel innfeed and suddenly I was using 100MB of VM resources for that one feed :-) The code I used -- the reference nntp implementation, very mildly hacked. ... Joe ------------------------------------------------------------------------------- Joe Greco - Systems Administrator jgreco@ns.sol.net Solaria Public Access UNIX - Milwaukee, WI 414/546-7968
Technical Details
Message-ID:
<4quaas$afa@brasil.moneng.mei.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:
<4qs8mb$abu@fugue.clari.net> <4qt7k2$3hf@dfw-ixnews1.ix.netcom.com>Show Full Headers
Complete Article Headers
Message-ID: <4quaas$afa@brasil.moneng.mei.com> Subject: Re: Let's put compression into NNTP -- I am willing to pay Date: Thu, 27 Jun 1996 00:00:00 +0000 From: jgreco@brasil.moneng.mei.com (Joe Greco) References: <4qs8mb$abu@fugue.clari.net> <4qt7k2$3hf@dfw-ixnews1.ix.netcom.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-mail X-Deja-AN: 162384340 Distribution: inet Organization: Marquette Electronics, Inc. - Milwaukee, WI. Newsgroups: news.software.nntp