API Rate Limit Calculator
Calculate optimal rate limits for your API. Generate configurations for Nginx, Kong, AWS, and more.
Rate Limit Configuration
Traffic Profile
Average sustained request rate
Highest expected burst
Clients sharing the limit
Rate Limiting Strategy
Defaults to 20% of rate
Window Settings
Rate / Second
100
Rate / Minute
6,000
Rate / Hour
360,000
Burst Capacity
20
Recommended Max
100 req/s
Per-Consumer Rate
10 req/s
Across 10 consumers
Peak Headroom
-50 req/s
Below peak — raise limit
Queue Size
20
Strategy
Token Bucket
Window Size
60 seconds
Configuration Snippets
# Nginx Rate Limiting Configuration
limit_req_zone $binary_remote_addr zone=mylimit:10m rate=100r/s;
server {
location /api/ {
limit_req zone=mylimit burst=20 nodelay;
limit_req_status 429;
# Add rate limit headers
add_header X-RateLimit-Limit 100 always;
add_header X-RateLimit-Remaining $limit_req_remaining always;
add_header X-RateLimit-Reset $limit_req_reset always;
}
}-- Kong Rate Limiting Configuration
-- Via Admin API:
curl -X POST http://localhost:8001/plugins \
-H "Content-Type: application/json" \
-d '{
"name": "rate-limiting",
"config": {
"second": 100,
"minute": 6000,
"hour": 360000,
"limit_by": "consumer",
"strategy": "local",
"fault_tolerant": true
}
}'
-- Or via declarative config:
_plugins:
- name: rate-limiting
config:
second: 100
minute: 6000
hour: 360000
limit_by: consumer
strategy: local
fault_tolerant: true
// AWS API Gateway Rate Limiting
{
"QuotaSettings": {
"Limit": 6000,
"Period": "MINUTE"
},
"ThrottleSettings": {
"BurstLimit": 20,
"RateLimit": 100
}
}
// Or via AWS CLI:
aws apigateway update-stage \
--rest-api-id YOUR_API_ID \
--stage-name prod \
--patch-operations op=replace,path=/*/*/throttling/burstLimit,value=20 \
op=replace,path=/*/*/throttling/rateLimit,value=100
// Standard Rate Limiting Headers (IETF RFC 6585)
X-RateLimit-Limit: 100 // Max requests per second
X-RateLimit-Remaining: 99 // Requests left in current window
X-RateLimit-Reset: 1782362276 // Unix timestamp of window reset
RateLimit-Policy: token-bucket;w=60 // Policy and window size
Retry-After: 60 // Seconds to wait before retry
// Additional headers for detailed info
X-RateLimit-Reset-After: 60s // Human-readable reset time
X-RateLimit-Remaining-After: 50 // Estimated remaining after current request
Frequently Asked Questions
Related Tools
System Latency Budget Calculator
⏱️Allocate latency budgets across frontend, backend, network, database layers. Track P95 performance targets and identify bottlenecks
Try it now →Kafka Message Size Calculator
📨Calculate Kafka message size including overhead, batch size, compression, and throughput estimation
Try it now →Jira Story Points Calculator
📝Calculate agile story points using Fibonacci sequence. Input complexity, effort, and risk factors to get recommended point values
Try it now →