question

Nicolas C avatar image
Nicolas C asked

GZiPPING player data

Hi,

We have a 4KB Json player data key/value that is very frequently used for R/W.

Each update to the DB counts for 4 writes since it's 1 write per KB.

If we GZIP the player data it goes down to less than 1KB and we would therefore save costs on the write counts. All player data manipulations are done using Azure functions however so this would increase the CPU usage.

Do you think it would be worth zipping the player data and saving it as a base64 encoded string in the DB? I'm curious to have your thoughts on that

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

·
Rick Chen avatar image
Rick Chen answered

Yes, you can encode your data into smaller data and decode it later. You could compare the Azure functions pricing with the PlayFab Pricing of profile Reads/Writes and calculate the cost in each case.

Please also be aware that there are limits about the player data updates. You could check the limits in [Your GameManager]->[Title Settings]->[Limits]-> Player data value updates per 15 seconds, per 5 minutes and per hour.

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.