I have tested DataStore rate limits thoroughly and found that the documentation is outdated.
For Get and Set operations I’ve observed that a game server can accumulate a total of 180 + Players * 120
of backlog operations, and gains API calls proportional to the number of players in the game server every second.
I’ve also observed that the individual key throughput limits aren’t based on data size but rather just frequent requests to the given key. They are also not limited in all game servers but rather each game server has it’s own rate limiting for individual key requests.
I’ve tested this in both a populated game (Around 40 CCU) and a private game, both provided the same results
Code used to test rate limits
local DataStoreService = game:GetService("DataStoreService")
local DataStore = DataStoreService:GetDataStore("DataStoreTest")
local Options = Instance.new("DataStoreGetOptions")
local RequestTypes = Enum.DataStoreRequestType
local err
local success = true
Options.UseCache = false
for i = 1, DataStoreService:GetRequestBudgetForRequestType(RequestTypes.SetIncrementAsync), 1 do
--for i = 1, DataStoreService:GetRequestBudgetForRequestType(RequestTypes.GetAsync), 1 do
if not success then
warn(err)
print(i)
break
end
task.spawn(function()
success, err = pcall(function()
DataStore:SetAsync("Test", string.rep(math.random(0, 9), 4194301))
--DataStore:GetAsync("Test", Options)
end)
end)
end
To observe the rate limit recovery rate I just used the developer console datastore tab.
Page URL: https://create.roblox.com/docs/cloud-services/data-stores/error-codes-and-limits#server-limits