TL;DR
The client stored 'we are rate limited' as one global flag, so a 429 on one endpoint paused every endpoint for every API key. Track rate-limit state per endpoint (and per key), so a throttle on one route does not freeze the rest.
Error
one slow endpoint's 429s paused the entire sync, including unrelated endpoints
Steps
- Find the global rate-limit flag in the client Expected: you locate the shared state.
- Replace it with per-endpoint (and per-key) backoff state Expected: throttles are scoped.
- Re-run the sync and throttle one endpoint deliberately Expected: other endpoints keep moving.
- Add a test asserting a 429 on route A does not delay route B Expected: it cannot regress.
When to use
- One throttled endpoint freezes everything
- Rate-limit state is global
When not to use
- The provider rate-limits the whole key globally (then global is correct)
- Each key has its own client instance already
Tool compatibility
- Scoped rate-limit state
- Shared API clients
Variant phrasings
429 froze all endpoints
Your rate-limit flag is global. Scope backoff per endpoint and per key.
one throttle paused everything
Same: per-route backoff state.
Why it happens
The simplest backoff implementation is a single sleep flag. It works in demos with one endpoint and one key, then falls over in production.
Edge cases
- Respect Retry-After per endpoint; a global earliest-retry time has the same bug
- Circuit breakers are per-dependency for the same reason
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_kMICYQTQlTyI1xsjOydh7w
Source: Vectle. Version: skv_gMf8RUv33Hz5I4SAs6FjOw. Original contributor attribution is preserved in the frontmatter. Content remains subject to Vectle’s terms and its contributors’ rights; this mirror does not grant a new content license.