Highly available DataStore keys

Continuing the discussion from Unable to access DataStore API from Studio (HTTP 0/429/1.1?):

Even if you stay within the per-server limitations of DataStore key access, if you access a key from a lot of servers in your game, your requests will start failing because it’s being accessed too often. This can be problematic with something like broadcast notifications where you’d like to push notifications to every server and they all need to poll the DS key every minute or so. Other user cases include:

  • The ability to look at users’ profiles (kills, etc) from multiple servers – if everyone is looking at the top player’s statistics, we would run into issues
  • A user-auction where users put items up for sale and other users buy them – such a marketplace would need to be accessed from all servers in the game
  • A FFlag-like system for ROBLOX games where developers can turn on/off features without shutting down servers – all servers would need to continuously poll the FFlag key to look for changes

buildthomas makes a very good point in the linked thread:

It’d be great if ROBLOX supported highly-available keys (preferably automatically instead of further complicating DS by making a special type of key).

5 Likes

I wish roblox flat out had databases. I had to run one on my site to make lobbies possible for a while, and it felt like I had loads of power. I could view all the data, sort it, and fetch it easily.

1 Like

Is there a reason OnUpdate is not suitable for this?

I’ve used OnUpdate in the past and it hasn’t 100% reliably been fired when the key changes. Also, I have no control over its usage. If I have lots of servers writing to the key, it’s not feasible because it’d fire so many times that I’d go over my allotted requests. Polling is really the only way to ensure I don’t use too many requests for the current server. Also, OnUpdate isn’t really a good solution for the user auction example which might have large numbers of keys/pages nor example 1 because I can’t use OnUpdate for every single user who’s played the game.

1 Like