Rate Limits and Idempotency
Use idempotency keys and throttling-aware request pacing to keep integrations safe under load.
#Purpose
Defines how to prevent duplicate side effects and avoid throttling instability under production load.
#Integration prerequisites
- Stable client-generated operation identifiers per business action.
- Request queue or worker model supporting adaptive concurrency.
- Clock and retry policy alignment across distributed services.
#Request and response patterns
- Mutating requests include idempotency key scoped to one logical operation.
- Throttle responses signal temporary request-rate exhaustion.
- Client retries maintain same idempotency key and adjusted pacing.
#Lifecycle and state model
- Generate idempotency key before first attempt and persist with operation context.
- Submit request through concurrency-controlled execution lane.
- If throttled, delay next attempt using exponential backoff and jitter.
- Reuse key until operation reaches terminal known outcome.
#Error and failure taxonomy
- Duplicate request with changed payload under same key.
- Burst traffic leading to sustained throttling and queue growth.
- Uncertain request outcome due to timeout without response receipt.
#Retry and idempotency guidance
- Never rotate idempotency key while operation outcome remains unknown.
- Cap retries and move unresolved operations to manual review queue.
- Throttle retries globally when system-level 429 responses spike.
#Observability and debugging entry points
- 429 response rate, queue depth, and retry backlog by endpoint family.
- Idempotency replay hit rate and duplicate-prevention effectiveness.
- Percent of operations requiring manual resolution after retry exhaustion.