question

alejandroguillen avatar image
alejandroguillen asked

CDN API call limits,CDN API call limitations

I am calling GetContentDownloadUrl A LOT at the start of the game. I am downloading and caching around 500 images from the CDN, so on the first session all of these images will be downloaded.

Now, PlayFab guidelines say I should not exceed 3 api calls per second, but this is impossible, it would make the download process too long.

Right now I'm not running into problems despite exceeding the amount of suggested API calls/sec. But I worry this could become an issue in the future. Any suggestions?

,

I am calling GetContentDownloadUrl A LOT at the start of the game. I am downloading and caching around 500 images from the CDN, so on the first session all of these images will be downloaded.

Now, PlayFab guidelines say I should not exceed 3 api calls per second, but this is impossible, it would make the download process too long.

Right now I'm not running into problems despite exceeding the amount of suggested API calls/sec. But I worry this could become an issue in the future. Any suggestions?

apislimits
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sarah Zhang avatar image
Sarah Zhang answered

If you use the client API GetContentDownloadUrl, as you said, in a more complex production environment, your clients have a high possibility of exceeding the maximum request rate limit. This thread -- The client has exceeded maximum api requests - Playfab Community is an example of the error -- “APIClientRequestRateLimitExceeded”.

If you use the server API GetContentDownloadUrl, although the server API has higher API request rate limit, we will still suggest you reduce the number of the calls to reduce unnecessary consumption. Please check this document, especially this section -- PlayFab Consumption Best Practices - PlayFab | Microsoft Docs for more details about how to reduce content’s consumption.

For your case, we would suggest you reduce the requests of API GetContentDownloadUrl to optimize the performance and consumption. You can consider wrapping your images in one zip package or several packages to reduce the number of files. If so, you would need to unzip the packages in the clients. Besides, if your images are used as the textures, you can also merge a part of them into texture atlas (https://en.wikipedia.org/wiki/Texture_atlas) to reduce the number of image files.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Heather Jones avatar image
Heather Jones answered

If you have a very limited number of people that you feel will be using your title, that may work for you. But I do need to caution you that doing this creates a horrible player experience if your game has any significant user population. Basically, once you hit the 100K player account level, everyone trying to play your game for the first time - or return to it from having taken a break, if you're deleting player accounts in order to stay under that number - will simply not be able to sign in. You're likely to see a high percentage of downloads that abandon the game, in that case.

Also, as an aside, I do need to point out that Development Mode is only free for the Core services. Use of CDN, Party, or game server hosting would be charged at the normal rates (though you do get some limited use of Party and game server hosting for free - the docs have all the details on this).

For 2, the short answer is that you should aim to have no more than a few API calls per client, per minute. If you're running into API call rate or data update rate limit errors, that means you're making a level of calls that's excessive enough that we'll have to move your title to a quarantine vertical if that goes on for a non-trivial amount of time (to prevent any performance issues to other titles). The quarantine vertical is far more strict about rate limiting than the main vertical, so you'd see error rates increase. - forwarded from similar question in forums, hope it helps.

,

Hello I found this in the forum, hope it helps. If you have a very limited number of people that you feel will be using your title, that may work for you. But I do need to caution you that doing this creates a horrible player experience if your game has any significant user population. Basically, once you hit the 100K player account level, everyone trying to play your game for the first time - or return to it from having taken a break, if you're deleting player accounts in order to stay under that number - will simply not be able to sign in. You're likely to see a high percentage of downloads that abandon the game, in that case.

Also, as an aside, I do need to point out that Development Mode is only free for the Core services. Use of CDN, Party, or game server hosting would be charged at the normal rates (though you do get some limited use of Party and game server hosting for free - the docs have all the details on this).

For 2, the short answer is that you should aim to have no more than a few API calls per client, per minute. If you're running into API call rate or data update rate limit errors, that means you're making a level of calls that's excessive enough that we'll have to move your title to a quarantine vertical if that goes on for a non-trivial amount of time (to prevent any performance issues to other titles). The quarantine vertical is far more strict about rate limiting than the main vertical, so you'd see error rates increase.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Heather Jones avatar image
Heather Jones answered

also found this best answer for vertical quarantine

Best Answer

Answer by SethDu Sep 11, 2019 at 07:32 AM

It depends, but usually, it only affects the player who is making exceeding calls. For example, Player A calls UpdateUserData too frequently and failed callback will be received but it doesn’t affect Player B’s any actions. However, if you using Server API to call same API too frequently, like UpdateUserData, you will be unable to make that call for a while.

Another thing is if there are too many CCU players and the title is exceeding a safe limit on usage (excessive calls per player), this title will be moved to a "quarantine" server vertical we manage, to prevent causing any issues to other titles. In that case, response times may grow significantly, as that vertical does not have the same level of resources as the primary PlayFab service vertical, including Cloud Script calls.

Like 0 Add comment Reward user Share

avatar image Talha Sep 11, 2019 at 02:06 PM 0

"if there are too many CCU players and the title is exceeding a safe limit on usage (excessive calls per player), this title will be moved to a "quarantine" server vertical we manage"

Hi so the questions that arise are

1) what is the safe limit? (like Per minute safe limit)

2) if there are insanely high DAU for a title, Does playfab provide temporary throttle exemption if asked?

3) In Our game we are not using updateuserdata frequently but the only issue is the api call (Getleaderboard) we have restricted the user to 5 times in 1 minute (and if limit exceeds we freeze the button for 30 seconds).

so far in our game the limit we set is 9 calls per minute. We've designed the game in such a way that limit never exceeds 9 calls per minute.

Is that cool?

When the DAU increases will this 9 calls per minute limit come to bite us?

avatar image SethDu ♦ Talha Sep 12, 2019 at 07:08 AM 1

I don't know what's your current subscription tier but "title being moved to a "quarantine" server vertica" only occurs on Essential Tier titles.

1)The specified safe limit is not given, usally it depends on many factors, but I will consult the team and will keep you updated later.

2)Since payed tier users are able to create dedicated support ticket and can get responses very soon. I don't believe it will work if you post a thread on the forum to ask for that. The expected response time on the forum is longer than support tickets'.

3) 9 calls/min looks fine but also check the limits in your Game Manager. You should have a brief idea about DAU and MAU of your game, and also consult sales team before the game releases.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.