question

drallcom3 avatar image
drallcom3 asked

API compression

I always wanted to know how and if API compression is used.

  1. Are payloads client <-> Playfab compressed in both directions? (Assuming it's enabled at the client side)

  2. Are payloads Azure functions <-> Playfab compressed?

Basically I want to know if I have to e.g. provide title data in a compressed format or if that's taken care of automatically.

apis
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

·
Gosen Gao avatar image
Gosen Gao answered

As the Unity’s documentation said, “Due to different limitations across platforms the custom value might be overridden, ignored or unsupported, so the resulting behavior is unreliable. It is strongly recommended to leave these headers for automatic handling unless you can accept the risk of unexpected results.” So, Unity will decide whether to compress or not depending on the platform.

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

drallcom3 avatar image drallcom3 commented ·

Unity isn't involved in point 2.

Also I said "assuming it's enabled client-side".

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao drallcom3 commented ·

Sorry for the confusion, for point 1, PlayFab responds to API requests with compressed encoding. You can send requests in a compressed format if you want, as that is not taken care of automatically.

For point 2, when you call Execute Function to execute an Azure Function, whether to compress the request will not affect the process between Azure Functions and PlayFab. Because PlayFab will handle this request first to know the function name and parameters, then PlayFab will communicate with Azure Functions internally based on that info.

0 Likes 0 ·
drallcom3 avatar image drallcom3 Gosen Gao commented ·

I don't understand your answer regarding point 2. I'm not talking about ExecuteFunction, or anything the client does. I mean API calls the function itself does, inside the function.

0 Likes 0 ·
Show more comments

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.