Replies: 2 comments 1 reply
-
-- am also facing scaling issues so currently using cluster adapter for redis pub sub and left socket server with single node and resources usage not reaching to defined rules and it's not scaling . and new connections are not establishing properly and sometimes existing connections getting killed |
Beta Was this translation helpful? Give feedback.
-
A limit of about 900 connections sounds like you may have reached the max number of open files of your machine. Please check the documentation here: https://socket.io/docs/v4/performance-tuning/#at-the-os-level |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I built a Socket.io application that was not able to scale. I would like to understand how I can make it scale for the next event.
I am not sure what the problem was, or how to fix it. I am writing this to see if anybody has experienced something similar and could give me some ideas.
I have built an application in Nodejs using Socket.io to monitor and control computers at events. The windows application is built with Electron, the server part is Nodejs hosted on Heroku.
The application worked well when it was being developed and tested. But when I run it on 900 computers connected to the same access point, the connections were not stable. I could see some computers being connected and other disconnected, but then some computers would connect and other computers would disconnect.
The computers were available for me to test on a very short amount of time because this was for an event which only lasted 3 days.
As soon as I saw the network struggling because of my appplication, I had to kill it so the attendees would not be affected by the tool using the network. The application was built to monitor and control the computers and not required for the sessions that would happen during those 3 days… so I had to kill the app and I could not test any further.
as you can imagine this is very hard to replicate… .
I have a similar event next march 2024, and I would like to try it again, this time I will bring a server into the room, so the Socket.io connections happen in a LAN, not a WAN. Do you think this would help?
Any tips, pointers, hints, ideas…. will be much appreciated.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions