<< Back to Programming Forum   Search

Posts 1 - 4 of 4   
Responsible rate limit for query game API: 10/8/2021 15:34:08


l4v.r0v 
Level 59
Report
What's the responsible rate limit for the query game API? Does the API itself have rate limiting built-in that a client can manage through exponential backoff?

Farah seems to have converged on 1 request/second, but the query game API is blazing fast and there's a lot of games to query (1v1 ladder alone has 373k games; 373k seconds is about 4 days). So I'm wondering if anyone has had success with a higher self-imposed rate limit (e.g., 10 requests/second) or if the API itself is able to exert back-pressure which would allow for simplified client-side handling of rate limits.
Responsible rate limit for query game API: 10/11/2021 21:06:08


TBest 
Level 60
Report
Maybe, instead of pushing the ratelimit's. What would be better is a new bulk-request endpoint

Edited 10/11/2021 21:06:35
Responsible rate limit for query game API: 10/11/2021 22:24:58


Norman 
Level 58
Report
For the M'Hunters ladder, the query game API gets called just in a for loop. Usually roughly 80 games get queried and then maybe 40 new games get created. The whole process takes maybe 5 seconds but I haven't measured what takes how long. The vast majority goes probably to the create game API calls.

The API is meant to be called in a way that you avoid unnecessary calls and as long as you aren't querying the API multiple times for data you could have stored yourself, you are probably using it in the intended way. Since the API provides all ID of let's say the 1v1 ladder, it's obviously allowed that you query all 1v1 ladder games in a simple for loop.

Edited 10/11/2021 22:33:34
Responsible rate limit for query game API: 10/11/2021 23:20:45

Fizzer 
Level 62

Warzone Creator
Report
Sleeping 100 milliseconds between each request should be fine
Posts 1 - 4 of 4