ã¯ããã«
PlayFab 㧠CloudFunction ãå©çšããŠãããšãã« API å¶éã«åŒã£ããã£ãŠããŸããŸãããè² è·ãã¹ããããéã«åããŠæ°ã¥ããã®ã§ãããå ¬åŒããŒãžã«ãèšåãç¡ãã£ãããçºèŠãé ããŠããŸããŸããããã®ãããPlayFab ã«äŸåããŠããæ©èœãéšåçã«å€ãå¿ èŠãåºãŠããŠããŸãèŠåŽããŸããã
æ¬èšäºã§ã¯ãäžèšã®ãããªäºæ ã«é¥ãæ¹ãæžãããããAPI å¶éã«æ°ã¥ããŸã§ã®è»è·¡ã蟿ããªãããPlayFab ã® CloudFunction ãå©çšããéã®æ³šæç¹ã«ã€ããŠãèšäºãšããŠæ®ããŠãããããšæããŸãã
PlayFab ã® API å¶éã«åŒã£ããã£ãèŠå
PlayFab ã® CloudFunction ãå©çšãããšãPlayFab çµç±ã§ç¬èª Web API ãå®è¡ããããšãå¯èœã«ãªããŸãããŸããCloudFunction çµç±ã§ç¬èª Web API ãå®è¡ãããšãPlayFab ãŠãŒã¶æ å ±ãå«ãŸãããã©ã¡ã¿ãå«ãŸããç¶æ ã§ãªã¯ãšã¹ããé£ãã§ããããããã®æ å ±ãå©çšããããšã§ãµãŒããŒãµã€ã㧠PlayFab ã®æäœãè¡ãããšãåºæ¥ãããã«ãªã倧å€äŸ¿å©ã§ãã
ãã®ããããããããžã§ã¯ãã§ã¯ PlayFab CloudFunction ã Azure Function ã AWS Lambda ã®ãã㪠FaaS ã䜿ã£ãŠããæãã§å©çšããŠãããŸããããããŠããã®å©çšã®ä»æ¹ã¯èª€ãã§ãã£ãããšã«åŸã æ°ã¥ããŸã…
è² è·ãã¹ããå®è£ ãããã§ãŒãºã§ CloudFunction ã倧éã«å©ããŠã¿ã
PlayFab ã® CloudFunction ãå®è¡ããã«ãããå©çšãã PlayFab ã® API 㯠Server-Side Cloud Script - Execute Function
ãšãããã®ã«ãªããŸãã
åæ¥ 2000 人æ³å®ã§è² è·ãã¹ãã®ã·ããªãªãå®è£
ããããšãæ±ããããŠããããããã®éãã·ã³ãã«ã« 2000 件åæã« Server-Side Cloud Script - Execute Function
ãå®è¡ããã·ããªãªã Gatling ã§çµãã§ã¿ãŸããããããšãäœåãã£ãŠãæ°å件以äžã¯å¿
ããšã©ãŒãçºçããŠããããšãåãããŸããã
# Gatling ã§è² è·ãã¹ããå®è¡ããéã« 50件倱æããŠããæ§å
================================================================================
---- Global Information --------------------------------------------------------
> request count 2000 (OK=1950 KO=50 )
> min response time 320 (OK=320 KO=354 )
> max response time 14459 (OK=9723 KO=14459 )
> mean response time 998 (OK=934 KO=3485 )
> std deviation 1510 (OK=1304 KO=4310 )
> response time 50th percentile 545 (OK=543 KO=656 )
> response time 75th percentile 1085 (OK=1077 KO=7209 )
> response time 95th percentile 2243 (OK=2029 KO=10210 )
> response time 99th percentile 7947 (OK=7775 KO=14353 )
> mean requests/sec 100 (OK=97.5 KO=2.5 )
---- Response Time Distribution ------------------------------------------------
> t < 800 ms 1393 ( 70%)
> 800 ms < t < 1200 ms 367 ( 18%)
> t > 1200 ms 190 ( 10%)
> failed 50 ( 3%)
---- Errors --------------------------------------------------------------------
> status.find.is(200), but actually found 400 50 (100.0%)
================================================================================
æ£çŽ 2000件çšåºŠã® API ã¢ã¯ã»ã¹ã§ããã°ãäœã®åé¡ããªãè² è·ãã¹ããéããšèããŠããã®ã§ããã®çµæã«ã¯é©ããŸãããåå ã¯äœãªã®ã調ã¹ããšãããAzure Function 㧠PlayFab ãŠãŒã¶èªèšŒãè¡ãããã«å©çšããŠãã Authentication - Validate Entity Token
㧠503 ãšã©ãŒãçºçããŠããããšãåãããŸããã
å°ãªã API å®è¡ä»¶æ°ã§è² è·ãã¹ããå®è¡ããå Žåã¯åé¡ãªãã®ã§ããã件æ°ãäžå®æ°è¶ ããã¿ã€ãã³ã°ã§ 503 ãšã©ãŒãè¿åŽãããããã«ãªã£ãŠããŸããŸããããããããŸã«åã件æ°ãå®è¡ããŠããã¯ããªã®ã«ã¹ã ãŒãºã«å šä»¶ API å®è¡ã«æåããããšããããŸãããããã¯äœããã®ã¬ãŒããªãããçã«åŒã£ããã£ãŠããã®ããç¥ããªããšããããšã§èª¿æ»ãããšããã次ã®äºå®ãå€æããŸããã
CloudFunction 㯠FaaS ã®çšéã«ã¯é©ããªã
ã©ããã PlayFab å ¬åŒãã©ãŒã©ã ã® ããæçš¿ ã«ãããšãPlayFab ã® Server API ãåŒã³åºãé㯠10ç§éã« 1000åãšããå¶éãããããã§ããã ãããŠããã®å¶éãçªç Žããã«ã¯åçšã®ããã®å¥çŽãããåŸã«ã€ã³ã¹ã¿ã³ã¹å²åœã«é¢ãã亀æžãããããšã§å¯èœã«ãªãããç¥ããªããšã®ããšã§ããã
Servers are rate limited to 1,000 calls per 10 seconds. What jital is highlighting that the per-player rate should be no more than a few times a minute. A server can call at a higher rate, as it is calling for a lot of users, potentially. If you need a higher limit than 1,000 per 10 seconds, you’ll want to talk to our sales team about getting on an Enterprise contract so that we can work with you on custom limits. There’s an option on the Contact Us form on the main site to message them, if you want to go that route.
ã€ãŸããæ®éã« PlayFab ãå©çšããŠããéãã¯ãã©ã³ãã¢ããã°ã¬ãŒãããããšå¶éã«åŒã£ããããšããããšãåãããŸããã ãŸããä»å¹Ž 1æã«æçš¿ãããå 容 ãèŠãã« 10ç§ä»¥å ã« 5000以äžã®ãŠãŒã¶ãŒããã°ã€ã³/ç»é²ã§ãããšããããã API ã® 10ç§éã« 1000ååŒã³åºãå¶éã¯æ€å»ãããã®ããèããŠãããŠãŒã¶ãããã®ã§ããããŸã æ€å»ãããŠããªããšè¿ä¿¡ãããŠããã®ã§å¶ç¶ã ã£ãããã§ããã
ã¡ãªã¿ã«ç§ãäžèšãæ°ã«ãªã£ãã®ã§ãã»ãã·ã§ã³ããšã«ã¬ãŒããªãããã®ãããæ¹ãå€ããã®ãæ€èšŒããããã«ç°ãªããŠãŒã¶æ å ±ãçšããŠãªã¯ãšã¹ã 2000件ã䞊åã«å®è¡ããŠã¿ãŸãããã503 ãšã©ãŒã¯å€ãããè¿åŽããç¶ããŠããã®ã§ãå°ãªããšãç§ã®æå ã®ç°å¢ã§ã¯å¹æã¯ãªãããã§ããã
No, the rate limits on the Client and Server API calls has not changed. However, the rate limits are currently enforced on a per-server basis. And since the service runs a great many servers for load balancing, it is possible to exceed those limits from time to time.
åå ã®èª¿æ»äž PlayFab 㯠EC2 ã® us-west-2 ãªãŒãžã§ã³ã§ãªã¯ãšã¹ããåããŠããããªããšãåãã£ãã®ã§ããããã®ã¢ã¯ã»ã¹å ã®ã€ã³ã¹ã¿ã³ã¹ãããŒããã©ã³ãµã«ãã£ãŠåæ£ãããŠãããããã¬ãŒããªãããã®å¶éãã€ã³ã¹ã¿ã³ã¹å ã«ãããæãšå Žåã«ãã£ãŠå¶éããããã©ããã決ãŸã£ãŠããã®ãããããªããšã®ããšã§ããã
以äžã®ããšãããPlayFab ã® CloudFunction ã«ã€ããŠã¯ Azure Function ã AWS Lambda ã®ãã㪠FaaS ã®ãããªçšéã«ã¯äœ¿ããããããŸã§ãã¢ããªã±ãŒã·ã§ã³ã§è£å©çã«å©çšããããã®ç¬èªã¹ã¯ãªãããåããçšåºŠã«çããŠå©çšããã®ãæ£è§£ãªããã«æããŸããã
PlayFab ã®ãŠãŒã¶èªèšŒæ å ±ã§ãã SessionTicket ã EntityToken ãå©çšããããšã§ãèªèšŒåšãã®å®è£ éšåãçãããšãåºæ¥ãããç¥ããªããšæãæåŸ ããŠããã®ã§ãããããã¯å¥ã® BaaS ã䜿ãã IaaS ã§èªåã§äœãã®ãè¯ãããã§ããã
ãããã«
API ã® 10ç§éã« 1000ååŒã³åºãå¶éã«ã€ããŠã¯æ瀺çã«ããã¥ã¡ã³ãã«èšèŒãããããã§ããªãã£ããããæ°ã¥ãããšãåºæ¥ããããžã§ã¯ãçµç€ã§æ°ã¥ããšããäºæ ãèµ·ããŠããŸã£ãã®ã§ãããç§ãšäŒŒããããªå¢éã«é¥ã人ãå°ãã§ãæžãããã«ãšèšäºãæžããŠã¿ãŸããã
ãšã¯ãããå°ã調ã¹ãã°åºãŠãããããªå¶éã ã£ãã®ã§çŽç²ã«èª¿æ»äžè¶³ã ã£ããªããšåçããŸããããCloudFunction ã¯ãšãŠã䟿å©ã§ãããå©çšããé㯠API ã®åŒã³åºãå¶éççšæ³ã«ã¯ååãæ°ãã€ããŠãå©çšãã ãããŸãã
PlayFab ã䟿å©ãª BaaS ã§ããããšã«çãã®äœå°ã¯ç¡ãã®ã§ä»åŸãå©çšãããšæããŸãããç¥èŠã貯ãã€ã€å¹æçã«äœ¿ããããå匷ããŠãããããšèããŠãããŸãããŸãäœãç¥èŠãåŸããéæããã°èšäºã«æžãæºããŠãããããšæããŸãã
åèãªã³ã¯
- Azure é¢æ°ã䜿çšãã PlayFab CloudScript - PlayFab | Microsoft Docs
- Server-Side Cloud Script - Execute Function (PlayFab CloudScript) | Microsoft Docs
- Authentication - Validate Entity Token (PlayFab Authentication) | Microsoft Docs
- Server API limitations - Playfab Community
- Server API limitations - Playfab Community