I have read the page on the wiki for GetRequestBudgetForRequestType and tested its output in my datastore script after I set to the datastore.
From the information on the wiki I don’t know if I fully understand what it returns and how the Datastore Limits work. The budget and Datastore limits just don’t seem to match up.
Could someone elaborate on the limits and this budget number?
SetIncrementAsync is the budget for write operations (Set and Increment, presumably also Remove which was added later). SetIncrementSortedAsync is the budget for these operations while working with an OrderedDataStore. Taken a look at the DataStoreRequestType page?
As for these numbers, they’re the budget you have for each request (GetRequestBudgetForRequestType). This means how many more times you can perform a certain operation before requests start getting queued.
I understand what the Enums mean and how they correspond to the datastore requests. What I don’t understand is what the number that GetRequestBudgetForRequestType returns actually represents. And what that number means in relation to the Datastore Limits.
This is all explained right on the documentation page of the function.
The returned numbers are your budget - this is made apparent by the function’s name, GetRequestBudget. These numbers determine how many requests you are allowed to make per minute. If you exceed the number in a minute’s worth of requests, your DataStores will throttle.
The budget calculations come from the linked page, DataStore Errors. Each of them follow the pattern (base) + (players * n). The result of this equation is what you get from the GetBudget function.
After investigation, this function needs better documentation. It seems to return the amount of requests remaining before something gets queued, not the requests you receive per minute. It seems the allowance carries over a bit, into values up to x10 as high as the per minute limit, to give you a buffer zone.