SetAsync limits question

Hi, I was going over the Data Stores article and had a few questions.

  1. The article states that for server limits SetAsync requests per minute is “60 + numPlayers × 10”. So, for example, if I had a server of 25 players, the limit would be 310 requests per minute. Meaning, if I wanted to push data for each player if, say, the server shutdown, this would be no problem? (I think)

  2. In addition, the article lays out “Experience Limits”. It states that SetAsync is on a 6 second cooldown? Does that mean, if the server shuts down, I need a 6-second wait time? That doesn’t really make sense to me.

Thank you.

1 Like

Data Stores | Roblox Creator Documentation is link to the article

Asking mainly because I am getting the SetAsync request dropped. Request was throttled, but throttled request queue was full error

i said “useless” because I tried that module, and there isn’t ProfileService:SetAsync() and I asked for help and I didn’t get a response from loleris,

I do use it too, but it has a limit as you show that the article shows a datastore limit

This means it’s ok to use it for a small game, but it’s VERY BAD for MASSIVE GAMES

Its just depends on how often you are saving the players data into DataStore.
Depends on how big could be your servers, how many requests you are sending to DataStoreService. Exactly when you are handling this? on a loop each certain amount of time? when players leaves?

Glad you are not using thet Profile thing stuff. Its way better you can handle your own database without depending those tools

Is it really that bad though? If your reaching the rate limit on it then the way you manage your data is clearly bad. Really max you should be only really have a few datastores (for example one for the player stats, one for global stats or whatever u need). Then really all you would need to use SetAsync is when a user leaves the server so I don’t see how massive games should be reaching the limit. Also it is request per minute so how the hell are you going to meet the limit on that? Max you should be doing is saving data ever 5 minutes or something to reduce the chance of the code messing up if you don’t just save when a player leaves.

You mean using DataStores is BAD for massive games?..

That has no sense cause Profile"Service" thing uses datastores… that thing its just the easy way for someone that doesnt understand how DataStoreService works…

The limit is per key, meaning if you’re setting to the same key, you need a 6 second cooldown. However if they’re different keys, the cooldown is separate.

1 Like

You just modify the Profile.Data table, and call :Release() on your profile when the player leaves, ProfileService will handle saving.

It is what @LukaDev_0 said, if you read the documentation you can see it says per key.

This should not massively affect you because there is a low chance your going to set the same key many times in a row (and leaving would be diffrent keys you set for each player).

2 Likes

@LifeDigger @Dev_Peashie

it’s bad for massive games such as Blox Fruits. also by “massive games” I mean games with 100 players or more like the ones down below

games with 100K+ player count

(the circled part is the player count)

You do understand the limit is per server right? It is not per experience so still this would not affect anyone. Reason why it is called “Server Limits” not Experience Limits :laughing:

Even with games that have a large server number, due to the limit being based on a calculation rather then just a fixed limit as the server number increases so does the amount of requests you can send causing no issues.

3 Likes

Im not against using ProfileService… but, thinking that you cant handle a “massive game” without using it has no sense… I handled a game with 50k players without any issue without using ProfileService, its just about how you use the DataStoreService and if you understand how it works…

To me, using those tools its just being lazy on understanding how things works, “massive”, yeah, lets create a module that makes your game “massively popular” if you use it, things are easier to achieve your goal…

2 Likes

Wrong order of operations. It would be 310 requests.

@LifeDigger @dev_peashie

ok, I get it now, i mistaken myself… and I meant it was bad for games with a lot of players in one server…

1 Like

Using DatastoreService its not bad for 10m players splitted in thousands of servers, its not bad for a server that has a large amount of players too, it just depends on how you use DataStoreService. ProfileService its just a smat use of Datastore skills, at the end if you create your own “ProfileService” you are safe.

That calculation is unfortunately not right. According to math you need to follow the PEMDAS rule which means the calculation is actually done as such: 60 + (numPlayers x 10) which means if you have 25 players the final answer is 310 requests per minute.

This would not be a problem since you’re not saving twice on the same datastore key. This is assuming of course that your datastore keys / indexes are the players user ID (which they should be). Otherwise you’d run into the 6 second cooldown.

For that you’d want to create each coroutine task in the BindToClose ‘handler’ method which leaves the games shutdown signal to yield for a set number of seconds. This would save the data asynchronously because you’re running the saving logic within coroutines which are separate threads. This way you’re not synchronously saving and waiting for each players data to save until you move to the next player to save their data, it becomes incredibly slow.

So in a nutshell your game won’t shutdown for say 30 seconds which leaves plenty of time to save all the players data.

hahaha yea i wrote it very early in the morning… no excuse tho. fixed

i put a quotation mark because there isn’t ProfileService:SetAsync()

i checked through the scripts and the key is only being changed once. i can add a 6 second cooldown to be safe… but…

someone told me it’s since globally the queue is filled up which makes more sense, but even then…