Test Rate Limits

232 views
Skip to first unread message

Truong Nguyen Chi

unread,
Aug 2, 2023, 11:48:39 PM8/2/23
to Google Ads API and AdWords API Forum
Hi, 
I'm trying test rate limits with Google Ads Api in my system. I have Basic Access level with 15,000 operations/day. I understand Test Account without affecting your production environment. So do we need to worry about 2 account Production and Test Account with same Developer token?

Google Ads API Forum Advisor

unread,
Aug 3, 2023, 4:43:43 AM8/3/23
to truo...@crossian.com, adwor...@googlegroups.com

Hi,

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. The Google Ads API uses a Token Bucket algorithm to meter requests and determine an appropriate QPS limit, so the exact limit will vary depending on the overall server load at any given time.

Requests that are in violation of rate limits will be rejected with the error: RESOURCE_TEMPORARILY_EXHAUSTED. You can take control of your app and mitigate rate limits by both actively reducing the number of requests and throttling QPS from the client side. Here are some recommended practices:

  • Limit concurrent tasks - Setting a reasonable upper bound for the total number of concurrent tasks that are going to make requests (across all processes and machines), and adjusting upward to optimize your throughput without exceeding the rate limit is recommended.
  • Batching requests - Consider batching multiple operations into a single request. 
  • Throttling and rate limiters - You can check out Guava Rate Limiter, or implement your own Token Bucket based algorithm for a clustered environment. 
  • Queueing - A message queue is the solution for operation load distribution, while also controlling request and consumer rates. 

Let me know if you have any questions.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2naVHK:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages