Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by Zhi Kang Shao · Jul 06, 2020 at 05:28 PM · CloudScriptpricing

Looking for details to reduce Profile Reads

Since the new pricing model our costs have gone up, primarily due to what's listed in the bill as Profile Reads. I'd like to optimize our game to do less reads, but it would be useful if I could access data such as:
  • Which PlayFab API calls are contributing the most for our title
  • Which custom CloudScript functions we wrote those calls originate from

Is there a way to obtain this kind of data?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Jul 07, 2020 at 06:29 AM

There are some documentations about PlayFab Pricing. You can refer to this doc -- https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/meters/profile-reads to check the APIs that cause the Profile read meter to increment.

Then you can check this doc -- https://docs.microsoft.com/en-us/gaming/playfab/features/pricing/consumption-best-practices#profile for the best practices of consumption.

Generally, some server, entity, multiplayer APIs would be called in the CloudScript. Please collect the API you used in your custom CloudScript functions, then retrieve them in the API lists that in the Pricing documentation.

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Zhi Kang Shao · Jul 08, 2020 at 04:49 PM 0
Share

Thank you Sarah. Is there a way to access for our specific title, the counts of the APIs as they have happened?

And do I understand correctly that an API call such as GetUserInventory adds a fixed value to the profile read meter? Or is the size of the data also taken into account?

avatar image Sarah Zhang Zhi Kang Shao · Jul 09, 2020 at 07:45 AM 0
Share

>> Is there ...have happened?

Yes, you can navigate to this page -- https://developer.playfab.com/en-US/r/t/[YourTitleID]/reports/DailyApiUsageDetailsReport, replace the [YourTitleID] to your actual TitleID. In this [Reports] page you can find the Daily API Usage Details Report. The report will not be permanently saved on PlayFab, you can download their CSV files in the Game Manager or using admin API GetDataReport to get the download URLs. Using the report, you will be able to check whether the data was too large, or that a handler worked inefficiently. You can further utilize the report to tune the performance of CloudScript execution by adjusting its behavior and associated data.


>> And ... account?

The meter "ticks" for profile represent 1KB of data" a possible but not verified example is, one Profile read or write request contains 10 KVP with totally 11KB, so the avg size is 1.1KB, the meter number should be 10*1.1=11.

This thread is also a reference.

As PlayFab Support Overview says, we may discuss more technical questions in the community. More advanced questions about billing, you can submit them on the contact page for the professional support. Thanks.

avatar image

Answer by Zhi Kang Shao · Jul 17, 2020 at 10:14 AM

Hi Sarah,


Thank you for the very useful information. After inspecting the API usage reports for our title, we've come to the conclusion that our custom Cloudscript calling GetCatalogItems and GetUserInventory are the main contributors for profile reads. We have progression systems such as account leveling and rewards and many of their components need to retrieve catalog items to inspect the tags and custom data, or user inventory to read/write item custom data.

What's unfortunate in our case is that often we only need one item, or a subset of items, from the catalog/inventory, but PlayFab's API as far as we know don't have filtering options when retrieving them. Having a filtering option such as GetCatalogItemsByClass, GetCatalogItemsWithTag alone would cut our profile reads meter down by at least 60% (and save PlayFab bandwidth usage). A similar feature would be desirable for user inventory.

I read a reply from Brendan from 2016 in which he mentions that catalog retrieval with filtering was being considered as a new feature. Is this still in the works? Since PlayFab's new pricing model incentivizes optimizing network traffic, I hope the API feature set will also be updated to match that.

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sarah Zhang · Jul 27, 2020 at 06:57 AM 0
Share

Currently, there is no ETA about such features. For any updates about the new features, please keep an eye on our blog, roadmaps, and release notes.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    4 People are following this question.

    avatar image avatar image avatar image avatar image

    Related Questions

    Adding User Virtual Currency 1 Answer

    How can I use server API in Azure Functions? 1 Answer

    Uploading Images to CDN with CloudScript, 1 Answer

    Get player language with Azure Function 1 Answer

    CloudScript: How can I mark suspicious players? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges