服务器上打开的套接字的最大数量应该是多少?
对于 Web 服务器,套接字连接保持活动状态以节省开销。在哪一点上,服务器应该开始删除没有待处理请求的连接,并且基于什么前提?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常这基于操作系统本身。为了最好地考虑性能,可以选择将此值设置为可更改的选项。 [将其放入属性文件中] 打开的连接数量取决于您的硬件、操作系统以及客户端执行的作业长度。如果服务器执行的作业对网络流量和处理的影响很小,您可能可以摆脱允许的最大打开连接数。
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.