Rate limiting

Rate limiting caps how many requests a client can make in a period of time, to protect a service from overload and abuse.

Rate limiting is a rule that allows a client only a fixed number of requests in a period, such as 100 per minute. Requests beyond the limit are rejected or delayed until the period resets. A common method gives each client a bucket of tokens that refills at a steady rate. Each request spends a token, and an empty bucket means the client has to wait.

Rate limits protect a service from clients that send too much, by mistake or on purpose. Without them, one runaway script could slow the service for everyone else. Limits also make abuse more expensive, such as guessing passwords or scraping data. A rejected request usually returns HTTP status 429, and well-behaved clients retry after a delay.

Sandbox platforms limit how fast an account can create, start and delete sandboxes. These limits keep one burst of requests from crowding out other tenants. Rate limits also apply inside sandboxes, to the APIs that their code calls. An agent that runs in a loop can hit limits quickly, so it needs to retry with a growing delay.