Skip to content

Benchmarks

All benchmarks use wrk with consistent methodology. Numbers represent requests per second (higher is better).

Native Benchmark (Apple M4, Rust backend)

Measured with bench-native.sh (5 runs x 10s, c=100, median reported). Rust backend (pure hyper, 194K raw req/s) eliminates the backend as a bottleneck. Numbers below were captured on a v0.1.4 build; the latest per-commit history (including any deltas under v0.1.7) lives in benchmarks/bench-history.json and is the source of truth.

EndpointMedian req/sBest RunCV%Errors
HTML SSR 5KB233,170235,3701.1%0
CSS 3KB (cached)209,573215,4083.4%0
Cache Hit JS 4KB (RAM)195,318207,5217.1%0
TLS Proxy API GET 1KB106,505107,1892.1%0
WAF POST JSON103,206103,5470.5%0
JS 4KB (no cache)102,892104,1351.3%0
PNG 8KB (no cache)99,496101,2901.7%0
WOFF2 16KB (no cache)83,87086,2422.5%0

Security validation: SQLi and XSS injection blocked (HTTP 400).

Go vs Rust Backend Impact

EndpointGo BackendRust BackendDelta
TLS Proxy API93,253106,505+14.2%
WAF POST91,893103,206+12.3%
JS uncached75,500102,892+36.3%
PNG 8KB59,53799,496+67.1%
WOFF2 16KB53,08783,870+58.0%

Cache-hit paths are unchanged (backend not involved), confirming the Go runtime was the ceiling.

Fair Docker Comparison

Both Zion and nginx run in Docker containers with identical resource limits: 1 CPU, 256 MB RAM. Same backend, same routes, same TLS certificates.

Endpointnginx 1.27Zion TLSZion WAFZion FullBest DeltaErrors
API GET (1KB)29,40427,51727,43827,537-6.3%0
HTML (5KB)25,65752,58153,01653,368+108.0%0
JS (4KB)23,15218,16518,03732,366+39.8%0
PNG (8KB)17,40913,41114,34524,770+42.3%0
WAF POST27,77226,17325,65326,909-3.1%0
CSS cached27,43616,80014,94925,111-8.5%0

Native Linux (1-core, bare metal)

Scenarionginx (req/s)Zion (req/s)Delta
API GET (TLS proxy)12,30012,500Parity
HTML page (TLS proxy)10,30041,700+303%
WAF POST (Aho-Corasick)11,90011,600Parity

Methodology

  • Tool: wrk 4.2.0, 2 threads, 100 connections
  • Runs: 5 measurement runs x 10s each, median reported
  • Statistics: Median, CI95, coefficient of variation (CV%)
  • TLS: Self-signed certificates, TLS 1.3, rustls 0.23, session tickets + 0-RTT
  • Backend: Rust test server (hyper, 194K raw req/s) or Go test server (matrix)
  • Build: opt-level=3, LTO=fat, codegen-units=1, panic=abort, target-cpu=native, mimalloc
  • Docker: --cpus=1 --memory=256m for fair nginx comparison
  • Reproducibility: bash benchmarks/bench-native.sh

Released under the MIT License.