Interactive Playground
Test rate-limiting algorithms in real-time. Connect to your local backend on localhost:8080 or use mock simulation. Configure the backend dynamically, set auto-fire rates, and watch the bucket fill and drain.
Configuration
e.g. /api/test or /api/test/v2
Manual20 req/s
Backend Config
▲ hidePOST to /config to override rate-limit settings dynamically.
{
"ip": "127.0.0.1",
"algo": "TOKEN_BUCKET",
"endpoint": "/api/test",
"parameters": {
"capacity": 10,
"refillRate": 2
}
}Algorithm State
Tokens / Requests Available10 / 10
Capacity
10
Refill Rate
2 tokens/sec
Tokens are added at 2 tokens/sec. Each request consumes 1 token.
Last Response
📤
Send a request to see the response here.
Request Timeline
📭
No requests yet. Send a request to see history.
Backend Config API Reference
Send a POST to /config to override rate-limit rules dynamically. Parameters vary by algorithm.
http
POST /config
Content-Type: application/json
{
"ip": "127.0.0.1",
"algo": "TOKEN_BUCKET", // TOKEN_BUCKET | LEAKY_BUCKET | FIXED_WINDOW | SLIDING_WINDOW
"endpoint": "/api/test",
"parameters": {
// TOKEN_BUCKET: { "capacity": 10, "refillRate": 2 }
// LEAKY_BUCKET: { "capacity": 10, "flowRate": 2 }
// FIXED_WINDOW: { "maxRequests": 10, "windowSize": 60 }
// SLIDING_WINDOW: { "maxRequests": 10, "windowTime": 60 }
}
}