maximum concurrently open rooms in socket.io

2019-06-18 05:23发布

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.

1条回答
做个烂人
2楼-- · 2019-06-18 06:00

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:

  1. Software implementation (performance)
  2. Networking logic model: evented, threaded, single-threaded
  3. OS setup: socket handlers and many other specifics
  4. Hardware: CPU, RAM, Bandwidth (In\Out), HDD/SSD (if there is database/file cache (still can be RAM based)).

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.

查看更多
登录 后发表回答