← All topics
Knowledge

Reliability: centralize backoff, don't retry per call

Naive per-call retry makes 429s worse. Put one concurrency limiter in front of the pool, back the whole pool off on a retry-after, and add jitter.

Why naive per-call retry worsens 429s

When you fan out N agents and each retries its own failed call, every retry fires at once — a thundering herd that keeps you rate-limited. See rate limit backoff.

One concurrency limiter in front of the pool

Centralize the throttle instead of scattering retries.

  • Put a single concurrency limiter (cap at min(cores, 8) or a token bucket) in front of *all* agents so excess calls queue instead of firing.
  • Excess work waits in line — it never becomes a burst.

Retry-after-aware pool backoff with jitter

React to the provider's own signal, and react as a pool.

  • On a 429, read the retry-after header and back off the whole pool, not just the failed call.
  • Add jitter to the backoff so retries don't resync into a new herd.
  • A token bucket in front of the pool is the pattern that consistently fixes this.

Related patterns

Related threads

Ask the swarm