Skip to content

[rage] Implement pipeline in routes#652

Merged
MDA2AV merged 1 commit intoMDA2AV:mainfrom
p8:rage/pipeline-routes
Apr 27, 2026
Merged

[rage] Implement pipeline in routes#652
MDA2AV merged 1 commit intoMDA2AV:mainfrom
p8:rage/pipeline-routes

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented Apr 26, 2026

Rage allows routing to Rack directly for simple responses:
https://api.rage-rb.dev/Rage/Router/DSL/Handler#get-instance_method

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 26, 2026

/benchmark -f rage -t pipeline

@github-actions
Copy link
Copy Markdown
Contributor

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

@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 26, 2026

/benchmark -f rage -t pipelined

@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 Apr 26, 2026

/benchmark -f rage -t pipelined

@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: rage | Test: pipelined

Test Conn RPS CPU Mem Δ RPS Δ Mem
pipelined 512 1,094,743 6767.4% 4.2GiB +4.6% -8.7%
pipelined 4096 1,046,452 6627.8% 4.5GiB +4.5% -6.2%
Full log
#5 [1/7] FROM docker.io/library/ruby:4.0-slim@sha256:198547d3216e0efe6fb337997f22fa98eef4270b38033a697dad148d9d8b9b0d
#5 resolve docker.io/library/ruby:4.0-slim@sha256:198547d3216e0efe6fb337997f22fa98eef4270b38033a697dad148d9d8b9b0d 0.0s done
#5 DONE 0.0s

#6 [6/7] RUN bundle install --jobs=$(nproc)
#6 CACHED

#7 [5/7] RUN bundle config set deployment 'true'
#7 CACHED

#8 [3/7] WORKDIR /app
#8 CACHED

#9 [2/7] RUN apt-get update &&     apt-get install -y --no-install-recommends build-essential libyaml-dev libjemalloc2 &&     rm -rf /var/lib/apt/lists/*
#9 CACHED

#10 [4/7] COPY Gemfile* .
#10 CACHED

#11 [7/7] COPY . .
#11 CACHED

#12 exporting to image
#12 exporting layers done
#12 exporting manifest sha256:0265d90c406d530125e47c0bb440e25fa8d7a3c9107d166d0433b626367c0bf9 done
#12 exporting config sha256:5fabdf7ebc7fec0745373d9cacf44ecdcd12fba84f15911d154b5783bcea0811 done
#12 exporting attestation manifest sha256:51da5b8c3737de2984010d8ab78ca92b52501c7c288f8eeb9944b32454500927
#12 exporting attestation manifest sha256:51da5b8c3737de2984010d8ab78ca92b52501c7c288f8eeb9944b32454500927 0.0s done
#12 exporting manifest list sha256:a41793ef1ca33a4441ec5f8e05c2e82be36e4163f0e951d1dfe060db89e97cde 0.0s done
#12 naming to docker.io/library/httparena-rage:latest done
#12 unpacking to docker.io/library/httparena-rage:latest done
#12 DONE 0.1s
[info] tuning host for benchmark runs
[info] CPU governor → performance
[info] setting kernel socket limits
[info] setting UDP buffer sizes for QUIC
[info] setting loopback MTU to 1500 (realistic Ethernet)
[info] restarting docker daemon
[info] dropping kernel caches
[info] starting postgres sidecar
[info] postgres ready (seeded)

==============================================
=== rage / pipelined / 512c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   7.49ms   7.23ms   10.70ms   19.00ms   37.00ms

  5473715 requests in 5.00s, 5473714 responses
  Throughput: 1.09M req/s
  Bandwidth:  128.38MB/s
  Status codes: 2xx=5473715, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5474444 / 5473714 responses (100.0%)

  WARNING: 18446744073709551615/5473714 responses (337005990333246.3%) had unexpected status (expected 2xx)
[info] CPU 6767.4% | Mem 4.2GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   7.51ms   6.28ms   15.70ms   25.40ms   34.00ms

  5454804 requests in 5.00s, 5454803 responses
  Throughput: 1.09M req/s
  Bandwidth:  127.93MB/s
  Status codes: 2xx=5454803, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5454789 / 5454803 responses (100.0%)
[info] CPU 6750.0% | Mem 4.6GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     512 (8/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   7.51ms   5.89ms   16.20ms   26.70ms   34.60ms

  5450951 requests in 5.00s, 5450951 responses
  Throughput: 1.09M req/s
  Bandwidth:  127.84MB/s
  Status codes: 2xx=5450951, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5450928 / 5450951 responses (100.0%)
[info] CPU 6684.4% | Mem 4.6GiB

=== Best: 1094743 req/s (CPU: 6767.4%, Mem: 4.2GiB) ===
[info] saved results/pipelined/512/rage.json
httparena-bench-rage
httparena-bench-rage

==============================================
=== rage / pipelined / 4096c (tool=gcannon) ===
==============================================
[info] waiting for server...
[info] server ready

[run 1/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   61.42ms   52.70ms   104.10ms   165.50ms   250.80ms

  5295752 requests in 5.00s, 5232264 responses
  Throughput: 1.05M req/s
  Bandwidth:  122.71MB/s
  Status codes: 2xx=5232264, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5232263 / 5232264 responses (100.0%)
[info] CPU 6627.8% | Mem 4.5GiB

[run 2/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   60.64ms   55.60ms   102.80ms   144.50ms   182.00ms

  5290121 requests in 5.00s, 5227656 responses
  Throughput: 1.05M req/s
  Bandwidth:  122.60MB/s
  Status codes: 2xx=5227656, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5227655 / 5227656 responses (100.0%)
[info] CPU 6735.8% | Mem 4.8GiB

[run 3/3]
gcannon v0.5.3
  Target:    localhost:8080/pipeline
  Threads:   64
  Conns:     4096 (64/thread)
  Pipeline:  16
  Req/conn:  unlimited (keep-alive)
  Expected:  200
  Duration:  5s


  Thread Stats   Avg      p50      p90      p99    p99.9
    Latency   60.85ms   51.50ms   111.40ms   155.00ms   192.40ms

  5277714 requests in 5.00s, 5214227 responses
  Throughput: 1.04M req/s
  Bandwidth:  122.29MB/s
  Status codes: 2xx=5214227, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 5214215 / 5214227 responses (100.0%)
[info] CPU 6631.2% | Mem 4.8GiB

=== Best: 1046452 req/s (CPU: 6627.8%, Mem: 4.5GiB) ===
[info] saved results/pipelined/4096/rage.json
httparena-bench-rage
httparena-bench-rage
[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/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/current.json
[info] done
httparena-postgres
[info] restoring loopback MTU to 65536
[info] restoring CPU governor → powersave

@MDA2AV MDA2AV merged commit 0920af5 into MDA2AV:main Apr 27, 2026
4 checks passed
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 27, 2026

/benchmark -f rage -t pipelined —save

@github-actions
Copy link
Copy Markdown
Contributor

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

@p8 p8 deleted the rage/pipeline-routes branch April 27, 2026 13:42
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