phoboslab / jsmpeg

MPEG1 Video Decoder in JavaScript
MIT License
6.38k stars 1.43k forks source link

websocket-relay.js / node performance issues (Single thread bound) #259

Open lboogs99 opened 5 years ago

lboogs99 commented 5 years ago

Hello all,

Recently ran into an issue with what appears to be Node JS's single thread boundness. Basically if we run 10 copies of node on a single machine running websocket-relay.js everything is cool until we add stream 11. I have narrowed this down to an issue with node JS and the fact it is bound to a single thread.

Any using alternate web socket servers? Any performance suggestions or ideas as to how to over come this limit?

Thanks

revofire commented 5 years ago

https://itnext.io/multi-threading-and-multi-process-in-node-js-ffa5bb5cde98

Does this help clear that up?

cs8425 commented 5 years ago

Hi, you can try websocket server written in golang as I did: https://github.com/cs8425/jsmpeg/tree/master/go-wsrelay