Nginx Rate Limiting Generator
Generate Nginx limit_req and limit_conn configuration for a login form or an API, with burst, nodelay, a 429 status and IPs that are never limited.
Free · No sign-up · Your inputs stay in your browser
Input
Generate Nginx rate limiting
Output
Rate limit
382 characters
One request is let through every 12.0 s per client. burst=10 queues up to 10 extra requests; with nodelay they are served immediately and the slots refill at the rate, without it they are spaced out at the rate. Anything beyond gets 429. An empty key is not counted, which is how the exempt list works. Behind a proxy or CDN, set real_ip_header first or every visitor shares the proxy's address.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
What burst and nodelay do
Nginx's limiter is a leaky bucket: requests are allowed at the rate, and burst lets up to that many extra requests queue. Without nodelay, queued requests are released at the rate, adding latency; with nodelay they are served at once and the burst slots refill at the rate, which suits browsers loading a page's assets. The limit_req module reference describes both.
Behind a proxy or CDN
Behind a load balancer every request arrives from the proxy's address, so all visitors share one bucket. Set real_ip_header and set_real_ip_from for your proxies first, so $binary_remote_addr is the real client.