Thanks. Follow up question here - do throttled requests count against the rate limit?
It's somewhat annoying to coordinate rate limiting amongst threads in a single process, but it's (in my production environment) much more annoying to coordinate rate limiting proactively amongst processes on a host, so I'd rather ask for forgiveness later.
That is, I'll request fairly aggressively but back off if throttled and retry after a delay. But this approach would backfire if throttled requests counted against the limit - i.e., I could end up being throttled indefinitely if the backoff delays aren't long enough. I don't want to use a larger than necessary backoff delay because I would risk not taking advantage of the highest possible throughput. I'd rather dynamically shrink this backoff to a minimum, but I can do so much more effectively if throttled requests don't count.
Let me know what you advise.