You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Page is not responsive when when large number of sockets are connected (~10K).
Have tested in 2 scenarios:
Start SocketIO server,Open Admin UI Page, now add load 10K socket connections in realtime, 10K connections are instantly connected on the server but Admin UI Page couldn't keep up with the real count.It then became unresponsive as it is with flooded with realtime docket data.
Start SocketIO server,add load 10K socket connections,now open Admin UI,it will take long to connect and then page became unresponsive.
Yes instead of broadcasting each and every events, we could make it lazy loaded or support batch operations.
That way it can handle Very Large Number of connections.
Yes, that's a lot of updates for the UI, which makes it unsuitable for more than a thousand connections.
We could add a lazy mode, where specific sockets/rooms are not tracked. WDYT?
I think the server should not push, but client should pull instead, whenever the UI thinks it's ready. Updating every 2 secs is perhaps too fast anyway - items are jumping around too fast on screen when there's a lot of activity. Maybe 5 seconds would be better as a minimum?
Here's my idea for lazy mode. I call it the Adaptive Refresh.
Configure minRefresh speed to e.g. 5000ms and refreshRatio to e.g. 1.2
UI sends a refresh request to the server and measures the roundtrip
UI refreshes screen
UI creates setTimeout for the next refresh to be Math.min(roundtrip*refreshRatio, minRefresh)
This should solve the following issues:
Fix the original issue where the overwhelmed UI crashes.
Self-adapt to server load, because server fetching updates from cluster and/or Redis are async, and can take a while.
Self-adapt to response size, depending on WebSocket activity.
Activity
darrachequesne commentedon Jul 6, 2021
Yes, that's a lot of updates for the UI, which makes it unsuitable for more than a thousand connections.
We could add a lazy mode, where specific sockets/rooms are not tracked. WDYT?
vishwassingh47 commentedon Jul 9, 2021
Yes instead of broadcasting each and every events, we could make it lazy loaded or support batch operations.
That way it can handle Very Large Number of connections.
md-seb commentedon Aug 5, 2021
I think the server should not push, but client should pull instead, whenever the UI thinks it's ready. Updating every 2 secs is perhaps too fast anyway - items are jumping around too fast on screen when there's a lot of activity. Maybe 5 seconds would be better as a minimum?
Here's my idea for lazy mode. I call it the Adaptive Refresh.
Configure minRefresh speed to e.g. 5000ms and refreshRatio to e.g. 1.2
UI sends a refresh request to the server and measures the roundtrip
UI refreshes screen
UI creates setTimeout for the next refresh to be Math.min(roundtrip*refreshRatio, minRefresh)
This should solve the following issues:
Fix the original issue where the overwhelmed UI crashes.
Self-adapt to server load, because server fetching updates from cluster and/or Redis are async, and can take a while.
Self-adapt to response size, depending on WebSocket activity.
hatemragab commentedon Feb 18, 2022
Are any updates about this issue?
feat: add production mode
darrachequesne commentedon Jun 23, 2022
For future readers:
You can now use the production model, which was implemented in e0d91ca and included in version
0.4.0.In this mode, the server send fewer data to the admin UI, so it is suitable for a bigger workload.
Please reopen if needed!