views:

66

answers:

2

For a web server, the socket connection are kept alive to save overhead. At which point the server should start to drop connection that doesn't have pending request and based on what premises?

+3  A: 

Usually this is based on the operating system its self. Optionally to best account for performance, make this value an changeable option. [Put it in a properties file] The amount of connections open depends on your hardware, OS, and lengths of jobs performed by the clients. If the jobs performed by the server are light on network traffic and processing you may be able to get away with the maximum allowed open connections.

monksy
You are probably right, the best value will be found out of usage and tweaking. I wanted to get an idea of the scale of the value, is it around 100, 1000, 10000... ?
SelflessCoder
Like I said, it depends. You could do an simulated annealing approach to get the optimal amount for normal usage.
monksy