Article View: news.software.nntp
Article #40465controlling newsfeed hogginess with dummynet (was Re: delayed feeds)
From: T. William Wells
Date: Mon, 04 Oct 1999 00:00
Date: Mon, 04 Oct 1999 00:00
55 lines
3666 bytes
3666 bytes
I found something that doesn't quite do what you want but is very handy, nonetheless. On my FreeBSD 3.2 machine, there is a facility called 'dummynet'. (I don't know if there are similar facilities elsewhere.) Basically, what it is is a pretend network inside the computer. This 'network' can be given various characteristics, useful for various simulation and debugging purposes. One interesting one for newsfeeds is that you can limit the bandwidth flowing through the 'network'. It works with a queue in which packets are removed at the desired rate. This doesn't actually throttle the incoming packets but with a TCP session, the slowdown this causes in acknowledgements throttles the incoming packets. This feature is implemented in conjunction with access lists, so packets can be routed to this network based on protocols and addresses. I got interested in this because my two newsfeeds were often choking my two t1's, even though the aggregate bandwidth is less than a t1. I figured that I would throttle each feed to half a t1, thus limiting the peak loads on my t1's without affecting average throughput. It worked. :) Another feature it has which I'm thinking of playing with is the delay in the 'network'. Obviously, this can't appreciably delay the newsfeed (due to protocol timeouts, if nothing else), but it *can* bias my feeders so that one is more likely to send articles than the other. Also, if you have two near real-time feeds, skewing one can cut down on the chance that both will try to send the article at exactly the same moment, resulting in both being transmitted and one discarded on receipt. Anyway, if you got a regular newsfeed and used this thing with a limited bandwidth and possibly a delay, you might get something along what you're looking for. If you categorized your newsgroups into 'desired' and 'undesired', you could set up two 'networks' with different characteristics and feed the groups into two addresses on your side and so use two 'networks' to control them. During normal operation, your satellite feed would provide the bulk of articles while the land feed would flow with dup rejections and the occasional article missed by the satellite. When the satellite feed goes down, your land feed would start sending you all the traffic. It would bottleneck, meaning that as time goes on, it would get behinder and behinder. However, if the purpose of this is to handle relatively short outages, this wouldn't make any real difference; the satellite should be back before the delay gets too large. And if you have two categories of newsgroups, the 'desired' groups might never be delayed at all, which would make this appropriate for handling long outages, too. Dummynet can be used in a machine configured as a router, so even if the news machine doesn't have a facility like this, you could interpose a FreeBSD machine to do the job.
Technical Details
Message-ID:
<7tao2s$1c0p$1@twwells.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:
<7t35h0$kr$1@ruby.mint.net>Show Full Headers
Complete Article Headers
Message-ID: <7tao2s$1c0p$1@twwells.com> Subject: controlling newsfeed hogginess with dummynet (was Re: delayed feeds) Date: Mon, 04 Oct 1999 00:00:00 +0000 From: bill@twwells.com (T. William Wells) References: <7t35h0$kr$1@ruby.mint.net> 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: 532729141 X-Complaints-To: abuse@twwells.com X-Trace: twwells.com 939058078 45082 209.118.236.61 (4 Oct 1999 17:27:58 GMT) Organization: None, Mt. Laurel, NJ NNTP-Posting-Date: 4 Oct 1999 17:27:58 GMT Newsgroups: news.software.nntp