The /test endpoint is a flexible target for exercising clients under different latency
and payload scenarios. You can call it with any HTTP method; query parameters control timing and
response length.
| Parameter | Type / Range | Description | Examples |
|---|---|---|---|
random_delay_ms |
integer, 1–600 000 | Introduces a server-side wait before responding. Useful for simulating slow backends. |
/test?random_delay_ms=500/test?random_delay_ms=10000
|
baseline_delay_ms |
integer, 1–600 000 (default 0) | Always waits this many milliseconds before doing anything else. Combine with random_delay_ms for deterministic + variable latency. |
/test?baseline_delay_ms=250/test?baseline_delay_ms=750&random_delay_ms=250
|
response_size_bytes |
integer, 0–1 048 576 |
Sets the exact byte length of the response body. The response is the string
"OK" repeated and trimmed to match the requested size.
|
/test?response_size_bytes=0/test?response_size_bytes=1024
|
disable_rate_limit |
boolean flag (true/1/yes) |
Skips per-IP rate limiting for this request. Handy for stress tools; omitted by default so the global limiter still protects other paths. |
/test?disable_rate_limit=true/test?baseline_delay_ms=200&disable_rate_limit=1
|
Parameters are optional and can be combined, e.g.
/test?baseline_delay_ms=250&random_delay_ms=250&response_size_bytes=4096.
When no parameters are supplied, the endpoint replies immediately with OK.
Rate limiting is enforced per IP (~200 req/s over a 5-second window); requests that are rejected
short-circuit before any delays run. Add disable_rate_limit=true if you need to bypass the limiter for a specific test run.
Because /test accepts all HTTP verbs via router.all, you can also exercise
non-GET behaviours (POST, PUT, etc.). Request bodies are ignored, letting you focus on client-side
behaviour while the server responds deterministically.
curl -k "https://your-host/test?random_delay_ms=750&response_size_bytes=128"
hey -z 30s -q 50 -disable-compression \ "https://your-host/test?random_delay_ms=100&response_size_bytes=2048"