Article View: news.software.nntp
Article #38667Re: Musings upon the concept of creating reliable news services with redundant sets of unreliable servers....
From: Curt Welch
Date: Wed, 14 Jul 1999 00:00
Date: Wed, 14 Jul 1999 00:00
149 lines
8314 bytes
8314 bytes
jgreco@ns.sol.net (Joe Greco) wrote: > In news.software.nntp article > <brad-1407991832480001@brad.techos.skynet.be>, brad@shub-internet.org > (Brad Knowles) wrote: > : I've been thinking about this problem quite a bit within the last > :few days. The goal is to avoid Single Points of Failure (SPOFs), and > :what I've had rattling around in the back of my brain is something along > :the lines of RAIS (Redundant Arrays of Inexpensive Servers [0]). I've been thinking about that type of design for years. It's always sounded very appealing to me. Creating a network of cheap servers is easy to do where as trying to create one large server with the same power is far more expensive. It's why I started writing my own news server back in December. I wanted to create an archetecture which would allow the server do be distributed over a redundant array of cheap servers. > You are going in the right direction, you just don't have the right > technology. You want big spool servers. Machines that have lots of > disk and lots of speed but aren't being bogged down by dealing with > the inane stuff clients like to spew at a NNRP daemon. You want > smaller reader servers. Machines with small amounts of disk that > handle the NNRP transactions. Machines that handle managing the > overview data, active files, etc. > > You want to replace NFS with NNxP. This is just what I've done with my new server. I just put it into production on NewsReader.Com two days ago replacing my old inn server. > Look at Diablo. Matt Dillon has done a fantastic job of solving your > problem for you. You set up reader boxes running dreaderd. These > accept a header-only feed from a master server, and create an overview > database from the Xref: data and other headers. This is very low-cost > in terms of bandwidth, etc. Each reader can handle hundreds of users, > and talks to the spool servers via a dozen or so NNTP channels which > are used for "ARTICLE <mess@geid>" type retrievals - very easy and very > fast for the spool server to do. I haven't really looked at what Matt's done so please excuse me for being stupid about this... So each reader box maintains it's own overview database which includes the indexes required to map group/article# into message-ID? How do they know when an article has expired from a spool server? Is there some regular overview expire process which scans everything on a regular basis? Or do the readers just expire their data based on their own logic (which might or might not match the back-end servers), or what? What I did was to have each spool server number the articles sequentially. And then, instead of requesting articles by message-id, you get them by their number. The storage scheem the servers use are set up to make this simple and fast for them to do. The numbers are designed to wrap at a fixed point so there's no problems with the numbers getting to large. It only limits how many articles one server can store. And, articles always expire from the spool servers in order. So this means, that at any time, each spool has a range of current "valid" article numbers. The front-end server (which currently is also the master server) always knows what the current valid range is for all the spool servers - and it uses that to quickly know if any article is still valid, or if it has expired. There's a group/article# to spool/spool-article# database maintained by the master server (though this could be dupped in all the front-end servers like Diablo). So, to check to see if article #12345 in group x.y.z has been exired, all the server has to do is look up the spool, and article number on that spool, and then check that against it's table which is constantly being updated. This allows the front end overview information to stay perfectly in sync with the back end spool servers. This way, you never report "old" overview info which could lead to extra "article no longer available" messages for the users. It also comes into play in the history file managment. Knowing if an article is still valid allows you to create a history file that starts small, and only expand if needed. If it's expensive to figure out if an article is still valid, then you have to use a fixed size history file and force the admikn to make sure it's big enough (like Typhoon), or expire later instead of in real time (like old Diablo at least). > I'm heavily committed to this paradigm at this point. It is conceptually > correct. Your back end spool servers can be anything that is able to > answer "ARTICLE <mess@ageid>"... INN, Typhoon, Diablo. Your front > end reader servers are small and cheap to build. I've even been looking a bit at low-end consumer PCs to use as the spool servers. They are so cheap these days that you can get an entire PC with large IDE drives for less money than a bare SCSI drive of the same size. I'm not sure how well they would actually perform, but it's an interesting idea made possible by this type of architecture. And since ethernet is hot swapable, it's easy to replace these things on the fly (assuming your software is set up to deal with that). > I'm currently shooting to build such a system that will scale into the > millions-of-subscribers range. Yeah, I too am heading towards that. > I've solved a number of scalability > issues, I have the structure in place to do a lot of this, but currently the master server is doing all the reading as well, so it doesn't yet scale well - still needs more code.... > Yes, you still have a SPOF... the master server. And most likely you will have some networking hardware which is also a SPOF. But if the reliability is high enough, this is fine. And the later it is said: > : I'm confused regarding how articles flow from the master server to > :the news spool servers. I think I understood the rest. > > Uh, actually, im my implementation - they _don't_. Articles flow from > the news spool servers (where article numbering is irrelevant and > useless) in _to_ the master server. This is simply to assure that an > article is there on at least one spool server before the master assigns > it a number and passes that on to the reader machines. Interesting twist. In my design, the master gets a full feed, assigns the article numbers (and updates the Xref header in the article), then sends the article to a spool. The spool assigns it's spool-number to the article, and returns that info to the master. Only then (after the master knows for sure the spool correctly saved it) does the master update the overview-like database and make the article "visible" to NNTP clients. My master also keeps two high water mark values for each newsgroup. One is used for assigning new numbers, but the second is only updated to reflect when articles are stored and made visible to the NNTP clients. The NNTP clients only see the high-water mark that correctly matches what is currently available for them to read. What do you do about the Xref: line? When you read an article does the reader box insert it on read? Or do you just not get Xref: lines from your system? -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<19990714184455.693$oy@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:
<brad-1407991832480001@brad.techos.skynet.be> <378cc595$0$374@news.execpc.com>Show Full Headers
Complete Article Headers
Message-ID: <19990714184455.693$oy@newsreader.com>
Subject: Re: Musings upon the concept of creating reliable news services with redundant sets of unreliable servers....
Date: Wed, 14 Jul 1999 00:00:00 +0000
From: curt@kcwc.com (Curt Welch)
References: <brad-1407991832480001@brad.techos.skynet.be> <378cc595$0$374@news.execpc.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: 501108551
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-User: Curt@NewsReader.Com
Organization: NewsReader.Com
X-Url: http://CurtWelch.Com/
Newsgroups: news.software.nntp