Any public API attracts scraping, credential stuffing and accidental overload, and rate limiting is the first line that distinguishes a service from a victim. In 2026 the practice has matured beyond a fixed requests-per-minute number into layered protection that is fair to legitimate users and expensive for abusers.

Multiple dimensions of limits

Per-token, per-IP, and per-endpoint limits catch different abuse patterns. A single global throttle either starves honest high-volume users or lets targeted abuse through; layered limits let you tune each dimension independently.

Design the response, not just the limit

Return clear rate-limit headers and retry guidance so well-behaved clients back off gracefully. Clients that receive actionable 429 responses recover automatically; clients that receive opaque errors retry harder and worsen the load.

Security illustration
Illustration: Security — photo via Unsplash

Alert on shape changes

Sudden shifts in request distribution often precede an incident: a new endpoint spiking, one client dominating, or authentication failures clustering. Shape alerts give you warning before the limits themselves start rejecting traffic.

Designing limits that fit usage

Limits should reflect how the product is actually used: per-user quotas for interactive traffic, separate budgets for expensive endpoints (search, export, inference), and burst allowances so legitimate spikes are not punished. Choose keys carefully — per API key, per user, per IP and per session each catch different abuse patterns — and return standard rate-limit headers so well-behaved clients can back off instead of retrying blindly. The failure mode to avoid is a global limit where one abusive tenant starves everyone else.

Layered abuse protection

Rate limiting alone handles volume, not intent: pair it with bot detection (challenge responses, proof-of-work for suspicious traffic), per-credential lockout with backoff for stuffing attempts, anomaly detection on usage patterns (a key suddenly exporting everything), and cost-based limits for AI endpoints where each request has real expense. Equally important is observability: dashboards showing limit hits by tenant and reason turn abuse response from guesswork into configuration.

Security illustration
Illustration: Security — photo via Unsplash

Key takeaways

  • Key limits by user, IP and endpoint class — one global limit fails.
  • Return standard rate-limit headers so clients back off cleanly.
  • Add cost-based limits wherever requests carry real expense.

Final thoughts

Rate limiting is product design as much as infrastructure: the limits you choose define who can use your service under pressure, and teams that tune them from real traffic data keep both legitimate users and the bill under control.

Sources & further reading