[英]Netty Connection Limit
I am developing an application server that is using netty 3.6.5. 我正在开发一个使用netty 3.6.5的应用服务器。 I would like to first understand the full meaning of the option backlog.
我想先了解选项积压的全部含义。 Also why is there no documentation about the serverbootstrap options to help we developers.
另外,为什么没有关于serverbootstrap选项的文档来帮助我们的开发人员。
My other question is how best I can limit the number of concurrent connections to the server for better performance. 我的另一个问题是如何最好地限制与服务器的并发连接数以获得更好的性能。
Thank you. 谢谢。
To limit the number of concurrent connections to your server - on a UNIX system - you can set the ulimit on file descriptors before running the application, and, once all descriptors are open, other clients will be unable to connect. 要限制与服务器的并发连接数 - 在UNIX系统上 - 您可以在运行应用程序之前在文件描述符上设置ulimit,并且一旦所有描述符都打开,其他客户端将无法连接。
To get the number of allowed file descriptors, exec $ ulimit -n
as the user running the process. 要获取允许的文件描述符的数量,请运行该进程的exec
$ ulimit -n
。 See man ulimit
for more info. 有关详细信息,请参阅
man ulimit
。
See zhqauke's answer regarding ServerBootstrap. 请参阅zhqauke关于ServerBootstrap的答案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.