Skip to content

[roda] Call public/static route as last#698

Merged
MDA2AV merged 3 commits into
MDA2AV:mainfrom
p8:roda/static-as-last
May 11, 2026
Merged

[roda] Call public/static route as last#698
MDA2AV merged 3 commits into
MDA2AV:mainfrom
p8:roda/static-as-last

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented May 11, 2026

The static route checks if files exist, which can be expensive. Instead, match this route only if others don't match.

The static route checks if files exist, which can be expensive.
Instead, match this route only if others don't match.
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 11, 2026

/benchmark -f roda

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: roda | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 99,134 4818.6% 9.4GiB +0.6% -2.1%
baseline 4096 55,314 4234.9% 8.5GiB +6.7% -1.2%
pipelined 512 699,914 6651.7% 1.6GiB +25.0% -5.9%
pipelined 4096 675,308 6640.0% 2.0GiB +21.6% -4.8%
limited-conn 512 28,867 3761.1% 5.7GiB +1.4% +5.6%
limited-conn 4096 28,669 3526.5% 6.5GiB -0.7% -1.5%
json 4096 246,888 6402.8% 4.2GiB +7.5% -4.5%
json-comp 512 129,431 6476.6% 3.4GiB +1.4% -15.0%
json-comp 4096 138,403 6519.5% 3.8GiB +5.3% +2.7%
json-comp 16384 136,514 6526.0% 4.8GiB +4.8% +6.7%
json-tls 4096 219,335 6507.6% 5.8GiB +4.4% +9.4%
upload 32 960 3078.5% 8.5GiB -0.1% +1.2%
upload 256 917 6507.0% 7.1GiB +2.1% -19.3%
api-4 256 19,411 397.5% 482MiB +4.5% -1.8%
api-16 1024 47,765 1681.5% 1.5GiB +3.3% ~0%
static 1024 138,823 6537.8% 6.0GiB -1.4% -1.6%
static 4096 136,506 6502.9% 6.8GiB -2.8% +4.6%
static 6800 137,142 6452.8% 6.5GiB -1.3% ~0%
async-db 1024 110,386 6361.2% 2.5GiB +2.4% ~0%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    29.42ms    9.86ms 247.32ms   81.27%
    Req/Sec     2.12k   502.48    11.96k    92.57%
  687537 requests in 5.11s, 10.52GB read
Requests/sec: 134664.50
Transfer/sec:      2.06GB
[info] CPU 6507.9% | Mem 6.2GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    28.91ms    9.29ms 267.90ms   80.83%
    Req/Sec     2.15k   514.08    12.11k    91.77%
  696221 requests in 5.10s, 10.66GB read
Requests/sec: 136506.43
Transfer/sec:      2.09GB
[info] CPU 6502.9% | Mem 6.8GiB

=== Best: 136506 req/s (CPU: 6502.9%, Mem: 6.8GiB) ===
[info] saved results/static/4096/roda.json
httparena-bench-roda
httparena-bench-roda

==============================================
=== roda / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    53.58ms   63.85ms   1.00s    96.81%
    Req/Sec     2.03k     0.92k    5.48k    78.07%
  649161 requests in 5.10s, 9.94GB read
Requests/sec: 127173.73
Transfer/sec:      1.95GB
[info] CPU 6456.9% | Mem 6.0GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    46.57ms   17.65ms 374.62ms   85.33%
    Req/Sec     2.13k   668.81     9.76k    81.42%
  691486 requests in 5.11s, 10.58GB read
Requests/sec: 135188.28
Transfer/sec:      2.07GB
[info] CPU 6527.7% | Mem 6.2GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    47.34ms   29.78ms 537.02ms   96.52%
    Req/Sec     2.16k   701.02    10.87k    79.83%
  699636 requests in 5.10s, 10.71GB read
Requests/sec: 137142.47
Transfer/sec:      2.10GB
[info] CPU 6452.8% | Mem 6.5GiB

=== Best: 137142 req/s (CPU: 6452.8%, Mem: 6.5GiB) ===
[info] saved results/static/6800/roda.json
httparena-bench-roda
httparena-bench-roda

==============================================
=== roda / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.73ms   8.59ms   14.10ms   23.20ms   90.70ms

  1093058 requests in 10.00s, 1093059 responses
  Throughput: 109.28K req/s
  Bandwidth:  443.17MB/s
  Status codes: 2xx=1093059, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1093059 / 1093059 responses (100.0%)
  Reconnects: 43231
  Per-template: 218092,218920,219222,218718,218107
  Per-template-ok: 218092,218920,219222,218718,218107
[info] CPU 6067.3% | Mem 2.4GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.63ms   8.52ms   14.70ms   21.40ms   33.20ms

  1092028 requests in 10.00s, 1092032 responses
  Throughput: 109.18K req/s
  Bandwidth:  442.94MB/s
  Status codes: 2xx=1092032, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1092029 / 1092032 responses (100.0%)
  Reconnects: 43454
  Per-template: 217433,218430,219435,219104,217627
  Per-template-ok: 217433,218430,219435,219104,217627
[info] CPU 6336.6% | Mem 2.3GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.54ms   8.26ms   14.70ms   21.20ms   32.90ms

  1103859 requests in 10.00s, 1103861 responses
  Throughput: 110.36K req/s
  Bandwidth:  447.51MB/s
  Status codes: 2xx=1103861, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1103857 / 1103861 responses (100.0%)
  Reconnects: 43899
  Per-template: 220305,221120,221472,220818,220142
  Per-template-ok: 220305,221120,221472,220818,220142
[info] CPU 6361.2% | Mem 2.5GiB

=== Best: 110386 req/s (CPU: 6361.2%, Mem: 2.5GiB) ===
[info] input BW: 7.37MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/roda.json
httparena-bench-roda
httparena-bench-roda
[info] skip: roda does not subscribe to crud
[info] skip: roda does not subscribe to fortunes
[info] skip: roda does not subscribe to baseline-h2
[info] skip: roda does not subscribe to static-h2
[info] skip: roda does not subscribe to baseline-h2c
[info] skip: roda does not subscribe to json-h2c
[info] skip: roda does not subscribe to baseline-h3
[info] skip: roda does not subscribe to static-h3
[info] skip: roda does not subscribe to gateway-64
[info] skip: roda does not subscribe to gateway-h3
[info] skip: roda does not subscribe to production-stack
[info] skip: roda does not subscribe to unary-grpc
[info] skip: roda does not subscribe to unary-grpc-tls
[info] skip: roda does not subscribe to stream-grpc
[info] skip: roda does not subscribe to stream-grpc-tls
[info] skip: roda does not subscribe to echo-ws
[info] skip: roda does not subscribe to echo-ws-pipeline
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 11, 2026

/benchmark -f roda —save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented May 11, 2026

/benchmark -f roda —save

use --save, the em dash doesnt work btw

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ /benchmark --save cannot start: main has diverged and cannot be auto-merged into this branch. Please merge or rebase main manually, push, and re-run /benchmark --save.

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented May 11, 2026

/benchmark -f roda —save

use --save, the em dash doesnt work btw

Ah, that was an autocomplete on the iPhone
/benchmark -f roda --save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@MDA2AV
Copy link
Copy Markdown
Owner

MDA2AV commented May 11, 2026

/benchmark -f roda --save

@github-actions
Copy link
Copy Markdown
Contributor

👋 /benchmark request received. A collaborator will review and approve the run.

@github-actions
Copy link
Copy Markdown
Contributor

Benchmark Results

Framework: roda | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 102,154 4699.5% 9.6GiB +3.7% ~0%
baseline 4096 54,464 4173.7% 8.5GiB +5.1% -1.2%
pipelined 512 692,015 6644.1% 1.6GiB +23.6% -5.9%
pipelined 4096 672,114 6647.3% 2.0GiB +21.0% -4.8%
limited-conn 512 28,781 3740.4% 5.8GiB +1.1% +7.4%
limited-conn 4096 28,526 3572.6% 6.5GiB -1.2% -1.5%
json 4096 245,452 6346.6% 4.2GiB +6.9% -4.5%
json-comp 512 130,510 6465.8% 3.5GiB +2.2% -12.5%
json-comp 4096 139,762 6464.8% 4.0GiB +6.3% +8.1%
json-comp 16384 137,163 6254.5% 5.0GiB +5.3% +11.1%
json-tls 4096 219,336 6516.1% 5.7GiB +4.4% +7.5%
upload 32 964 3057.1% 8.2GiB +0.3% -2.4%
upload 256 913 6351.6% 7.6GiB +1.7% -13.6%
api-4 256 19,190 397.4% 491MiB +3.3% ~0%
api-16 1024 48,159 1685.8% 1.5GiB +4.1% ~0%
static 1024 140,014 6524.3% 6.3GiB -0.6% +3.3%
static 4096 137,643 6520.7% 6.3GiB -2.0% -3.1%
static 6800 136,769 6535.6% 6.2GiB -1.5% -4.6%
async-db 1024 111,367 6367.9% 2.5GiB +3.3% ~0%
Full log
[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    28.80ms    8.81ms 253.88ms   79.86%
    Req/Sec     2.16k   440.71     8.67k    92.79%
  701995 requests in 5.10s, 10.75GB read
Requests/sec: 137643.65
Transfer/sec:      2.11GB
[info] CPU 6520.7% | Mem 6.3GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 4096 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    28.68ms    9.01ms 262.58ms   80.40%
    Req/Sec     2.16k   493.55    12.69k    89.31%
  698868 requests in 5.10s, 10.70GB read
Requests/sec: 136981.75
Transfer/sec:      2.10GB
[info] CPU 6507.2% | Mem 6.8GiB

=== Best: 137643 req/s (CPU: 6520.7%, Mem: 6.3GiB) ===
[info] saved results/static/4096/roda.json
httparena-bench-roda
httparena-bench-roda

==============================================
=== roda / static / 6800c (tool=wrk) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    55.98ms   77.03ms   1.03s    96.58%
    Req/Sec     2.05k     0.96k    5.66k    77.69%
  654867 requests in 5.10s, 10.02GB read
Requests/sec: 128419.90
Transfer/sec:      1.97GB
[info] CPU 6453.6% | Mem 5.9GiB

[run 2/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    47.26ms   28.22ms 533.48ms   95.88%
    Req/Sec     2.16k   704.12    10.93k    80.41%
  699758 requests in 5.12s, 10.71GB read
Requests/sec: 136769.52
Transfer/sec:      2.09GB
[info] CPU 6535.6% | Mem 6.2GiB

[run 3/3]
Running 5s test @ http://localhost:8080
  64 threads and 6800 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    46.23ms   17.67ms 351.56ms   83.85%
    Req/Sec     2.13k   692.31    10.06k    81.24%
  691420 requests in 5.10s, 10.58GB read
Requests/sec: 135563.51
Transfer/sec:      2.08GB
[info] CPU 6453.0% | Mem 6.5GiB

=== Best: 136769 req/s (CPU: 6535.6%, Mem: 6.2GiB) ===
[info] saved results/static/6800/roda.json
httparena-bench-roda
httparena-bench-roda

==============================================
=== roda / async-db / 1024c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.64ms   8.28ms   14.30ms   22.40ms   85.00ms

  1105017 requests in 10.00s, 1105017 responses
  Throughput: 110.47K req/s
  Bandwidth:  448.06MB/s
  Status codes: 2xx=1105017, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1105017 / 1105017 responses (100.0%)
  Reconnects: 43729
  Per-template: 220376,221154,221781,221293,220413
  Per-template-ok: 220376,221154,221781,221293,220413
[info] CPU 6075.1% | Mem 2.4GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.62ms   8.34ms   14.70ms   21.00ms   31.40ms

  1098127 requests in 10.00s, 1098128 responses
  Throughput: 109.79K req/s
  Bandwidth:  445.31MB/s
  Status codes: 2xx=1098128, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1098128 / 1098128 responses (100.0%)
  Reconnects: 43703
  Per-template: 219380,219709,219933,219779,219327
  Per-template-ok: 219380,219709,219933,219779,219327
[info] CPU 6356.3% | Mem 2.3GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/
  Threads:   64
  Conns:     1024 (16/thread)
  Pipeline:  1
  Req/conn:  25
  Templates: 5
  Expected:  200
  Duration:  10s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   8.39ms   8.06ms   14.60ms   20.60ms   30.50ms

  1113669 requests in 10.00s, 1113673 responses
  Throughput: 111.34K req/s
  Bandwidth:  451.82MB/s
  Status codes: 2xx=1113673, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1113672 / 1113673 responses (100.0%)
  Reconnects: 44292
  Per-template: 221961,222749,223408,223180,222374
  Per-template-ok: 221961,222749,223408,223180,222374
[info] CPU 6367.9% | Mem 2.5GiB

=== Best: 111367 req/s (CPU: 6367.9%, Mem: 2.5GiB) ===
[info] input BW: 7.43MB/s (avg template: 70 bytes)
[info] saved results/async-db/1024/roda.json
httparena-bench-roda
httparena-bench-roda
[info] skip: roda does not subscribe to crud
[info] skip: roda does not subscribe to fortunes
[info] skip: roda does not subscribe to baseline-h2
[info] skip: roda does not subscribe to static-h2
[info] skip: roda does not subscribe to baseline-h2c
[info] skip: roda does not subscribe to json-h2c
[info] skip: roda does not subscribe to baseline-h3
[info] skip: roda does not subscribe to static-h3
[info] skip: roda does not subscribe to gateway-64
[info] skip: roda does not subscribe to gateway-h3
[info] skip: roda does not subscribe to production-stack
[info] skip: roda does not subscribe to unary-grpc
[info] skip: roda does not subscribe to unary-grpc-tls
[info] skip: roda does not subscribe to stream-grpc
[info] skip: roda does not subscribe to stream-grpc-tls
[info] skip: roda does not subscribe to echo-ws
[info] skip: roda does not subscribe to echo-ws-pipeline
[info] rebuilding site/data/*.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/frameworks.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-16-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/api-4-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/async-db-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/baseline-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-16384.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-comp-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/json-tls-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/limited-conn-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/pipelined-512.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-1024.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-4096.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/static-6800.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-256.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/upload-32.json
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@MDA2AV MDA2AV merged commit 0769e24 into MDA2AV:main May 11, 2026
@p8 p8 deleted the roda/static-as-last branch May 12, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants