Developer Docs

Retry, Backoff, and Queueing

Production resilience strategy for matching calls using retry policies, exponential backoff, and queueing.

Reliable automation requires controlled retries and queueing. This page provides a practical policy for matching workflows that may hit transient limits.

Retry decision matrix

  • Retry: 429, 5xx
  • Do not retry blindly: 400, 401, 403, 422

Backoff pattern

attempt = 0
delay = 500ms
while attempt < maxAttempts:
  call API
  if success: break
  if retriable(status): sleep(delay + jitter)
  else: fail fast
  delay *= 2
  attempt += 1

Queueing strategy

  • Prioritize urgent client-facing requests
  • Queue low-priority matching jobs near quota edges
  • Use dead-letter queue for repeated permanent failures

Implementation checklist

  • Add retry cap to avoid infinite loops
  • Add jitter to reduce synchronized spikes
  • Tag queued jobs with priority and expiry
  • Record terminal failure reason for support and QA