The problem
Burst traffic from tight polling loops, retry storms after 5xx errors, or parallel workers sharing one token can trigger throttling.Solution
1
Read Retry-After
If the response includes
Retry-After, wait at least that many seconds before retrying.2
Exponential backoff
Increase delay between retries (e.g. 1s → 2s → 4s) with a maximum cap.
3
Reduce poll frequency
For MoMo, poll every few seconds — not hundreds of ms. Prefer realtime keys.
4
Serialize token refresh
One refresh flow per process; share the cached token across workers.
