Twitch API - Rate limiting of outgoing HTTP requests
The current per-session rate limiting (retry the session after a timeout when receiving HTTP response 429 Too Many Requests) does not scale across the Twitch API Service if several requests are in flight at the same time.
Twitch API docs: https://dev.twitch.tv/docs/api/guide/#twitch-rate-limits
During testing, the Twitch server has been replying with HTTP response 400 Bad Request when running batches of more than 100 requests in a short time frame, even though the rate limit budget was nowhere close to zero.
Implement rate limiting across the entire Twitch API Service with a configurable limit (default to a reasonable value like a maximum of 10 requests per second) and adapt the rate limit to HTTP response 429 Too Many Requests.