question

cheloveck20 avatar image
cheloveck20 asked

Global Counters and PlayFab's Multiplayer Max Players

Please give some insight about PlayFab philosophy.

In my project I'd like to have multiple global counters. I don't need low latency update of such counters, just the ability to have them. Does PlayFab still lack these features?

If no then: I familiar to suggestions to use Redis for such purposes. But I don't want that huge number of users will have direct access to some external service. So I have to somehow redirect user requests to redis indirectly.

So I see few directions: 1) Does PlayFab have some possibility to launch some script, or even some C++, every time user data update triggers or periodically. This chunk of code suppose to increment Redis variables and load updated values to user data and notify user client about this updates. 2) If first is impossible I believe I need to have Multiplayer Server, that will do this job. I saw some table about max possible players for PlayFab servers, but all numbers were not higher than "64". Does it allow to have at least a thousand connections to one server? If I will have potentially millions of users, and I don't have any grouping criteria for them, will I be able to distribute all players to available servers?

multiplayer
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

·
Neils Shi avatar image
Neils Shi answered

PlayFab has Title Data, but it is best suited for Global Constant/Static Data and is not suitable or reliable as Global Variables, because Title Data values are copied and distributed to potentially hundreds of machines in the PlayFab server cluster, as part of this process, Title Data is cached, and changes may take up to fifteen minutes to refresh in those caches. If this doesn't meet your needs, you'll need to use an external database, like Redis. PlayFab has Rule which can trigger action when a specific event occurs. You can trigger Azure Function as an action and update Redis inside it.Regarding the MPS, please note that PlayFab Multiplayer Server is designed for session-based and it is not suit for long time running. You can refer to Multiplayer with PlayFab - PlayFab | Microsoft Learn for more details about the multiplayer modes supported by PlayFab.

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

cheloveck20 avatar image cheloveck20 commented ·

Thanks for the reply.

I have done some sample coding. So now I am developing Azure Function (AF) that by using Playfab Server Api (PSA) gathers updated data from all players, then makes calculations with it, then updates data of all players by using PlayFab Server Api.

I'm counting on changing time interval of AF according to number of players. But will this approach work theoretically? Will PSA allow me to poll a million accounts and update some data on those accounts per hour or per two hours?

0 Likes 0 ·
Neils Shi avatar image Neils Shi cheloveck20 commented ·

We do not recommend that you poll one million accounts every hour or two hours and update their data, this will result in a large number of API calls and may exceed the limit of API requests.

0 Likes 0 ·
cheloveck20 avatar image cheloveck20 Neils Shi commented ·

What is a actual limit for number of calls per what period? I just need one get and one update call for every user per some period.

0 Likes 0 ·
Show more comments

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.