Increase GetSortedAsync throttle limit

Situation:

  • Game start, call GetSortedAsync 14 times, page size 20, to get the top scores for each racing map.
  • After a round, if someone beats one of the top 20 cached scores, I update & call GetSortedAsync for that map.

The limit right now is (5 + numPlayers * 2) which is really small compared to the other limits.

This means I have to stagger the requests arbitrarily or this happens:

blob.jpg

It’s very common to have 1 person in a server, public or private. Having to wait 2-3 minutes just to view all of the boards is not good.

Edit: It might be web-side throttling instead of client, this is weird

Same errors using https

those are different errors

I know increasing limits would be nice and all, but have you instead considered putting all the top scores in a single key?

Wouldn’t that exhaust the per-key Global Request Limit?

You wouldn’t store everyone’s best time in that key, just the 5 best ones. How often is a global record set? Your game has been running for a while – I would imagine a new record gets set once in a blue moon.

You could store each player’s best time in a key separate from the global records key.

Records are broken all the time and it shows top 20 or so for each of the 14 maps.

Each player has 1 table of 14 map names & corresponding times. (So it loads their own best time in case they’re not on the global leaderboard for them to see)

Each map has 1 best-times table each, which uses getsortedasync to get the times, outlined in the OP.

Roblox’s arbitrary limits with getsortedasync just didn’t take into account a racing game with multiple maps.


So you’re suggesting I switch from using getsortedasync (orders a list of loose keys in one go), to this?:

On server start:
14 GetAsync requests, each getting a table of best times for each map.

After someone finishes a race: [no change from the way it’s done now]
1 UpdateAsync, gets table, checks mapname in table if its personal best time should be updated, returns table if it is.

If someone beats a cached time in the server:
1 UpdateAsync, gets table, update+return if they’re already on there, or delete slowest+insert this person, returns table.

Tryin to work the math out here. Looks like it might work out o:

1 Like