I have some code that executes in ChallengeStartedMessage (User) that sends 2 LogChallengeEvent requests that are used to default the challenge leaderboard with the default values for these events (I use 2 events because of relatively complicated reasons that are very game specific).
The problem I'm running into is that in the preview environment I'm hitting the 10 API requests/s cap as soon as a challenge starts with 4 or more players in it (it takes 4 requests just to join a challenge and 3 of those happen in cloud code based on the client sending a Join Challenge event). This means that I'm sending 12 requests off the back of 1 event being sent from a client and 11 of those are triggered from within cloud code.
Given that I want to be able to have up to 32 players in a single challenge and that multiple challenges might be happening at once (sure the odds of them starting at exactly the same second are low but not impossible) it seems clear that I will hit the 100 api requests per second cap in the Live environment just from starting a challenge.
Is there any way I can initialise a challenge leaderboard so that every player has an entry without needing to use a request per user? Even if I offloaded this to the game client it's still highly likely that all of the clients would send their first requests during the same second and a bunch of data wouldn't get initialised.
Actual gameplay would at most send 1 request every 3 seconds (and it's far more likely to be far less often than that) so it's only when the challenge starts that I'm running into this cap.
It's a huge shame this is a per-game cap and not a per-user cap because it's basically impossible to work around a per-game cap but it's not impossible at all to stay under a per-user cap. Even if it was 10 api requests per second per user I could easily stay under that even in the Live environment but 100/s for the entire game means that it only takes 100 players trying to login at the same time to knock the game offline.