I am in the process of implementing a chat server using node.js, mongodb, socket.io and express. What I would like to know is whether there's a limit on the maximum no. of concurrently open rooms for socket.io multi-room chat.
Also, is there a maximum on no. of users per room.
socket.io rooms are a lightweight data structure. They are simply an array of connections that are associated with that room. You can have as many as you want (within normal memory usage limits). There is no heavyweight thing that makes a room expensive in terms of resources.
As we saw in the performance section of this article, a Socket.IO server can sustain 10,000 concurrent connections.
While not comparable to eventlet and gevent in terms of performance, the Socket.IO server can also be configured to work with multi-threaded web servers that use standard Python threads. This is an ideal setup to use with development servers such as Werkzeug.
The theoretical limit is 65k connections per IP address but the actual limit is often more like 20k, so we use multiple addresses to connect 20k to each (50 * 20k = 1 mil).
Socket.io has no restrictions and limitations for how many users can be connected to the server, how many users in a room or how many rooms there is.
Your limitations are related to:
Order is important and usually try to approach from the top to the bottom, reevaluating each point in advance based on requirements of your application. OS Setup have to be completed initially.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With