Skip to content
Glossary · System design

Rate limiting

Also called throttling, API rate limit.

Definition

Capping how many requests a user, API key or address can make in a given time, to protect a system and share capacity fairly.

Last updated

What it is.

A rate limiter counts requests per caller over a window, such as 100 per minute, and rejects or delays the rest. The standard HTTP response for this is 429 Too Many Requests, defined in RFC 6585, which may include a Retry-After header saying how long to wait.

Common methods include fixed windows, sliding windows and token buckets, which allow short bursts while holding an average rate. Limits are often enforced at the API gateway.

Why it matters

Without limits, one buggy script, a scraper or an attacker can slow the system for everyone or run up costs, especially when each request calls a paid API or an AI model. Limits also protect logins from password guessing and set clear rules for API customers.

In a product build

We set limits per user, per tenant and per IP, store counters in a fast shared store so all servers agree, return 429 with Retry-After, and make our own clients back off politely when they hit a third-party API's limits. Limits are tuned from real traffic, not guessed once.

Watch out

Common mistakes.

  1. 01

    Limiting only by IP, which blocks whole offices behind one address and misses distributed abuse.

  2. 02

    Counters kept in each server's memory, so limits multiply with the number of servers.

  3. 03

    No limits on expensive endpoints, such as AI calls, exports and search.

Sources

Read the official text.

Primary sources this definition is based on.

Tools

Work it out with a tool.

Related

Related terms.

Building something with this? Ask an engineer.

OceanLab designs and builds production software. Tell us what you are planning and we will reply with how we would approach it.

OceanLab

Enterprise Software Engineering - Human + AI

Languages

Locations

Global Headquarters

21 Merchant Road, 3rd Floor, Singapore 058267

Main corporate office and leadership operations

North America Office

548 Market Street, PMB 12472, San Francisco, CA 94104

Client operations and business development

India Office

402 Shivalik Shilp II, SG Highway, Ahmedabad 380015

Engineering and delivery center

© 2026 - Copyright. All Rights reserved OceanLab