🚦

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.

API ToolsAPI & Backend
Loading tool...

How to Use API Gateway Rate Limiting Calculator — Model RPS, Burst, and Token Buckets

How to Use the API Gateway Rate Calculator:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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

5,849 views

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

3,804 views

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

3,599 views

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 →
{}

JSONL Formatter — Line-by-Line Validator

3,596 views

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

3,483 views

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 →
🔑

Password Entropy Calculator — Crack Time Estimator

3,281 views

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

3,277 views

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

3,011 views

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 →

Related API & Backend Tools

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 →
⏱️

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 Error Decoder — Fix Suggestion Tool

Decode HTTP status codes and OAuth 2.0 error strings with plain-English descriptions, common causes, and actionable fix suggestions. Covers every HTTP 1xx–5xx status code and all standard OAuth 2.0 error responses. Results appear instantly as you type.

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 →

GraphQL Query Formatter — Mutation & Subscription Tool

Format and prettify GraphQL queries, mutations, subscriptions, and fragments with correct indentation.

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 →
🔧

HTTP Headers Generator — Auth & Security Builder

Generate common HTTP request headers for authentication, content-type, caching, and security. Toggle each category, configure values, and copy the output as raw key-value pairs, JSON, fetch(), cURL, or axios.

Use Tool →
🔀

CORS Header Generator — Cross-Origin Config Tool

Build CORS configuration headers interactively for web servers and APIs. Set allowed origins, methods, request headers, credentials, and preflight cache duration — then copy the generated Access-Control headers or ready-to-paste code snippets for nginx, Express.js, Flask, and .NET.

Use Tool →

Share Your Feedback

Help us improve this tool by sharing your experience

We will only use this to follow up on your feedback