question

Choi Yan Lok avatar image
Choi Yan Lok asked

Pricing Meters: Each KVP counts as a single profile read/write? What about non-KVP data?

According to the pricing meters page:

- There's no explicit mention that each KVP is separately calculated for the purpose of pricing

- It gives me the impression that as long as the total response size is < 1KB, even if I requested 100 keys in a GetTitleData request, it will be equal to 1 weighted profile reads.

.

However, after reading some more forum posts, I found that

- Each (Title/Player data) KVP is separate, for purposes of calculating the total meter usage

Which means that even the total response is < 1KB, requesting 100 keys in a single GetTitleData request will be counted as 100 weighted profile reads. (Assuming that the average size of all profile reads is 1KB for simplicity sake)

.

But what about non-KVP data? For example:

- In our game we have over 200 statistics, does calling a GetPlayerStatistics(StatisticNames = null) will resulted in 200 profile reads?

- How about GetFriendList? does each friend, or even each ProfileConstraints counts as a single profile reads?

.

The answer to the above questions will have a significant influence on how we structure our data and requests. (e.g. Using a large JSON instead of multiple JSON).

Unfortunately, none of the above info could be found in the pricing meters page, and relevant information is scattered across the forums. Despite having read the forums for a week, I am still very confused about how exactly is the pricing calculated.

It will be great if this information could be clearly mentioned in the pricing meters page to prevent any misinterpretations.

.

Thank you,

Chris

1 comment
10 |1200

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

Choi Yan Lok avatar image Choi Yan Lok commented ·

BTW sorry for asking so many questions recently. I am just so confused about the new pricing model...

0 Likes 0 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

As mentioned in this doc: https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/consumption-best-practices#data-and-statistics

“Each key value pair in a call to update User Data is counted separately. For reads, this 1 KB calculation applies to the total data returned, regardless of the number of key value pairs. This means that writing 10 keys of 100 bytes each is 10 "ticks" of the profile write meter, since each key value pair write is a minimum of 1 KB, while a read of those 10 keys is 1 "tick", since it's a total of 1 KB.”

So this means that when reading Title/Player Data, meter count increases by 1 for every 1 kB of the total data returned, however, meter count “ticks” for every key value pair when writing.

For Statistics reads, “you can think of each statistic updated as incrementing the meter by 1, while reads are based on the total size of the data read in each call

https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/consumption-best-practices#data-and-statistics

And similarly, for GetFriendList, reads are based on the total size of the data read in each call as well.

1 comment
10 |1200

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

Choi Yan Lok avatar image Choi Yan Lok commented ·

Thank you for the clarification. I have no idea how I could have missed it in the first place...

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.