Closed vishwassingh47 closed 2 years ago
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?
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.
Are any updates about this issue?
For future readers:
You can now use the production model, which was implemented in https://github.com/socketio/socket.io-admin-ui/commit/e0d91cadb11205c5f2c686c239a50cb2eef9795d 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!
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.