Skip to main content

Requirements

Build Arc before running:

HTTP/1.1 benchmark

What it does

  1. Starts http_ok_backend.py (a minimal Python HTTP server)
  2. Starts arc-gateway and nginx pointing to the backend
  3. Runs one warmup round, then RUNS measurement rounds of wrk against each
  4. Parses results and writes summary.json and summary.md

Default parameters

Override any parameter via environment variable:

HTTP/2 benchmark

Uses h2load instead of wrk. A self-signed RSA-2048 certificate is generated automatically and shared between Arc and Nginx. Both terminate TLS; the backend is plain HTTP/1.1.

Default parameters


Output artifacts

Each run creates a timestamped directory under benchmark/results/:
env.txt fields recorded before each run:

Reading results

summary.json contains per-case aggregated statistics across all runs:
summary.md contains the same data as a Markdown table for easy sharing. Always use median values for published comparisons. The compare block is included automatically when both arc and nginx cases are present.

Reproducibility checklist

  • Use a fixed machine profile and kernel version (Linux ≥ 6.1 recommended for io_uring multishot)
  • Pin Arc and Nginx build versions; env.txt records the git commit
  • Run at least 5 rounds (RUNS=5) with identical settings
  • Use median values for published comparisons
  • Keep all raw *_runN.txt files alongside any published claim
  • Arc’s data plane requires Linux io_uring; use WSL2 or a native Linux host (not macOS)
  • Disable CPU frequency scaling for consistent results: cpupower frequency-set -g performance

Test backend

benchmark/backends/http_ok_backend.py is a minimal ThreadingHTTPServer that serves a fixed-size response. Accepts any GET, POST, PUT, DELETE, or HEAD. To test with a realistic backend response size:

Troubleshooting

Install the missing tool. On Ubuntu/Debian: apt install wrk for wrk; apt install nghttp2-client for h2load. Verify versions with wrk --version and h2load --version.
The benchmark found non-2xx/3xx responses. This usually means Arc or Nginx is rejecting requests (wrong config, rate limit, or backend not running). Check backend.log and arc.err.log in the output directory. Disable the check with REQUIRE_ZERO_NON2XX=0 only when debugging.
High variance is common when CPU frequency scaling is enabled. Disable it with:
Also check for background processes consuming CPU. Use the median (not mean) from summary.json for published comparisons.
The H2 benchmark generates a self-signed certificate. If h2load rejects it, check which TLS skip flag your h2load version uses. The script auto-detects --insecure, --no-verify-peer, or -k. If none match, update the script’s TLS flag detection.
The script allocates ports at random from a safe range. If a collision occurs, kill the conflicting process or re-run — a new random port will be chosen.