question

John avatar image
John asked

Are there limits to cloudscript api calls in free tier?

Hi. I would like to know if there is a limit to cloudscript api calls from users in free tier

apisCloudScript
10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

Technically, nothing can be "unlimited" regardless of what type of agreement you have with us, since there will always be a limit somewhere. In the case of Cloud Script, there are a few different ways it can be called - from the client directly, via a PlayStream action, or from Photon Realtime as a webhook. Assuming you mean directly from the client, the default free tier limit on total CPU time for any given Cloud Script call is shown on your Settings->Limits tab (currently 5 seconds). In terms of how frequently you can call a Cloud Script from the client, as long as you're waiting for the response from the previous call, you could make a few calls in sequence. But over the lifetime of the player session, the calls should average out to something like a couple per minute (per player).

Cloud Script is designed for small, lightweight logic. If what you need is more of a realtime updating system where the player is frequently updating some data, you should have a look at using a custom game server, so that you can pull all the data needed for the player session, updating the client as often as needed while updating the backend data only periodically (when key points are reached in the gameplay experience, or after a couple of minutes otherwise).

4 comments
10 |1200

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

Thiago Lopes Rosa avatar image Thiago Lopes Rosa commented ·

What does the current "15" limit mean from the "Number of PlayFab API requests made from a CloudScript function called by the ExecuteCloudScript API"? Is it per second? Is it per client? Is it per session?

0 Likes 0 ·
brendan avatar image brendan Thiago Lopes Rosa commented ·

The limit on the number of API requests is specifically the number of Server API calls that can be made from a single Cloud Script execution pass.

0 Likes 0 ·
Kendrick Villaruel avatar image Kendrick Villaruel commented ·

Hi, are the limits counted per player?

0 Likes 0 ·
brendan avatar image brendan Kendrick Villaruel commented ·

In general, yes, though currently the Client API is limited based on the IP Address of the caller, specifically.

0 Likes 0 ·

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.