Article View: news.software.nntp
Article #19717Master and slave NNTP servers (was: Re: DO NOT INSTALL 1.6 or 1.6b1! (was Re: innd 1.6 ?!?!?!))
From: Jonathan I. Kamens
Date: Sun, 27 Jul 1997 00:00
Date: Sun, 27 Jul 1997 00:00
105 lines
6755 bytes
6755 bytes
In article <gergEDxxIJ.9y6@netcom.com>, gerg@netcom.com (Greg Andrews) writes: |> Now that non-xreplic slaving is almost here, perhaps articles can reach |> the slave through multiple feeds rather than a single one. That's a big |> improvement, but the feeds still have to come from a single master. |> All your incoming feeds are funnelled through that one machine. If it |> dies, your news stops. Even the new slaving stuff doesn't solve the problem completely. Every News reader I've ever worked with (including XRN, the one I maintain) assumes that article numbers in any newsgroup increase monotonically. So if the server says that the articles in a group are numbered x-y, and article y-1 doesn't exist yet because it hasn't been fed to the slave yet, the News reader will assume that article y-1 was canceled and mark it read in the user's .newsrc; as a result, the user will never see it. If you're going to break the model by allowing articles to be inserted into the newsgroup out of numerical order, then you're going to need to make changes to the NNTP protocol to allow clients to handle this adequately. For starters, you need to define a new response code which means "article not available YET" instead of "article not available", and the server needs to know when to return that new response code, and clients know how to deal with it. But that's not even sufficient, because smart clients use the data returned by XHDR or XOVER to figure out what articles are available -- article numbers with no XHDR/XOVER data for particular header fields are (correctly) assumed to be unavailable. So you're going to need to change the format of the responses to XHDR/XOVER to indicate to the client that an article is not yet available but may be in the future, and the client needs to know how to deal with the new response format. All of this is gross and complex; I think it's a rather bad idea. You're much better off redoing the transport layer to guarantee that articles are transmitted in the order they were received, even when a connection drops and has to be restarted later. This is not impossible; it probably isn't even that difficult. The easiest implementation requires only that any single site be fed by only one other site (its "master"), and that it be fed by only one feed at a time from the master, and that before the master initiates a feed, it sorts the outgoing articles by the order in which they were received on the master. This is not rocket science. |> IMO, to be fully scalable, the master/slave design needs to allow for |> multiple master servers. The master servers then need a way to agree |> on the article number for a particular article, so they can propagate |> the right info to their slaves. I think there is just too much complexity here for it to be worth it. I think it's reasonable to have one master server through which all incoming news must flow, and to expect that master server to assign article numbers to all articles. Yes, it's a single point of failure, but frankly, I do not consider News to be a mission-critical application. If it really is, then you can put your News spool on a mirrored disk array to protect against disk crashes, and then set up the master server itself running on any one of several high-availability products to fail over to a secondary server machine if the primary fails. It seems to me that there is one undeniable, nonnegotiable fact here -- there has to be a single entity or mutex or something protecting against duplicate article assignment to the same article number. If you already require that single bottleneck to guarantee that article numbers are assigned properly, then you must as well just make it a single master server doing the assignment. OK, I take that back -- I can think of one clever way to implement unique article assignment which would allow for somewhat better performance. You could implement a server which keeps a current active and history file (or the equivalent) but doesn't actually keep a full News spool. Instead, it would take requests of the form, "Please tell me the correct Xref header for the article with this message ID in these newsgroups." The first time it received such a request, it would assign new article numbers for all the groups and return the Xref header (or equivalent data). It would then store the assigned article numbers, and subsequent requests for the same message ID would return the stored data instead of new article-number assignments. Then, all of your NNTP servers would be modified to talk to this server to assign article numbers. This service wouldn't be bound by hard-disk speeds because it wouldn't have to store entire articles. It also wouldn't have to do control message processing or anything like that. So it would be easier to make it reliable and for it to keep up with the load, and you would be able to have News feeds coming into multiple machines at your site rather than into only one master. However, it would still have the problem I discussed above of articles showing up on servers out of order and therefore causing News readers to get confused. To avoid it, I believe you'd have to guarantee that all incoming feeds and all internal feeds always sent articles in the order in which they were received, as I also discussed above. Another possibility would be to make nnrpd (or its equivalent) smart enough not to allow access to article y until article y-1 had been received by the slave. In the normal case, this would work fine, but it would start to get hairy once you tried to do the right thing with cancel messages (i.e., what if article y-1 is never going to show up because it was canceled on the server before being sent to the slave)? -- Jonathan Kamens | Veritas Software Corporation | jik@cam.ov.com
Technical Details
Message-ID:
<5rg3k9$rrk$1@pad-thai.cam.ov.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:
<5r21gd$24r$1@pluto.sm.dsi.unimi.it> <87g1t57jf9.fsf@acropolis.ibm.net> <slrn5tcp7u.gnu.memory@bigtime.blank.org> <5r9suo$riv@soap.uunet.pipex.com> <gergEDxxIJ.9y6@netcom.com>Show Full Headers
Complete Article Headers
Message-ID: <5rg3k9$rrk$1@pad-thai.cam.ov.com> Subject: Master and slave NNTP servers (was: Re: DO NOT INSTALL 1.6 or 1.6b1! (was Re: innd 1.6 ?!?!?!)) Date: Sun, 27 Jul 1997 00:00:00 +0000 From: jik@kamens.brookline.ma.us (Jonathan I. Kamens) References: <5r21gd$24r$1@pluto.sm.dsi.unimi.it> <87g1t57jf9.fsf@acropolis.ibm.net> <slrn5tcp7u.gnu.memory@bigtime.blank.org> <5r9suo$riv@soap.uunet.pipex.com> <gergEDxxIJ.9y6@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: 259484377 Sender: jik@cam.ov.com (Jonathan I. Kamens) Organization: OpenVision Technologies, Inc. Newsgroups: news.software.nntp