scalability issues relating to socket.io

2019-07-04 19:17发布

On the homepage of socket.io, it does not say anything about relating to scalability issues. 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. For instance, it states that nodejs can easily handle as many as 100K concurrent connections. Will socket.io be able to process as many request as those at a time?

1条回答
Root(大扎)
2楼-- · 2019-07-04 19:44

There are many variables that affect performance and define limits to socket.io.

Probably the most important is your hardware, especially RAM. There is also distinction between plain concurrency and message processing. Message processing seems to be more CPU consuming than just concurrency.

I'd recommend this article, written by Mikito Takada. An extract from it:

Node (0.4.12) using tcp ~ 8000 connections on a single core

socket.io 0.6.17 using websockets ~ 2300 connections on a single core

socket.io 0.7.11 using websockets ~ 1800 connections on a single core

socket.io 0.8.6 using websockets ~ 1900 connections on a single core

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.

For additional information regarding socket.io performance, read this by Drew Harry.

查看更多
登录 后发表回答