Skip to content

Add axum framework - #1113

Merged
MDA2AV merged 2 commits into
MDA2AV:mainfrom
nigrosimone:add-axum
Aug 14, 2026
Merged

Add axum framework#1113
MDA2AV merged 2 commits into
MDA2AV:mainfrom
nigrosimone:add-axum

Conversation

@nigrosimone

@nigrosimone nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description

Adds Axum 0.8 on hyper and Tokio, standard mode.

  • meta.json: Rust / flagship / standard, subscribed to baseline, pipelined, limited-conn, json, json-comp and upload
  • src/main.rs: routing and Path/Query extractors through the Axum API, Json response for serde, tower-http CompressionLayer for json-comp

./scripts/validate.sh axum passes locally, 23 checks.

Disclaimer

I am neither the maintainer nor affiliated in any way with this framework. I did my best to implement it correctly, using Opus 5 as a guide.

@nigrosimone

nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

benchmark -f axum --save

@nigrosimone
nigrosimone marked this pull request as ready for review August 14, 2026 05:23
@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.

@nigrosimone

nigrosimone commented Aug 14, 2026

Copy link
Copy Markdown
Contributor Author

benchmark -f axum --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: axum | Test: all tests

Test Conn RPS CPU Mem Δ RPS Δ Mem
baseline 512 432,272 2174.5% 61MiB ~0% ~0%
baseline 4096 755,895 3178.0% 124MiB ~0% ~0%
pipelined 512 5,822,816 6158.7% 45MiB ~0% ~0%
pipelined 4096 6,500,142 6549.7% 106MiB ~0% ~0%
limited-conn 512 312,369 1332.7% 49MiB ~0% ~0%
limited-conn 4096 315,827 1313.4% 53MiB ~0% ~0%
json 4096 216,299 1525.8% 43MiB ~0% ~0%
json-comp 512 113,007 4129.0% 66MiB ~0% ~0%
json-comp 4096 107,463 4391.3% 60MiB ~0% ~0%
json-comp 16384 100,837 2706.1% 90MiB ~0% ~0%
upload 32 1,403 2948.3% 1.5GiB ~0% ~0%
upload 256 1,487 4974.6% 4.9GiB ~0% ~0%
Full log
==============================================
[info] waiting for server...
[info] server ready

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   23.07ms   15.90ms   55.50ms   80.20ms   117.70ms

  6960 requests in 5.00s, 6960 responses
  Throughput: 1.39K req/s
  Bandwidth:  167.46KB/s
  Status codes: 2xx=6960, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6960 / 6960 responses (100.0%)
  Reconnects: 1383
  Per-template: 1720,1720,1765,1755
  Per-template-ok: 1720,1720,1765,1755
[info] CPU 2762.5% | Mem 1.6GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   22.77ms   15.60ms   54.00ms   78.20ms   97.60ms

  7018 requests in 5.00s, 7019 responses
  Throughput: 1.40K req/s
  Bandwidth:  168.84KB/s
  Status codes: 2xx=7019, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 7019 / 7019 responses (100.0%)
  Reconnects: 1402
  Per-template: 1745,1739,1773,1762
  Per-template-ok: 1745,1739,1773,1762
[info] CPU 2948.3% | Mem 1.5GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   22.87ms   15.40ms   54.50ms   79.20ms   94.80ms

  6989 requests in 5.00s, 6989 responses
  Throughput: 1.40K req/s
  Bandwidth:  168.16KB/s
  Status codes: 2xx=6989, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6989 / 6989 responses (100.0%)
  Reconnects: 1397
  Per-template: 1739,1724,1760,1766
  Per-template-ok: 1739,1724,1760,1766
[info] CPU 2837.7% | Mem 1.5GiB

=== Best: 1403 req/s (CPU: 2948.3%, Mem: 1.5GiB) ===
[info] input BW: 11.13GB/s (avg template: 8516680 bytes)
[info] saved results/upload/32/axum.json
httparena-bench-axum
httparena-bench-axum

==============================================
=== axum / upload / 256c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   175.84ms   94.80ms   465.30ms   927.40ms    1.32s

  6947 requests in 5.00s, 6928 responses
  Throughput: 1.38K req/s
  Bandwidth:  166.75KB/s
  Status codes: 2xx=6928, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 6928 / 6928 responses (100.0%)
  Reconnects: 1338
  Per-template: 1502,1882,1947,1597
  Per-template-ok: 1502,1882,1947,1597
[info] CPU 4080.0% | Mem 5.0GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   168.65ms   95.70ms   445.00ms   960.00ms    1.30s

  7331 requests in 5.00s, 7331 responses
  Throughput: 1.47K req/s
  Bandwidth:  176.37KB/s
  Status codes: 2xx=7331, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 7329 / 7331 responses (100.0%)
  Reconnects: 1430
  Per-template: 1735,1945,1930,1719
  Per-template-ok: 1735,1945,1930,1719
[info] CPU 5114.1% | Mem 4.8GiB

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


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   166.16ms   97.30ms   428.40ms   937.40ms    1.21s

  7437 requests in 5.00s, 7438 responses
  Throughput: 1.49K req/s
  Bandwidth:  178.94KB/s
  Status codes: 2xx=7438, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 7435 / 7438 responses (100.0%)
  Reconnects: 1468
  Per-template: 1752,2004,1993,1686
  Per-template-ok: 1752,2004,1993,1686
[info] CPU 4974.6% | Mem 4.9GiB

=== Best: 1487 req/s (CPU: 4974.6%, Mem: 4.9GiB) ===
[info] input BW: 11.79GB/s (avg template: 8516680 bytes)
[info] saved results/upload/256/axum.json
httparena-bench-axum
httparena-bench-axum
[info] skip: axum does not subscribe to api-4
[info] skip: axum does not subscribe to api-16
[info] skip: axum does not subscribe to static
[info] skip: axum does not subscribe to static-tls
[info] skip: axum does not subscribe to async-db
[info] skip: axum does not subscribe to crud
[info] skip: axum does not subscribe to fortunes
[info] skip: axum does not subscribe to baseline-h2
[info] skip: axum does not subscribe to static-h2
[info] skip: axum does not subscribe to baseline-h2c
[info] skip: axum does not subscribe to json-h2c
[info] skip: axum does not subscribe to baseline-h3
[info] skip: axum does not subscribe to static-h3
[info] skip: axum does not subscribe to gateway-64
[info] skip: axum does not subscribe to gateway-h3
[info] skip: axum does not subscribe to production-stack
[info] skip: axum does not subscribe to unary-grpc
[info] skip: axum does not subscribe to unary-grpc-tls
[info] skip: axum does not subscribe to stream-grpc
[info] skip: axum does not subscribe to stream-grpc-tls
[info] skip: axum does not subscribe to echo-ws
[info] skip: axum does not subscribe to echo-ws-pipeline
[info] skip: axum does not subscribe to echo-ws-limited
[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/results/axum.json - 12 new, 12 total
[updated] /home/diogo/actions-runner/_work/HttpArena/HttpArena/site/data/current.json
[info] done
[info] restoring loopback MTU to 65536

@MDA2AV
MDA2AV merged commit 346a41a into MDA2AV:main Aug 14, 2026
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