简体   繁体   English

与socket.io相关的可伸缩性问题

[英]scalability issues relating to socket.io

On the homepage of socket.io, it does not say anything about relating to scalability issues. 在socket.io的主页上,它没有说明与可伸缩性问题相关的任何内容。 Does anyone have any idea as how many concurrent connections it can process at a time? 有没有人知道它一次可以处理多少并发连接? I want to deploy socket.io in my project for large scale comet processing. 我想在我的项目中部署socket.io以进行大规模的彗星处理。 For instance, it states that nodejs can easily handle as many as 100K concurrent connections. 例如,它声明nodejs可以轻松处理多达100K的并发连接。 Will socket.io be able to process as many request as those at a time? socket.io能否同时处理那些请求?

There are many variables that affect performance and define limits to socket.io. 有许多变量会影响性能并定义socket.io的限制。

Probably the most important is your hardware, especially RAM. 可能最重要的是你的硬件,特别是RAM。 There is also distinction between plain concurrency and message processing. 普通并发和消息处理之间也有区别。 Message processing seems to be more CPU consuming than just concurrency. 消息处理似乎比并发更耗费CPU。

I'd recommend this article , written by Mikito Takada. 我推荐这篇由Mikito Takada撰写的文章 An extract from it: 它的摘录:

Node (0.4.12) using tcp ~ 8000 connections on a single core 节点(0.4.12)在单核上使用tcp~8000连接

socket.io 0.6.17 using websockets ~ 2300 connections on a single core socket.io 0.6.17在单核上使用websockets~2300个连接

socket.io 0.7.11 using websockets ~ 1800 connections on a single core socket.io 0.7.11在单个核心上使用websockets~1800个连接

socket.io 0.8.6 using websockets ~ 1900 connections on a single core socket.io 0.8.6在单核上使用websockets~1900连接

So, to answer your question, I'd say that you cannot expect socket.io to handle same level of concurrency as what node.js can given the same setup. 所以,为了回答你的问题,我要说你不能指望socket.io能够处理与node.js给出相同设置的相同级别的并发性。

For additional information regarding socket.io performance, read this by Drew Harry. 有关socket.io性能的其他信息,请阅读德鲁哈利。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM