question

v-throch avatar image
v-throch asked

Client throttled caused by WritePlayerEvent

Hello,

I get the following error on most of my attempts to send telemetry data

API_Call_Failed for: /Client/WritePlayerEvent

The client has exceeded the maximum API request rate and is being throttled

The funny thing is we did not change anything related to the way (or the frequency) we send custom in-game events, and we used to be able to send them without getting such errors.

I even realized that the very first attempt to send an event, after booting the game, results in this error.

I've seen some throttled-related situation in this forum, but all related to GetUserData, which is not the case here, we are simply trying to send custom game events through the following code:

PlayFabClientAPI::WritePlayerEvent( request, WritePlayerEventCallback, SharedFailedCallback );     

PlayFabApiWait();


Have anyone encountered such an issue ?

Thanks !

Thomas

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

·
Andy avatar image
Andy answered

Regardless of any other limits, we currently allow an upper bound of 100 API calls from an individual client IP in a 2 minute window. If you're exceeding that, a client sending from that IP is going to be throttled for a little while before being allowed to send again.

This quarter we are working on our updates to our Data Warehousing (mentioned in our blog). Once that's ready, we'll have a lightweight way in which to send large quantities of client telemetry that won't run afoul of our throttling logic.

3 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.

Andy avatar image Andy ♦♦ commented ·

To clarify, the reasons these limits are in place is to ensure the performance of the service for all titles. Hammering the service at the maximum allowed rate for prolonged periods of time is still abusive behavior and may result in titles being taken offline. Request volume requires infrastructure and infrastructure costs money. So long as everyone is doing their part to optimize their side, we're able to keep costs down for everyone.

0 Likes 0 ·
circadence-rd avatar image circadence-rd Andy ♦♦ commented ·

Is this based on Client IP address only or does it also take into account client ID (token)?

I.E. if you have an app making say 75 requests per 2 mins, which is less than the limit, but 4 people are playing on the same wifi network with the same public facing IP address, will you hit a limit?

A very real case could be an enterprise app in which 1000 employees are playing a training game together a ACME corp on the corporate network all with the same public IP...

0 Likes 0 ·
Andy avatar image Andy ♦♦ circadence-rd commented ·

What matters is the public IP address of the device, not token or client session ticket. In practice, most commercial networking gear employed by companies has a range of IP addresses over which is spreads traffic. Home networking situations might be an issue but we've rarely seen it in practice as long as you stay well below the limit on average, with periodic bursts that approach the limit. That, and a good retry policy.

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.