Single-script benchmark suite for fairvisor/edge with reproducible latency and throughput tests.
Script: run-all.sh
run-all.sh runs 6 scenarios:
- Raw nginx baseline latency (
:8082) - Fairvisor
decision_servicelatency (POST /v1/decision) - Fairvisor
reverse_proxylatency - Max throughput: simple policy (1 rule)
- Max throughput: complex policy (5 rules + JWT + loop detection)
- Max throughput: LLM token estimation policy (
token_bucket_llm)
Each run prints a summary table and stores raw artifacts.
- Designed for Linux hosts (Amazon Linux / Ubuntu)
- Installs dependencies automatically:
- OpenResty
- k6
- jq, bc, git, python3, pip3
- Clones
https://github.com/fairvisor/edgeinto/opt/fairvisor
Run directly on target host:
bash run-all.shRun from local machine and execute remotely:
REMOTE=ubuntu@<host> bash run-all.shWhen REMOTE is set, the script copies itself to /tmp/fv-bench/run-all.sh, executes there, and downloads log to ./fairvisor-bench.log.
For setups where SUT and k6 share one host, optional taskset pinning is supported.
ORESTY_CPUSETfor OpenResty/backend processesK6_CPUSETfor k6
Example:
ORESTY_CPUSET=0-3 K6_CPUSET=4-7 bash run-all.shIf taskset exists and host has >=8 cores, defaults are auto-split 50/50.
On target host:
- Raw k6 summaries:
/tmp/fv-bench/results/ - Generated k6 scripts:
/tmp/fv-bench/scripts/ - Service logs:
/tmp/fv-bench/run/*/logs/ - Full run log:
/tmp/fv-bench/run-all.log
Local (when REMOTE is used):
- Downloaded run log:
./fairvisor-bench.log
Measured on AWS c7i.2xlarge (8 vCPU, 16 GB RAM), Ubuntu 24.04.3 LTS. k6 v0.54.0, constant-arrival-rate, 10 000 RPS / 60 s / 10 s warmup. CPU pinning: OpenResty on cores 0–3, k6 on cores 4–7.
| Percentile | Decision Service | Reverse Proxy | Raw nginx |
|---|---|---|---|
| p50 | 112 μs | 241 μs | 71 μs |
| p90 | 191 μs | 376 μs | 190 μs |
| p99 | 426 μs | 822 μs | 446 μs |
| p99.9 | 2 990 μs | 2 980 μs | 1 610 μs |
| Configuration | RPS |
|---|---|
| Simple rate limit (1 rule) | 110 500 |
| Complex policy (5 rules, JWT + loop detect) | 67 600 |
| Token estimation (token_bucket_llm) | 49 400 |
Your numbers will vary by instance type and OS. Use
results/reference.jsonto compare programmatically.
decision_serviceandreverse_proxyare different paths:decision_service: decision API onlyreverse_proxy: decision + upstream proxy round-trip
- In single-host runs, k6 and SUT can contend for CPU unless pinned/separated.
- For production-like proxy latency, prefer separate load-generator host.
This benchmark suite is intended to be published in:
https://github.com/fairvisor/benchmark