Benchmarks

2026-10-05 — Response cache hit benchmark (Docker Desktop smoke run)

Same host, harness and caveats as 2026-10-05-m2-runtimes.md (±15–20 % run-to-run noise).

docker run --rm --cpuset-cpus 0-11 --cap-add SYS_NICE -e DURATION=10 \
  -e SCENARIOS="proxy cache-hit" -v scb-bench-www:/bench/www -v "$PWD/bench/results:/results" scb-bench

cache-hit requests /api/cached, for which the bench upstream sends Cache-Control: public, max-age=3600.

server  scenario      rps   p50_ms  p95_ms  p99_ms  cpu_s  peak_rss_mib
scb     proxy       44353     1.33    2.46    3.78  31.24        18
scb     cache-hit   92104     0.62    1.32    1.97  30.21        18
nginx   proxy       84939     0.69    1.32    2.08  34.72        63
nginx   cache-hit   76202     0.79    1.29    1.98  37.05        63
caddy   proxy       25776     1.91    6.48    9.55  33.01        50
caddy   cache-hit   27099     1.84    6.07    9.04  33.64        51

All runs: 100 % success, no non-2xx responses.

Findings

  • scb serves cache hits at 2.1× its own proxy throughput, with p99 under 2 ms.
  • nginx’s proxy_cache is file-backed (page cache + file reads per hit), scb’s cache is in memory, so this is not a like-for-like comparison of cache designs; it shows that the cache stage adds no bottleneck of its own.
  • Caddy has no built-in response cache; its cache-hit row is plain proxying.
  • The scb proxy path itself remains at ~0.5× nginx (see ROADMAP M1 remaining: scheduler utilisation), which is unrelated to the cache.