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
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 →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 →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 →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 →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 →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 →Secret Scanner — API Key & Credential Detector
Scan pasted text, code, or config files for accidentally exposed API keys, tokens, passwords, and private keys. Detects 50+ secret types across AWS, GitHub, Stripe, OpenAI, and more — all client-side, nothing leaves your browser.
Use Tool →TOML Config Validator — Syntax Error Finder
Validate TOML configuration file syntax and report errors with line numbers. Paste any TOML content — Cargo.toml, pyproject.toml, config.toml — and instantly see a green checkmark with key counts and structure stats, or a precise error message pointing to the exact line. Includes a collapsible JSON structure preview to confirm what was parsed.
Use Tool →Related API & Backend Tools
GraphQL Query Formatter — Mutation & Subscription Tool
Format and prettify GraphQL queries, mutations, subscriptions, and fragments with correct indentation.
Use Tool →REST Endpoint Documenter — Markdown Doc Generator
Document a REST endpoint quickly by entering the URL, method, headers, and sample request/response. Generates formatted Markdown documentation and an example cURL command instantly.
Use Tool →AMQP Exchange Configuration Simulator — Map Routing Keys and Queue Bindings
Generate RabbitMQ channel declaration code for Node.js (amqplib) and Python (pika). Select an exchange type, configure durability and options, add queue bindings with routing keys, and instantly get production-ready assertExchange and bindQueue calls. Supports all four exchange types: direct, fanout, topic, and headers. Four presets cover the most common RabbitMQ patterns. Free and runs entirely in your browser.
Use Tool →OAuth Token Validator — JWT & OIDC Decoder
Validate and inspect OAuth tokens in your browser. Decode JWT access tokens and ID tokens to view claims, scopes, and expiry. Analyse opaque tokens for entropy and format. Free and private.
Use Tool →API Latency Budget Calculator — Plan Distributed System Performance
Set a P99 SLO latency target and distribute the budget across your upstream service dependencies. See remaining headroom, utilization percentage, a stacked allocation bar, and a per-service breakdown with optional P99 actual measurements.
Use Tool →API Mock Data Generator — Realistic JSON Builder
Generate structured, realistic mock data for API endpoint testing. Define fields with names and types — UUID, name, email, integer, enum, date, and more — set how many rows you need, and export as a JSON array, NDJSON, or CSV. All generation runs entirely in your browser with no data sent to any server.
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 →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 →Share Your Feedback
Help us improve this tool by sharing your experience