Re: holding connections open: a modest proposal

Karl Auerbach, cavebear Tools and Technologies, 408/427-5280 (
Tue, 13 Sep 1994 01:22:33 +0200

> While I know of no careful study I think there is considerable
> anecdotal evidence (well at least folklore) that holding the
> connection open is a bad idea. It may reduce network traffic but
> increases the load on the server.

A well behaved client would close the connection when it was idle.
We probably need to figure the heuristics, but as a first cut I would
suggest dropping the connection between each document fetch -- i.e. a
single connection would be used to catch all the embedded images and

The main overhead on the server due to connections being left open
is table space and the cpu time to search through the larger set of
TCP connection blocks. (Many implementations are brain-dead and use
sequential searches.)

There is a hidden cost to dropping connections -- that of the two
minute TCP TIME-WAIT state. In other words, when a connection is
closed the TCP engine must hold a control block for two minutes.
In the current mode, this means that servers can end up with a lot of
TIME-WAIT control blocks which burden the CPU by increasing the cost
of finding TCP control context.

People have mentioned the cost of TCP keepalives. The RFCs require
that they happen no more often, if at all, every two hours. That's a
pretty light load.