शब्दकोश · सुरक्षा

Rate Limiting

Rate limiting caps how many requests a client can make in a time window, protecting servers and APIs from abuse and overload by returning HTTP 429.

अपडेट: अक्टूबर 5, 2026

Rate limiting restricts how many requests a client, identified by IP address, API key or account, may make within a period. Requests over the limit are delayed or rejected, typically with 429 Too Many Requests.

Why it matters

It protects expensive endpoints such as login, search and APIs from brute-force attempts, scraping and runaway clients, and keeps one heavy user from degrading service for everyone. It also helps absorb small application-layer floods, though it is not a full DDoS defense.

Example

An nginx limit of 10 requests per second per IP, with a short burst allowed:

limit_req_zone $binary_remote_addr zone=api:10m rate=10r/s;
server {
    location /api/ {
        limit_req zone=api burst=20 nodelay;
        limit_req_status 429;
    }
}

By default nginx returns 503 for limited requests, so limit_req_status 429 is needed for the standard code. Well-behaved APIs also send Retry-After: 30 so clients know when to retry. Our own free API, for example, has a daily request quota described in the API docs.

Common mistakes

  • Limiting by IP behind a proxy or CDN without restoring the real client IP, so everyone shares one bucket.
  • Rate limiting your own uptime monitor and triggering false outage alerts. Allowlist it.
  • Returning 503 or 200 with an error body instead of 429, which breaks client backoff logic.
  • Applying one global limit instead of stricter limits on login and password-reset endpoints.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.