Pcornel
Automation · APIs

Rate Limiting

Cheat sheet · https://pcornel.dk/topic.php?topic=5309

Back to the Topic

Answer

Server-side control of request frequency or quota by identity, token, tenant, endpoint or other scope.

Remember

  • 429 ≠ server down; it usually indicates a quota/rate policy boundary.
  • Retry-After elapsed ≠ replay safe; request idempotency and original outcome still matter.
  • Per-token limit ≠ global limit; scopes can stack across user, tenant, IP and endpoint.
  • Client throttling ≠ server quota guaranteed; other actors may consume the same shared budget.

First checks

  • curl -sS -D - -o /dev/null <url> | grep -i -e ratelimit -e retry-after — limit headers
  • Backoff on 429 honouring Retry-After — handling
  • Client-side throttling — prevention

Verify in this order

requests → limit reached → 429 → wait → retry

Where it usually breaks

Rate-limit metadata proves policy for the observed request scope only; it does not prove system capacity or retry safety.

Client payload/auth → HTTP transport → endpoint validation/policy → request accepted → queued/job execution → target mutation → effective state → consumer workload.

Rate Limiting API boundary map

BoundaryHealthy evidenceSuspicious evidence
Caller / requestEnvironment/version, identity and exact request contract are attributableHidden defaults, wrong endpoint/version, leaked or mismatched credentials
Server / responseStatus, headers, structured body and request ID are interpreted togetherStatus-only handling, ignored error body, ambiguous async result or unsafe retry
State / proofWrite result is reconciled with resource read-back or acceptance testResponse success treated as final target success without verification
TroubleshootingFirst failed boundary is preserved, changed minimally and retestedBlind retries, credential rotation, replay or payload edits before evidence is captured

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5309

Confirmation

Confirm action

Continue?