API Gateway Rate Limiting Calculator — Model RPS, Burst, and Token Buckets
Calculate token bucket size and refill rate from RPS targets for API gateway throttling. Enter your steady-state requests per second, burst multiplier, and average response time — the calculator outputs the bucket capacity, refill rate, per-minute and per-hour quotas, and concurrent connection estimate. Generates ready-to-paste throttling config for AWS API Gateway, Kong, and Nginx. Free and runs entirely in your browser.
How to Use API Gateway Rate Limiting Calculator — Model RPS, Burst, and Token Buckets
How to Use the API Gateway Rate Calculator:
Load a Preset (Optional): Click any preset to pre-fill all inputs with a common API tier scenario. Free tier shows a low-volume SaaS free plan with generous burst headroom. Standard API covers a typical 100 RPS web API. Pro tier shows a higher-volume paid plan. High-traffic demonstrates a 2000 RPS configuration with tighter burst. All presets can be edited after loading.
Enter Target RPS: The Target RPS is your expected steady-state request rate — the average number of requests your API should serve per second under normal conditions. This becomes the token bucket refill rate. Use your P50 traffic from monitoring or your desired sustained throughput per client tier.
Set the Burst Multiplier: The burst multiplier determines the token bucket capacity: bucket size = Target RPS × Multiplier. A 2× multiplier on a 100 RPS API creates a 200-token bucket, allowing 200 back-to-back requests before throttling begins — after which the bucket refills at 100 tokens per second. Use the quick-select buttons (1.5×, 2×, 3×, 5×) for common values. A 2× multiplier is a sensible default for most APIs.
Enter Average Response Time: The average response time in milliseconds is used to estimate concurrent connections via Little's Law (L = λW). For example, at 100 RPS with a 150ms average response, your API handles roughly 15 concurrent requests. This helps you cross-check whether your backend thread pool or connection pool can support the calculated concurrency.
Set the Window: The window in seconds determines the per-window quota shown in the results. Use 60 for per-minute display, 3600 for per-hour, or a custom value that matches your billing or quota window. The window does not affect the token bucket calculation — it is only used to display the derived quota values.
Click Calculate: Results appear on the right with six key metrics: Refill Rate (tokens per second, equal to target RPS), Burst Size (max token bucket depth), Per Minute and Per Hour derived rates, Per Window quota, and Concurrent Connections estimate. A status badge indicates whether the burst multiplier is tight, balanced, or generous.
Use the Gateway Config Snippets: Switch between AWS, Kong, and Nginx tabs to see a ready-to-paste configuration snippet for each gateway. Click Copy to copy the active snippet to the clipboard.
Common Use Cases:
- API product design: Determine throttle values for each pricing tier (free, pro, enterprise) before configuring your gateway.
- Gateway migration: Re-calculate token bucket parameters when migrating between AWS API Gateway, Kong, and Nginx to ensure equivalent throttling behaviour.
- Capacity planning: Use the concurrent connection estimate alongside your backend thread pool size to verify that rate limits are set below your backend saturation point.
- SaaS quota configuration: Set per-minute and per-hour quota values for SDK rate limiters and quota enforcement middleware.
Tips and Best Practices:
- Set rate limits well below your backend saturation point, not at it. If your service can handle 500 RPS before degrading, set the gateway limit to 300-400 RPS to preserve headroom for retries and traffic spikes.
- A 2× burst multiplier is a safe default for most REST APIs. Use 3-5× for bursty workloads (dashboard loads, mobile app cold starts) where a short burst is expected on startup.
- In Kong with multiple gateway nodes, use the redis policy instead of local to share rate limit counters across nodes. The local policy counts independently per node.
- In Nginx, nodelay serves burst requests immediately without queuing delay. Remove nodelay if you want Nginx to smooth out burst traffic over time instead of rejecting it.
Frequently Asked Questions
Most Viewed Tools
Screen Size Converter — Diagonal Dimension Tool
Calculate screen width and height from diagonal size and aspect ratio. Convert between inches and centimeters for displays, TVs, and monitors with instant dimension calculations.
Use Tool →DPI Calculator — Print Resolution Tool
Calculate DPI (dots per inch), image dimensions, and print sizes. Convert between pixels and physical dimensions for printing and displays.
Use Tool →TOTP Code Generator — 2FA Testing Tool
Generate time-based one-time passwords from a TOTP secret key. Enter your base32 secret, choose a period and digit length, and get the current and next codes with a live countdown timer. Useful for testing and debugging 2FA integrations.
Use Tool →Password Entropy Calculator — Crack Time Estimator
Calculate the information-theoretic bit entropy of any password or API key. Detects character set pools automatically, shows the total number of possible combinations, and estimates crack time across five attack scenarios from rate-limited web logins to GPU cracking clusters.
Use Tool →JSONL Formatter — Line-by-Line Validator
Format, validate, and inspect JSON Lines (JSONL) and NDJSON files. Validates each line individually, reports parse errors by line number, outputs compact JSONL or a pretty-print preview, and lets you download the cleaned file.
Use Tool →JSON to Zod — Schema Generator
Generate Zod validation schema code from a JSON sample object. Infers z.string(), z.number(), z.boolean(), z.array(), z.object(), and z.null() types automatically. Handles nested objects, arrays of objects with optional field detection, and outputs copy-ready TypeScript with import and z.infer type alias.
Use Tool →Seconds to Time Converter — HH:MM:SS Formatter
Convert seconds to HH:MM:SS time format instantly with precise calculations and easy-to-read formatting.
Use Tool →TLS Cipher Suite Checker — Strength Analyzer
Check TLS protocol version compatibility and cipher suite strength ratings against current best practices. Supports IANA and OpenSSL cipher names — rates each suite as Strong, Weak, or Deprecated and explains why.
Use Tool →Related API & Backend Tools
GraphQL Cost Estimator — Analyze Query Complexity and Depth
Assign custom field weights to a GraphQL schema and calculate the total query complexity score. Paste any GraphQL query, configure per-field costs, and get a per-field breakdown table showing depth, multipliers, and cumulative cost.
Use Tool →Webhook Retry Config Calculator — Simulate Exponential Backoff & Jitter
Configure exponential backoff parameters and preview the full retry schedule for webhook delivery. Enter max attempts, initial delay, multiplier, jitter, and a max delay cap to instantly see each retry timestamp, cumulative elapsed time, jitter range, and which delays hit the cap. Supports presets for standard, aggressive, conservative, Stripe-style, and fixed-interval retry policies. Free and runs entirely in your browser.
Use Tool →GraphQL Variables Formatter — Query Validator
Format and validate GraphQL query variables JSON for use in queries and API clients. Paste your variables JSON alongside a GraphQL query to instantly format the JSON, validate that each variable matches its declared type, catch missing required variables, and highlight undeclared extras.
Use Tool →API Mock Server Config Generator — Build Instant Mock Endpoints Online
Paste API route definitions to instantly generate JSON configuration files for json-server, Mockoon, and Prism mock servers. Define routes as METHOD /path lines and get ready-to-use config with realistic sample data.
Use Tool →Postman to OpenAPI Converter — Spec Migration Tool
Convert Postman Collection v2.1 JSON to OpenAPI 3.0 specification format. Upload or paste your collection, and get a downloadable openapi.yaml or openapi.json with mapped paths, parameters, request bodies, and example responses.
Use Tool →GraphQL Subscription Builder — Generate WebSocket Payloads and Client Queries
Build GraphQL subscription query strings and generate WebSocket connection code snippets for Apollo Client, urql, and graphql-ws. Define your operation name, variables, and selection fields visually, then copy the ready-to-use code.
Use Tool →OpenAPI Mock Generator — Turn API Specs into Live Mock Servers
Paste an OpenAPI 3.x or Swagger 2.0 spec, select any endpoint, and instantly get a realistic mock request body and response matching the defined schemas. Also generates a ready-to-run cURL command.
Use Tool →Server-Sent Events (SSE) Formatter — Build and Debug Real-Time Streams
Build Server-Sent Events messages with id, event, data, retry, and comment fields for testing SSE endpoints. Fill in each field individually and instantly see the correctly formatted SSE message string with double-newline terminator. Supports multi-line data fields, keep-alive comment lines, and an escaped wire-format view. Five presets cover the most common SSE patterns. Free and runs entirely in your browser.
Use Tool →Share Your Feedback
Help us improve this tool by sharing your experience