🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #9640

Re: limiting number of incoming feed connections from a host?

#9640
From: Jerry Aguirre
Date: Thu, 25 Jul 1996 00:00
59 lines
3470 bytes
In article <4t0blu$k86@viper.txdirect.net> jturner@legend.txdirect.net (John Turner) writes:
>
>	Considering that the reason those other connections are forked 
>off is the get enough traffic across/to (choose all that apply) high 
>latency connection, slow server, high volume, etc I would prefer to let 
>Innfeed fork as many channels as required.  The feeding site can set the 
>max number of connections in the innfeed.conf file.  

If the server is being fed from only one site and not using streaming
then having sevaral NNTP feeds can improve thruput.  A leaf site is
unlikely to fall short of innd file descriptors anyway.

But if the site is using streaming then using multiple parallel
connections will not improve thruput.  Streaming doesn't suffer from the
RTT latency so the receiving site will have data waiting in its input
buffer given sufficient bandwidth.

Running multiple parallel feeds to a site may seem to increase thruput
but it is really only taking resources from the site's other feeds.
Your queue processes faster while their's slow down.  The server
winds up processing the same number of articles but more of them
came from your feed.

What we are seeing is that innd tries to give a fair share to each
incomming connection.  If a site has 6 incomming feeds and you are 1
of them then you will get 1/6th of its resources.  This can severly
limit thruput and backlog that queue.

Now consider where you split the queue and send 5 parallel NNTP
connections instead of 1.  Now you are getting 5/10ths of its resources
as innd figures you are 5 separate connections.  You have probably
trippled your apparent thruput.

But you have done so at the expense of the other feeds.  The other 5
feeding sites will now get 1/10th the resources instead of 1/6th.
They will start to fall behind and if they each decide to split the
feed to keep up then you will wind up exactly where you were before.

The feed wars continue until the server no longer has enough
file descriptors available to handle all the connections.  The server
won't be processing any more articles than before you split the feed.

The second is that potentially this becomes a denial of service attack.
One can open a hundred NNTP feed connections to a site and lock it up.
They don't have to actually transfer any articles.  Fortunately only
sites in the hosts.nntp file can do this so it is unlikely to be
intentional but ...

Given that innd handles incomming feeds directly it is possible for
it to keep counts and limit on a per site basis.  The only detail is
in specifying a syntax in the hosts.nntp file and keeping a common
count for hosts with more than one IP address.  How about a syntax
of:
	news.foo.com/5:password:!foo.*

which would limit news.foo.com to 5 incomming connections?

Technical Details
Message-ID: <4t6j64$83j@olivea.ATC.Olivetti.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
References: <4t0999$an7@pith.uoregon.edu> <4t0blu$k86@viper.txdirect.net>

Show Full Headers
Complete Article Headers
Message-ID: <4t6j64$83j@olivea.ATC.Olivetti.Com>
Subject: Re: limiting number of incoming feed connections from a host?
Date: Thu, 25 Jul 1996 00:00:00 +0000
From: jerry@strobe.ATC.Olivetti.Com (Jerry Aguirre)
References: <4t0999$an7@pith.uoregon.edu> <4t0blu$k86@viper.txdirect.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: 169992420
Organization: Olivetti ATC; Cupertino, CA; USA
Newsgroups: news.software.nntp