question

MoonHeonYoung avatar image
MoonHeonYoung asked

pricing question

1. document says read/write api is weighted 1kb per key.

if so For example, when i using the read api , getTitledata , if i retrieve 10 keys, is it using a 10kb meter? ( or 1 kb per call ??)

and...

2. on the homepage pricing says read/write is metered per million call

this means for example my billing summary - 1.02M reads means 1,020,000 read call??? (or 1.02 mb??)

so

is the pricing measured by the total number of reads/writes?(not like 1kb size unit??)

million means 1000,000? (not 1000kb = 1mb , 1000call = 1m call ?)

If it is priced by the number of times, why did you explain that the read/write is weighted as 1kb?

That is, does the mentioned 1kb have no meaning in pricing?

3.Are updating one key and updating 10 keys measured differently in one call?

( 1 key call = 1 tick , 10 key one call = 1 tick ?? )

4.Among write apis, do update statistic and updateUserData consume the same cost?

(That is, if it is the same one-time cost , to save more data by reducing the number of statistic calls and increasing updateUserData ) same weight ? ( each 1kb ? )

5.The size of the player data that I want to update frequently is 36,719 bytes (36kb)

When I asked this question on the forum before, I got the answer that the size of player data doesn't matter.

so When I configure the logic to automatically save data of this size every 20 seconds, is there any effect on the price? (Or does it only affect the total number of saves?)

(That is, to avoid dataUpdateExceedlimit, we try to store the data in a different key, rather than splitting it. So I want to know if data value size is an issue.)

10 |1200

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

Rick Chen avatar image
Rick Chen answered

>> If so, does my current logic of updating 37000 bytes every 20 seconds have the biggest impact on writes?

If your logic keeps running without break for 30 days, that would be 37 (ticks per 20 seconds) x 3 (make it 1 min) x 60 (mins per hour) x 24 (hours per day) x 30 (days) = 4,795,200 writes.

>> Is "$7.15 per million writes" calculated based on the amount of ticks, not the total number of writes call?

Yes, it is based on the ticks. So the total would be 3.16M writes x $7.15 per million writes = $22.594

>> In the billing summary, does "Profile: Storage" mean the sum of player data and statistic size of all players in the title?

According to this document, the Profile Storage is metered based on the average total volume of profile data hosted by PlayFab across daily snapshots, which includes player data and statistic.

>> I want to find the user with the most write/read calls.

Many read/write API call could generate events. You could go to your [Game Manager] -> [Data] -> [Data Explorer (basic)], in the [Query] -> [Group by] field, choose [Entity_Id] and Run. This operation should show you the chart of events amount that was generated by players.

>> In the billing summary, "Events: PlayStream" means, WritePlayerEvent api and ExecuteCloudScript Api with GeneratePlaystream = true ?? Are they above two api?

These two API could generate PlayStream events. But there are more actions that can generate PlayStream events as well. You could refer to this document PlayStream Event Model reference and see how the events could be generated.

>>Is there any way to reduce the amount of "ticks"?

You could remove unnecessary data as much as possible and design a way to compress the data into fewer bytes. For example, “{x:10,y:3}” with x and y ranges in (0-15) could be encoded to “A3” (in Hexadecimal), where we know that the first byte is always x and the second byte is always y. You could reverse the process and decode it when you want to retrieve the data.


player-events.png (36.9 KiB)
10 |1200

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

Rick Chen avatar image
Rick Chen answered

    >>when i using the read api , getTitledata , if i retrieve 10 keys, is it using a 10kb meter?

    According to the PlayFab Consumption: Best Practices document, the reads and writes are different. For reads, the 1KB calculation applies to the total data returned, regardless of the number of key value pairs. If the 10 keys are 1KB in total, then it would be 1 tick of the profile read meter. But 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.

      >>is the pricing measured by the total number of reads/writes? If it is priced by the number of times, why did you explain that the read/write is weighted as 1kb? That is, does the mentioned 1kb have no meaning in pricing?

      Yes. 1 million reads means 1,000,000 ticks in read meter, not 1 MB. The document is just explaining how a tick of read/write is calculated, which is based on the usage of data. The tick is not simply calculated by the number of calls, but the amount of data in those calls. For example, if you have 1 read call that returns 2KB of data, then it would be count as 2 tick, not 1 tick.

      >>Are updating one key and updating 10 keys measured differently in one call?

      Updating keys may count towards write meter. Then theoretically, there could be no difference between 10 writes of 1 key each with 1 write of 10 keys. But it is recommended to make as fewer call as possible.

        >>Among write apis, do update statistic and updateUserData consume the same cost?

        Theoretically, if the data size is the same, the cost will be the same. But the player statistic can only store numbers as value, and it is public by default, meaning other players can read it if they want.

          >>When I configure the logic to automatically save data of this size every 20 seconds, is there any effect on the price?

          Yes, the data size and the update frequency would affect the cost. The update of 36,719 bytes in a key value pair would be count as 37 ticks of write meter. Updating every 20 seconds means 3 updates per minute, that is 111 ticks per minute. You mentioned that you got an answer on the forum saying the size of player data doesn’t matter, could you please provide the link to that thread?

          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.

          MoonHeonYoung avatar image MoonHeonYoung commented ·

          1. Then, in my game where there are not many users,

          "3.16M writes" (billing) occurred.

          If so, does my current logic of updating 37000 bytes every 20 seconds have the biggest impact on writes?

          2. if so,

          Playfab Main Homepage - In the description of the Pricing tab,

          Is "$7.15 per million writes" calculated based on the amount of ticks, not the total number of writes call?

          3. In the billing summary, does "Profile: Storage" mean the sum of player data and statistic size of all players in the title?

          4. I want to find the user with the most write/read calls.

          (The user who generated the most cost) I

          s it possible? Because it can maliciously send many apis.

          5. In the billing summary, "Events: PlayStream" means,

          WritePlayerEvent api and ExecuteCloudScript Api with GeneratePlaystream = true ??

          Are they above two api?

          6.Currently, the 37kb save data cannot be split in my game(because it is closely connected), and due to the nature of my rpg game, I need to save it frequently.

          Is there any way to reduce the amount of "ticks"?

          Thanks for the detailed reply.

          link(previous my question answer) :

          https://community.playfab.com/questions/42474/playdatatitle-question.html

          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.