Article View: news.software.nntp
Article #11136Re: Netscape and Win/NT vs. NNTP
From: Joe Greco
Date: Wed, 25 Sep 1996 00:00
Date: Wed, 25 Sep 1996 00:00
151 lines
7260 bytes
7260 bytes
In news.software.nntp article <3242E43F.3D0C@netscape.com>, Ben Polk <bpolk@netscape.com> wrote:
:Chris,
:
:Do you have evidense of clients infrequently disconnecting
:making the overall system not work?
I don't know if Chris does, but I do.
I used to see a hundred or two hundred NNRP sessions pile up on a box
when people either disconnected from the Portmasters or in some cases
their local software chose not to properly close the TCP connection.
The gradual buildup of "dead" sessions led to the process limit of 256
being reached and then service was rudely refused.
That qualifies as "clients infrequently disconnecting making the overall
system not work", does it not? :-)
It is also easy to build a CPU contention case.
Assume that each connection disconnects and reconnects every 10 minutes.
Assume that it takes one second to start an NNRP session on an unloaded box.
Assume that there are 600 simultaneous connections.
With 600 connections restarting, evenly spaced out, over a 10 minute
period, you have one connection per second being started. If it takes you
a full second to start a new NNRP session, you are out of CPU and
into denial of service (or extremely slow, sh***y service).
You _MUST_ look at overall system performance given the case you
are arguing. Yes, I can argue that it is trivial to start a new
connection once every five seconds - as long as I am the only
user doing it. When you get several hundred, all simultaneously
exhibiting the behaviour, the problem is several hundred times
worse.
Anyways: the former problem was solved by adding KEEPALIVE's to each
NNRP session. (setsockopt(SO_KEEPALIVE)). With the current
generation of software, however, nothing will prevent the latter other
than us taking a big stick and whacking offending {users,software
authors} over the head.
:And if this was true, which
:I'm doubt, are you sure this is the clients fault? Hey, I work
:on servers, and it would be easier on me to just say that clients
:can never drop connections. But servers *must* handle this
:gracefully for cases when connections are dropped for other
:reasons. It happens all the time, and it can happen in huge
:bursts as sections of the network drop out.
_Drops_ aren't as bad as _startups_. Dropping a connection for
the sake of convenience suggests that you are opening another one
so you can actually do the operation you would have done on the
first.
Well, drops might suck if I didn't use SO_KEEPALIVE :-)
:Down below you say it's a clear cut case that it's OK to drop
:a connection downloading a 1MB image at user request, so
:are you just saying that we need to be sure to define this
:session dropping stuff in a way that doesn't hose the servers?
I think we need to re-evaluate the larger scale problem.
:> I said that it would be *better* if it *at least* queued up QUIT commands.
:
:Right. We've talked about doing this, but I'm not sure it really
:is better. I don't actually think it's any easier on our server
:software. And it's certainly not easier on the clients network
:connection. Do you actually want this?
:
:> I also suggested that it might be an idea to *also* limit the number of
:> connections. This in effect throws the problem back into the faces of those
:> that develop client software.
:
:This is a little tricky. Do you limit it by IP address? What about
:multiuser machines?
It is not too tricky. I am not personally concerned by multiuser machines,
but I will point to identd just for the sake of completeness.
:> The real problem here is that the server has no way to instantly conclude
:> that the TCP connection has been discarded.
:
:If the client FINs it, the server's send should fail immediatly. If the
:client simply abandons it, you're right.
:
:> It is likely that those dead
:> connections are sticking around for a couple of minutes, which is a fairly
:> appropriate policy *in general* for TCP services.
:>
:> It might be more appropriate to drop UDP connections; there is the contract
:> of reliability there.
:
:huh? I think you mean "isn't the contract of reliablility", but I've
:never
:seen or heard any talk of running NNTP over UDP, so I'm not sure how
:this
:is relevent.
It could be an alternative :-) But I prefer TCP, and I prefer it running
under some NNTP-like protocol. Easier to deal with.
:> >Is it right for someone dialed in on a 14.4 modem that lands
:> >on a 1MB article to be locked up for the two minutes it's going
:> >to take to receive the results of the ARTICLE command? That
:> >sounds "wrong" to me.
:>
:> 1MB is a clear cut case. It makes sense to drop the connection in that
:> case. For the one article. Doing this in alt.binaries.tasteless.pictures,
:> where this could occur 50 times, is nonetheless abusive.
:
:I agree with everything you say here. In fact, I think we're
:in violent agreement overall.
:
:> >Or we could have some other way for the client to tell the
:> >server to teminate the connection. For example, have the
:> >client make it's second connection, and send a new NNTP
:> >command that includes the IP address and port of the
:> >connection to be terminated. The server then aborts
:> >whatever operation is going there.
:>
:> Wonderful. I'll run telnet sessions on port 119 that will kill other users
:> sessions. We replace one denial of service "attack" with another far more
:> explicit way to do denial of service attacks.
:
:I didn't say it was a good idea, I just said we could do it.
:And if we did we'd at least make them spoof their sending
:IP address to match the one of the session they were canceling.
:We could even give them a magic number they had to send across
:to identify the session. This could be made to work, but I
:don't think we should.
I agree with THAT... it may even gain my Bad Proposal Of The Day award :-)
:> >Or we could simply agree that it is OK for a client to
:> >sometimes terminate a connection at user request. Perhaps
:> >the agreement should include some limit on how freqently
:> >this can be done. This is what I favor for now.
:>
:> This has the possibility of hanging the client, you realize.
:
:Yep. Life's rough in client land. If the limit is on the
:order of a few seconds it shouldn't be too bad. Or perhaps
:we just have to put our trust in client implementors to not
:do this too often.
... JG
Technical Details
Message-ID:
<52bqll$82o@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:
<32407EB0.2DE0@netscape.com> <3241A571.28EB@netscape.com> <slrn545632.a93.cbbrowne@wolfe.brownes.org> <3242E43F.3D0C@netscape.com>Show Full Headers
Complete Article Headers
Message-ID: <52bqll$82o@brasil.moneng.mei.com> Subject: Re: Netscape and Win/NT vs. NNTP Date: Wed, 25 Sep 1996 00:00:00 +0000 From: jgreco@brasil.moneng.mei.com (Joe Greco) References: <32407EB0.2DE0@netscape.com> <3241A571.28EB@netscape.com> <slrn545632.a93.cbbrowne@wolfe.brownes.org> <3242E43F.3D0C@netscape.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: 185290085 Distribution: inet Organization: Marquette Electronics, Inc. - Milwaukee, WI. Newsgroups: news.software.nntp,news.software.readers