Comet 和 node.js - EC2 服务器上可以预期有多少个并发连接?
对于在 Node.js 上运行的 Comet 服务器,我们期望从 EC2 服务器获得多少个并发连接?
有人以前这样做过并找到了合理的限制吗?
我们的特定应用程序只需要相当频繁地向客户端推送数据,我们更担心的是每个服务器的最大同时连接数。我认为我们正在寻找 200k - 500k 之间的某个地方,并且我正在尝试弄清楚 Comet 是否可以在没有庞大服务器群的情况下工作......
With a comet server running on node.js - how many simultaneous connections could we expect to get out of an EC2 server?
Anyone done this before and found a reasonable limit?
Our particular application only needs to push data to the clients fairly infrequently, it's more the max simultaneous connections per server that is a worry for us. We're looking at somewhere between 200k - 500k i think, and i'm trying to figure out if comet is going to be workable without a monstrous fleet of servers...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您运行的是 Linux,请了解 /proc/sys/net/ipv4 的内容,
特别是 net.ipv4.netfilter.ip_conntrack_max 会让您增加打开连接的最大数量,但是当您开始插入非常大的数字时你还会遇到其他问题。例如,您可能需要减少 orphan_retries,因为统计上您更有可能出现孤儿。对于非常大的数字,内核查找算法完全有可能会显着减慢。您需要仔细调整 TCP 设置。
如果我处在你的位置,我会比较至少两种操作系统,例如 Linux 和 FreeBSD 或 OpenSolaris/Illumos。
在 FreeBSD 上,您需要更改 /boot/loader.conf 中的设置。
在 OpenSolaris/Illumos 上,您需要阅读 ndd 命令的文档。
If you are running Linux, get to know the contents of /proc/sys/net/ipv4
In particular, net.ipv4.netfilter.ip_conntrack_max will let you increase the maximum number of open connections, but when you start plugging in really big numbers you will run into other problems. For instance you might need to reduce orphan_retries because you will statistically be more likely to have orphans. And with really big numbers, it is entirely possible that kernel lookup algorithms will slow down significantly. You need to carefully tune the TCP settings.
If I were in your shoes, I would compare at least two OSes, such as Linux and FreeBSD or OpenSolaris/Illumos.
On FreeBSD you will need to change settings in /boot/loader.conf
On OpenSolaris/Illumos you will need to read the documentation for the ndd command.