Subject: Re: TCP timeout mechanism

From: der Mouse <[email-masked]>
Date: Fri, 4 Aug 2000 16:23:47 -0400 (EDT)

> There is a cache to which I add entries whenever a new session
> starts.  The problem is identifying the sessions in the cache which
> have timed out without using a timer thread to go through all the
> entries.

This really has nothing to do with tcp-impl as far as I can see; it
looks to me more like a data structures question, so I'd recommend that
it go somewhere else.

Most briefly, though, my first suggestion is to use a heap.  My second
is to use a skip list.

However, depending on the traffic statistics, there may be better ways
- hybrid approaches, as it were.  Since this is the wrong forum for
discussing data structures, I sha'n't discuss them here; those
interested in the issue are invited to contact me off-list.

					der Mouse

			       [email-masked]
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

---

From: der Mouse <[email-masked]>
Date: Mon, 7 Aug 2000 11:23:32 -0400 (EDT)

> However, the internet is not the phone system.. putting unrecoverable
> state into the middle of the network is evil.

> A box of this form will be a source of annoyance to many end users..

As someone who once was such an "end user", I can emphatically endorse
this statement.

At one of my jobs I was behind a "firewall" that, among other things,
kept state for every TCP connection through it.  This state timed out,
and it was extremely annoying to find my remote login sessions locked
up because I'd let them idle a little too long.  Fortunately my desktop
was running an OS I had source to; I ended up hacking the kernel to
turn on keepalives for all connections, whether requested or not, and
pulled the keepalive idle time down below the firewall's state
expiration timeout.

I shouldn't've had to go to lengths that extreme just to keep remote
logins from locking up routinely.

					der Mouse