Delayed room updates
We were in the process of testing our game with roughly 18 people per room, and we noticed that datastore updates started to became very delayed. We ended up receiving an action that a player had performed more than 3 minutes after the action was sent. Is there anything we can do to mitigate this?
11 Replies
Hi @fojam. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
The delay in updates could be due to a number of factors. Here are a few things you could consider:
1. Datastore Frame Duration: The rate at which updates are serialized and sent out is set by the
datastoreFrameDuration
property. The default value is 1.0/20.0
which sends updates at 20hz. Setting this value lower results in more frequent updates, but also higher bandwidth usage. If you're running a local installation, values up to your render framerate can be acceptable; however, you'll rarely want to send updates more often than 20hz. Typically, even 10hz works well with Normcore. You might want to experiment with this value to see if it improves the update delay. source (https://normcore.io/documentation/room/datastore#delta-updates)
2. Congestion Control: Normcore uses WebRTC which implements congestion control. This means it can automatically adjust the rate at which updates are sent to the server to utilize the maximum bandwidth available while still keeping updates smooth for users with poor connections. If your network is congested, this could be slowing down your updates. source (https://normcore.io/documentation/architecture/transport#webrtc-implements-congestion-control)
3. Datastore Updates: All state is synchronized using the room's datastore. If you make a change to the datastore, it’s automatically replicated to all connected clients. To conserve on bandwidth, once the server has sent the initial datastore snapshot, it will only send delta updates for the remainder of the session. If your game involves a lot of state changes, this could be causing a delay in updates. source (https://normcore.io/documentation/architecture/client#datastore)
4. Server Rejections: It's also possible that the server is rejecting updates due to either ownership or Normcore Private plug-ins. When this happens, the server sends back the rejected update or a modified version of the state in the update. The datastore then rolls the data back or replaces it with the version transformed by the server. source (https://normcore.io/documentation/room/datastore#instant-updates)
If none of these seem to be the issue, it might be worth reaching out to the Normcore team for further assistance.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------@Normal Team
Also is this expected behavior?
please don’t ping the whole team
Room Server Options | Normcore Documenation
This API is currently in private beta. If you would like to try it out, shoot us an email to help@normalvr.com with info about your project.
Sorry about that. I saw the room configuration but it was in private. I figured i would try that if there were no other options, but I wasn't sure if there was anything we could do short of that
but if that's the only option, any chance we could get it activated for our project to try it out?
the beta is currently closed. I can add you to the list for the next round, but I expect it will be a few months while we improve the API
gotcha, if you're willing to then yea we'd definitely like to try it. Anything we could do before then?
you said you’re seeing actions 3+ minutes late. this sounds more like a bug with reliable property use
the server shouldn’t hold onto anything that long unless it’s required to for a reliable channel
and it will drop unreliable updates to keep the reliable channels clear
I'll check, I think the only reliable updates we send are around every 3-4 seconds at peak usage. Is that too frequent?
no that should be fine if it’s only a few
gotcha, i'll try breaking up the room into more normcore rooms I guess and see if that makes a difference, otherwise i'll try messing with the reliable updates
thanks for the quick response!