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开发者_JAVA百科 have pending request and based on what premises?
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.
精彩评论