Socket.io:WebSockets可以处理多少个并发连接? [英] Socket.io: How many concurrent connections can WebSockets handle?

查看:1022
本文介绍了Socket.io:WebSockets可以处理多少个并发连接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道您是否有关于websocket的并发连接的任何数据?我在Node.js服务器上使用Socket.io.有多少个客户端可以连接到套接字并接收数据而无需关闭我的服务器? 1000? 1000.0000?

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?

谢谢!

推荐答案

这在很大程度上取决于您的硬件配置,您在服务器端究竟在做什么/处理什么以及您的系统是否针对许多并发连接进行了优化.例如,默认情况下,在Linux计算机上,您可能首先会达到打开文件的最大数量或其他限制(可以是

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.

这篇关于Socket.io:WebSockets可以处理多少个并发连接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆