Socket.io: How many concurrent connections can Web

2019-01-21 15:59发布

I am wondering if you have any data on concurrent connections to websockets? I am using Socket.io on Node.js server. How many clients can connect to socket and receive data without bringing my server down? 1000? 1000.0000?

Thanks!

2条回答
Animai°情兽
2楼-- · 2019-01-21 16:45

http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/

Check this blog. We use the same principle. Previously our nodejs server will crash after 100 concurrent connections due to hardware constraints. But after we move to Amazon EC2 it is now highly scalable.

查看更多
淡お忘
3楼-- · 2019-01-21 16:50

This highly depends on your hardware configuration, what exactly are you doing/processing on the server side and if your system is optimized for many concurrent connections. For example on Linux machine by default you would probably first hit maximum number of opened files or other limits (which can be increased) before running into hardware resources exhaustion or similar scalability issues. Key resource may be the amount of RAM which can be allocated by your node.js program to keep concurrent connections opened and ability to receive new ones.

查看更多
登录 后发表回答