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
such.
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.
--karl--