-
-
并发连接数
并发连接数是指服务器当前时刻一共维持了多少TCP连接, 而这些连接上是否有数据通讯并不关注, 例如一台消息推送服务器上可能维持了百万的设备连接, 由于连接上很少有数据通讯,所以这台服务器上负载可能几乎为0, 只要内存足够,还可以继续接受连接。
并发连接数受限于服务器内存, 一般24G内存workerman服务器可以支持大概120W并发连接。
-
并发请求数
并发请求数一般用QPS(服务器每秒处理多少请求)来衡量, 而当前时刻服务器上有多少个tcp连接并不十分关注。 例如一台服务器只有10个客户端连接, 每个客户端连接上每秒有1W个请求, 那么要求服务端需要至少能支撑10*1W=10W每秒的吞吐量(QPS)。 假设10W吞吐量每秒是这台服务器的极限, 如果每个客户端每秒发送1个请求给服务端, 那么这台服务器能够支撑10W个客户端。
并发请求数受限于服务器cpu处理能力, 一台24核workerman服务器可以达到45W每秒的吞吐量(QPS), 实际值根据业务复杂度以及代码质量有所变化。
-
非阻塞
-
异步
-
-
- react/mysql
- react/redis
- react/dns
- react/http-client http 组件
- react/zmp && react/stomp 异步消息队列
- react/child-process 进程控制组件
延迟要求,是否要求低于5秒的延迟?如果是硬指标,
就只能选择RTMP或HTTP-FLV流。移动端需要自己编译FFMPEG支持,无法直接播放。
终端适配,是否要求支持PC和移动端(IOS和Android)?
如果需要广泛支持移动端,HLS是最好的选择。
节约带宽,是否要求支持WebP2P?如果需要支持FlashP2P,
或者移动端P2P,选择HLS。