sxsphinxstack

Skills / Working / Design a web rate limit strategy

Working Web skill

Design a web rate limit strategy

Design web rate limits from abuse threats, resource cost, user identity, endpoint semantics, fairness, client guidance, and degraded operation.

Limit the costly or harmful action at the layer that can identify it correctly.

When to use

  • Use for authentication, search, messaging, uploads, purchases, APIs, scraping, or expensive computations.
  • Do not rely on IP address alone where shared networks, proxies, or attackers make it unreliable.

Procedure

  1. Inventory endpoints, methods, mutations, costs, dependencies, identities, clients, geographies, and abuse cases.
  2. Choose keys from account, credential, device, tenant, resource, action, and trusted network context with privacy review.
  3. Set burst, sustained, concurrent, and cumulative limits from capacity tests and legitimate usage distributions.
  4. Separate anonymous, authenticated, privileged, automated, and recovery paths with nonbypassable global protection.
  5. Make mutation retries idempotent and return clear status, limit scope, safe retry timing, and support path.
  6. Coordinate edge, gateway, application, queue, and dependency controls without accidental multiplicative blocking.
  7. Define fail-open or fail-closed behavior per risk, plus emergency overrides with expiry and audit.
  8. Test shared networks, distributed attacks, credential rotation, clock boundaries, retries, high-value customers, accessibility tools, and dependency failure.
  9. Monitor denial accuracy, evasion, capacity, user harm, and override use without logging secrets.