Need clarification on datastore write cooldown

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I would like to know whether datastore write cooldown is per key or per game

  2. What is the issue? Include screenshots / videos if possible!
    I currently don’t have an answer

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i have tried looking it up on the dev hub

It’s per transaction. It is fine to write a large data object or table to the store in a single transaction, but if you write them to the store in a series of transactions you will trigger the cooldown. Generally, games use an auto-save every 5 minutes or so, rather than saving every time some little thing changes for a player.

so if i change a key with a name of “A” i can change a key with the name of “B” right after?

Very misleading answer…
He is talking about the rate limitations not size limitations

The rate limits are per game, not per datastore / key

Also most games dont autosave every 5 mins… they save on .PlayerRemoving() and on :BindToClose() and thats what everyone should do, although i recommend using something like ProfileService to handle it all for you with session locking etc

EDIT:

To clarify the limits,
You get 10 requests (SetAsync) per min per CCU (concurrent users) + 10 (off the top of my head might be inaccurate)

so if you have 10 CCU you get 110 requests per min

If you have 15 CCU you get 160 requests per min

If you have 150 CCU you get 1510 requests per min

1 Like

Here’s the docs page on datastore throttling with the full set of specs…
DataStore API | Roblox Creator Documentation

And if you do not periodically autosave, you run the risk losing a player’s progress should something unforeseen happen, like the server crashes. You should auto-save. Even rock-solid games like Minecraft periodically auto-save by default.

my question is about the 6 sec cooldown between write requests, not the max amount per min

There is no 6 second cool down between requests

All “limits” specified in the devhub are for calls, whether they are using the same key or not.

The 6 second limit (which is not actually a limit, it will just get added to the queue), is for requests with the same key

You can use :GetBudget to see if you can save such things

1 Like

Not really

AutoSave is crucial since :BindToClose cannot run when a server has crashed

(ProfileService does this really good as you said)

1 Like

Yeah I didnt mean that autosave shouldnt be done, i was saying that it shouldnt be the main form of saving and you should rely on PlayerRemoving and BindToClose (which be didnt mention in his comment, making it seem like autosave is enough)

1 Like

The cooldown is one read/write operation per ‘DataStore’ key every six seconds.

1 Like