网络连接限制 [英] Netty Connection Limit

查看:94
本文介绍了网络连接限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用Netty 3.6.5的应用程序服务器.我想首先了解选项积压的全部含义.另外,为什么没有关于serverbootstrap选项的文档来帮助我们的开发人员.

I am developing an application server that is using 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.

我的另一个问题是,如何最好地限制与服务器的并发连接数以提高性能.

My other question is how best I can limit the number of concurrent connections to the server for better performance.

谢谢.

推荐答案

要限制与服务器的并发连接数(在UNIX系统上),可以在运行应用程序之前在文件描述符上设置ulimit,并且在所有应用程序上都可以描述符已打开,其他客户端将无法连接.

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.

要获取允许的文件描述符数量,请以运行进程的用户身份执行$ ulimit -n.有关更多信息,请参见man ulimit.

To get the number of allowed file descriptors, exec $ ulimit -n as the user running the process. See man ulimit for more info.

请参阅zhqauke关于ServerBootstrap的答案.

See zhqauke's answer regarding ServerBootstrap.

这篇关于网络连接限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆