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.
At MIT Information Systems we have CWIS software called TechInfo whose
protocol keeps the connection open for an entire session. We've had
plenty of time to think about when the connection should be closed and
when it should be left open.
There are two states the server can be in:
State 1: The number of open connections is below a certain threshold,
say 30. There's practically no cost to leaving them open. Clients on
slow links reap the benefit of not having to reopen the TCP connection
every time they want to retrieve a document.
State 2: The number of open connections has reached the threshold.
Choose the connection that has been idle the longest and close it.
Clients never decide to close the connection before the end of the
session because they have no way of knowing if there's any reason to
close it.
The effect of closing connections based on idle time is that the
quickness of server response corresponds to the quickness of user
actions, resulting in a nice feel to the system.
-- , Bruce R. Lewis ___ (| Analyst Programmer ===== |) Distributed Computing and Network Services ||||||| MIT' Information Systems -=======-