3 ms·
I tried SocketCluster for a highly scalable chat platform and it couldn't handle very big conversations. SocketCluster is good but the bottleneck here was NodeJ
by geekuillaume 11y ago
I tried SocketCluster for a highly scalable chat platform and it couldn't handle very big conversations. SocketCluster is good but the bottleneck here was NodeJS.
I finnaly used Nginx PushStream to do the sub and the pub was handled by NodeJS (with the authentication).
It has been used to host chat room with more than 70,000 concurrent clients, scaled on 7 m3.large EC2 instances and one relatively small Redis server.
The platform is opensource and come with a lot of higher level features for chat usage: https://github.com/geekuillaume/chatup https://github.com/geekuillaume/chatup
- vhiremath4 11y agoWould you happen to have any metrics of how far you could push SC and how far you're getting with NGINX PushStream for sub?
- zokier 11y ago> It has been used to host chat room with more than 70,000 concurrent clients, scaled on 7 m3.large EC2 instances and one relatively small Redis server. Knowing nothing about anything, 70k clients on 7 servers does not sound immediately very impressive. That's roughly 10k clients per server, and this is 15 years after "C10k problem" was coined. Could someone comment if I'm missing something major here?
- sudovoodoo 11y agoSo -- m3.large ec2 instances have a few problems with them. 1, your only running a 2 core machine (1 worker, and assuming 1 broker to distribute through redis). That is not nearly enough to handle really a real-time chat server where everyone is spamming it all the time. Another issue is the network performance of an m3.large instance -- its moderate (which is another word for not very good). With 2 c4.8xlarge instances behind ELB, we consistently see between 20 to 50K active connections on live meetings, and the servers sit at < 2% usage. Latency between event cycles is < 0.015ms. I see a lot of people having problems with this, but the issue is usually the resources they give to it, or the actual handling of socket events. If the socket server is just a relay there should be no reason a single m4.4xlarge instance cant handle 600K+ connections. www.jayway.com/2015/04/13/600k-concurrent-websocket-connections-on-aws-using-node-js/
- arrty88 11y agoHow does nodejs stand up against Java netty NIO for the web socket use case?