question

Robert Baily avatar image
Robert Baily asked

Can an API called from within CloudScript be throttled?

We've had a few users report that they've lost some data. I'm trying to track it down and I'm wondering if an api called from cloudscript can be throttled. If we do something like this:

response = server.GetUserData()

let data = response.Data[key] === undefined ? [] : JSON.parse(response.Data[key].Value;

<modify data>

server.UpdateUserData(data)

Is it possible that the server.GetUserData() call is throttled and fails? Our old data would then be lost when we save the updated data.

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

It's possible, though extremely unlikely. The legacy Server API calls are limited to 1,000 requests per 10 seconds. But since that's per IP address, and the legacy Cloud Script servers are standard V8 engines running on VMs, it's not really possible to have that kind of call rate unless you're making the call multiple times in a single script - which wouldn't make any sense, since you can retrieve all of a player's key/value pairs in a single API call.

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.