scalability issues relating to socket.io

吃可爱长大的小学妹 提交于 2019-12-23 18:48:18

问题


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:


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.



来源:https://stackoverflow.com/questions/9924822/scalability-issues-relating-to-socket-io

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!