question

Gabriel Nordholm avatar image
Gabriel Nordholm asked

Concerns with fetching Player Data of a large amount of players

We are looking to aggregate statistics from data we place in each player's Player Data (Title). To do this, we will need to fetch the Player Data of a large amount of players.

We are using segments to identify the players of interest (last login), and plan to use the GetPlayersInSegment server API to fetch the IDs of those players. However, this only narrows it down to roughly 300 thousand players.

Due to that request not containing the Player Data we are looking for, we will be forced to individually call GetUserData for each player in said segment. That means that we will need to make around 300 thousand requests.

Looking at the forum's existing posts, there are some suggestions for alternatives such as moving the data into events or objects, but this is not an option for us. Keep in mind that this is a one-time thing, and as of right now we cannot make any changes to the client.

  • Are there any alternatives we have not yet considered?

  • How do we accomplish what we're looking to do, without unnecessary load on Playfab? Can this be done in batch, somehow?

  • Are there any relevant ratelimits we should be aware of? Any recommendation for request delays or other limits?

Player Data
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

·
Simon Cui avatar image
Simon Cui answered

Are there any alternatives we have not yet considered?

Currently there is no single API to batch get data for all players.

How do we accomplish what we're looking to do, without unnecessary load on Playfab? Can this be done in batch, somehow?

You can customize an admin tool using GetPlayersInSegment and GetUserData to retrieve all players’ data in segment. You may have to call it one by one.

Are there any relevant ratelimits we should be aware of? Any recommendation for request delays or other limits?

There are no hard limits on Server/Admin APIs. But I suggest you not calling APIs too frequently, in case of throttling.

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.