DataStore Limitations (Specifics)

I’m wondering exactly when the DataStore limits reset? Do they reset all requests at once after a minute, or is each individual request timed for a minute? I guess I’m asking if they reset all at once or per request?

I think this is what you’re asking, I’m assuming.

1 Like

I was asking for more specific details on when a request limit ends. It says that a certain number of requests are allowed per minute, but how does that work specifically? Does the countdown start the moment the first request is made? Does it start every minute using os.time? Or is each request timed separately before the cooldown ends?

I’m just wondering if anyone already has the answer to this so I wouldn’t need to test it myself.

1 Like

The cooldown starts once you make a request (as that’s how I would make it, so it probably works that way).
If further requests are made within that cooldown time (read about the cooldowns above), the requests will be put on hold (yield).

If the request queue fills, the request(s) will be dropped, which is something you don’t want when working with datastore.

1 Like

Is that tested? I may be working in a situation where requests are made constantly and rapidly and I’d like to find the exact details so that I can deal with it accordingly.

Although I suppose I could bypass this by simply using a custom queue list.

You can test it if you want, however I believe it works the way I explained it, as you’ll receive a warning once you make a request within the cooldown time.

And yes, you can implement your own cooldown/queue to avoid players spamming requests if you have a system that allows them to (ex, playerlookup, ban, unban, which relies on datastore).
Mainly for staff purposes though, never seen any other reason to implement this.

2 Likes