Does a bottleneck fit with outlets?

Thinking of creating a real-time application in which users can collaborate. Found node.js + socket.io to be one of the solutions for this type of problem.

I heard from other developers that there will be a bottleneck in the number of sockets that my server will provide to users. Therefore, if at the same time I have a hundred users, the number of open sockets will end, and users will not be able to connect. Is this a serious problem?

update: regarding a related note. I am looking to use SockJS instead of Socket.io. There is a stream that explains the pros and cons of these libraries. This is also a good read .

+7
source share
2 answers

For hundreds of users, I do not think this is a problem.

Sockets, which, as you know, have a permanent connection between the client and server, and both sides can start sending data at any time. Keeping them open is not a problem, like handling the load in terms of sent / second messages.

Socket.io can easily handle 1000 concurrent connections. But he will fail if he sends more than 8-10 thousand messages per second. You will encounter a load barrier before your outlets are exhausted. In most cases, processing more simultaneous users translates to a higher load. Therefore, do not worry about going down to sockets. Attempting to scale beyond this barrier will require more server resources.

Useful links:

+4
source

There are already solutions that use this approach, such as Cloud9 , and it works well. There will be a point where you need to scale. Therefore, if you are planning something big, I would think about it.

Here are some tests for socket.io with 10,000 concurrent connections. This seems like a good solution, but not easy due to the return mechanism.

+1
source

All Articles