How many users Nodejs & Socket.io can support?

I got a website that implements the broadcast.emit. that sends message to all users of the site. It is just the simplest implementation of socket.io but I currently having a problem. When I hit about 100 concurrent users. The nodejs server starts to lag until it hangs that I can no longer access my whole website. When we checked the server. The nodejs is taking 100% of the CPU. Is it normal?

I was wondering how many users can socket.io supports? And when this thing happen is there a way to restart the nodejs server programatically?

I have a multiplayer card game. Socket.io maxes out my CPU at around 3000 concurrent users. This is on Intel i7 CPU. Because of this I have to run multiple node/socket.io processes to handle the load.

For 100 concurrent connections you should be fine. Perhaps you are using some VPS and CPU is shared with all the other VMs? Do you run a dedicated server?

Also, check your code. You might be doing synchronously some stuff that should go async.

At least 250k concurrent connections (and for most use cases bottleneck is memory)

Is it critical for you to deliver message to all clients without dropping it? If no, I'd propose to use socket.volatile.emit call. There can be a lot of problems with remote clients and non-stable connectons.