question

tringuyen1204 avatar image
tringuyen1204 asked

Profile Read/Write Counts in new pricing system

The profile Read/Write API like GetTitleData or UpdatePlayerData with multiple keys are counted as 1 or multiple R/W in pricing system? I'm a little confused with new pricing system and struggle to optimize the usage so far

apispricing
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

Each KVP (key/value pair) is separate, for purposes of calculating the total meter usage. But please be sure to review the example in the pricing documentation (https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/meters/meters#example). The meter "ticks" for profile represent 1KB of data, averaged for the month.

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

Choi Yan Lok avatar image Choi Yan Lok commented ·

@Brendan

I am still a bit confused.

So does this means that if I call "GetTitleData(null)" and retrieve all my 100 title data KVPs (Total size = 10kB), it will be a total of 100 profile reads?
But according to the doc, it doesn't state that each KVP counts as a profile read. In that case, would it be 10 profile reads (1 call * 10kB) instead?

Thank you

0 Likes 0 ·
brendan avatar image brendan Choi Yan Lok commented ·

This looks like another follow-up that came in while AnswerHub wasn't sending out email notifications, so apologies for the delay on completion, here.

The answer is that when reading data, it's the total size of the data returned, regardless of the number of KVPs. It's when you're writing data that it's counted per KVP. So reading 10 KVPs of 1KB each is 10 "ticks", as is writing 10 KVPs of 1KB each. But in the case where each KVP is 1.5 KB, reading 10 of them would be a total of 15 KB, or 15 ticks, while writing it would be 2 ticks per KVP (since each is over 1KB, but under 2KB) - 20 ticks.

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.