Context:
We are deploying a Premium App via AppFoundry that aggregates screen recording metadata for compliance reporting across multiple Genesys Cloud organizations. The integration uses the standard OAuth 2.0 flow for multi-org access. Recently, during high-concurrency periods (approx. 500 active sessions), we are hitting rate limits on the /api/v2/recordings/screen endpoints. The error response is a standard 429 Too Many Requests, accompanied by a Retry-After header that varies between 5 and 15 seconds. Our current implementation uses a simple linear backoff, which is causing significant latency in data synchronization for the client dashboard. The SDK version is @genesyscloud/api-client v2.0.1.
Question:
Is there a recommended pattern for handling bursty traffic spikes that trigger these 429s? We are considering implementing a token bucket algorithm to smooth out the request rate, but want to ensure this aligns with best practices for AppFoundry-hosted applications. Specifically, does the rate limit reset window vary by organization tier, or is it a global constant? Any code snippets or architectural advice for managing these limits at scale would be appreciated.