Actor pattern to maximize parallel api requests while honoring rate limit exceptions

20 views
Skip to first unread message

dhmitc...@gmail.com

unread,
Aug 1, 2023, 10:03:19 AM8/1/23
to Google Ads API and AdWords API Forum
We were occasionally getting rate limit errors from google (and other) apis in our highly parallel Kotlin system. I developed a traffic cop pattern which seems to work well and wrote a blog about it: https://www.cargurus.dev/kotlin-actor/actor/

Google Ads API Forum Advisor

unread,
Aug 1, 2023, 1:56:56 PM8/1/23
to dhmitc...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

Regarding your concern,  please note that our team provides assistance to concerns or issues related to Google Ads API (https://developers.google.com/google-ads/api/docs/start). Having said that, can you confirm if this is related to the Google Ads API? If so, can you provide more context or details regarding this so our team can have a better view and provide precise recommendations?

If you are encountering Google Ads API-related errors, can you provide the below complete API logs for investigation?
You may then send the requested logs via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Moreover, since you mentioned that you're getting rate limit errors, kindly note that the Google Ads API buckets requests for rate limiting by queries per second (QPS) per client customer ID (CID) and developer token, meaning that metering is enforced independently on both CIDs and developer tokens. You may check our Rate Limits (https://developers.google.com/google-ads/api/docs/best-practices/rate-limits) for more details.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2nZmEx:ref"

Thanks,
 
Google Logo Google Ads API Team


Don Mitchell

unread,
Aug 1, 2023, 3:06:05 PM8/1/23
to ads...@forumsupport.google, adwor...@googlegroups.com
I wrote it to handle QuotaErrorEnum.QuotaError when I had dozens of concurrent processes hitting your API and your API getting very upset that the other process stacks kept sending API requests, but that said, it's not a request for help but instead help for those who may be in a similar situation.

Google Ads API Forum Advisor

unread,
Aug 1, 2023, 5:59:46 PM8/1/23
to dhmitc...@gmail.com, adwor...@googlegroups.com

Hi Don,

Thank you for your reply.

Thanks for clarifying that it’s not a request for help but details for other users. Yes, you may catch the quota errors using your chosen client libraries. I recommend to check different quota errors thrown in Google Ads API here https://developers.google.com/google-ads/api/reference/rpc/v14/QuotaErrorEnum.QuotaError

Feel free to open new forum thread for any additional questions related to the Google Ads API. 

Reply all
Reply to author
Forward
0 new messages