Skip to content

[rails] Implement pipeline in routes#651

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

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

Conversation

@p8
Copy link
Copy Markdown
Contributor

@p8 p8 commented Apr 26, 2026

Rails allows routing to Rack directly for simple responses:
https://guides.rubyonrails.org/routing.html#routing-to-rack-applications

@p8 p8 force-pushed the rails/pipeline-routes branch from eba3800 to 409cd96 Compare April 26, 2026 16:32
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 26, 2026

/benchmark -f rails -t pipeline

@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: rails | Test: pipeline

Test Conn RPS CPU Mem Δ RPS Δ Mem
Full log
[info] available CPUs: 128
[info] framework: rails (rails, Ruby)
[info] subscribed tests: baseline,pipelined,limited-conn,json,json-comp,upload,api-4,api-16,async-db,static
[info] building image: httparena-rails
#0 building with "default" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 622B done
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ruby:4.0-slim
#2 DONE 0.9s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [internal] load build context
#4 transferring context: 4.16kB done
#4 DONE 0.0s

#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.1s done
#5 DONE 0.1s

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

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

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

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

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

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

#12 exporting to image
#12 exporting layers done
#12 exporting manifest sha256:d762db4701731fedb18a9b877610657a4905299cae4e762e4d7ac30b24f220bb
#12 exporting manifest sha256:d762db4701731fedb18a9b877610657a4905299cae4e762e4d7ac30b24f220bb done
#12 exporting config sha256:123cc6df87121961acccc156e4e790b76ac33e05c8ba11b705144475ebcf3ac0 done
#12 exporting attestation manifest sha256:705c486db4ea06cdd13971d8b8183a56bbe2fdc04a0cf14a0d255c9d8374b3b2 0.1s done
#12 exporting manifest list sha256:a00ca2f62ba77faee2287f47963a5e49d706ace5faf1e041addf5177bfd85e6f 0.0s done
#12 naming to docker.io/library/httparena-rails:latest
#12 naming to docker.io/library/httparena-rails:latest done
#12 unpacking to docker.io/library/httparena-rails: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)
[warn] unknown profile: 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/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 Apr 26, 2026

/benchmark -f rails -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: rails | Test: pipelined

Test Conn RPS CPU Mem Δ RPS Δ Mem
pipelined 512 330,526 6523.8% 2.2GiB +62.1% +4.8%
pipelined 4096 327,126 6513.2% 2.3GiB +68.2% -11.5%
Full log
#6 CACHED

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

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

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

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

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

#12 exporting to image
#12 exporting layers done
#12 exporting manifest sha256:d762db4701731fedb18a9b877610657a4905299cae4e762e4d7ac30b24f220bb done
#12 exporting config sha256:123cc6df87121961acccc156e4e790b76ac33e05c8ba11b705144475ebcf3ac0 done
#12 exporting attestation manifest sha256:01c0afeff1922557cbda3034d9c37cfd8076d753b01f68b0cb247eb59cc2bcae
#12 exporting attestation manifest sha256:01c0afeff1922557cbda3034d9c37cfd8076d753b01f68b0cb247eb59cc2bcae 0.0s done
#12 exporting manifest list sha256:4f7dfcb3b82b422cd8f4adff98f038e0f437aebed21905dde1e1621f743a4cca 0.0s done
#12 naming to docker.io/library/httparena-rails:latest done
#12 unpacking to docker.io/library/httparena-rails: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)

==============================================
=== rails / 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   25.90ms   22.20ms   47.60ms   78.90ms   219.80ms

  1601161 requests in 5.00s, 1579961 responses
  Throughput: 315.79K req/s
  Bandwidth:  55.12MB/s
  Status codes: 2xx=1579961, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1579961 / 1579961 responses (100.0%)
  Reconnects: 1325
  Errors: connect 0, read 5, timeout 0
[info] CPU 6435.2% | Mem 2.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   24.64ms   20.20ms   51.00ms   68.50ms   84.60ms

  1675350 requests in 5.00s, 1652630 responses
  Throughput: 330.41K req/s
  Bandwidth:  57.69MB/s
  Status codes: 2xx=1652630, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1652622 / 1652630 responses (100.0%)
  Reconnects: 1420
  Errors: connect 0, read 1, timeout 0
[info] CPU 6523.8% | Mem 2.2GiB

[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   25.27ms   22.30ms   48.40ms   71.30ms   93.80ms

  1632916 requests in 5.00s, 1610804 responses
  Throughput: 321.93K req/s
  Bandwidth:  56.19MB/s
  Status codes: 2xx=1610804, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1610796 / 1610804 responses (100.0%)
  Reconnects: 1382
[info] CPU 6473.9% | Mem 2.2GiB

=== Best: 330526 req/s (CPU: 6523.8%, Mem: 2.2GiB) ===
[info] saved results/pipelined/512/rails.json
httparena-bench-rails
httparena-bench-rails

==============================================
=== rails / 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   177.44ms   190.70ms   216.10ms   403.40ms   610.30ms

  1601939 requests in 5.00s, 1556275 responses
  Throughput: 311.17K req/s
  Bandwidth:  54.31MB/s
  Status codes: 2xx=1556275, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1556275 / 1556275 responses (100.0%)
[info] CPU 6399.5% | Mem 2.3GiB

[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   174.64ms   192.50ms   214.70ms   331.90ms   440.40ms

  1672816 requests in 5.00s, 1635632 responses
  Throughput: 327.01K req/s
  Bandwidth:  57.07MB/s
  Status codes: 2xx=1635632, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1635628 / 1635632 responses (100.0%)
  Reconnects: 2
[info] CPU 6513.2% | Mem 2.3GiB

[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   176.37ms   193.50ms   212.90ms   305.50ms   452.30ms

  1663776 requests in 5.00s, 1625968 responses
  Throughput: 325.05K req/s
  Bandwidth:  56.73MB/s
  Status codes: 2xx=1625968, 3xx=0, 4xx=0, 5xx=0
  Latency samples: 1625963 / 1625968 responses (100.0%)
  Reconnects: 13
[info] CPU 6483.2% | Mem 2.3GiB

=== Best: 327126 req/s (CPU: 6513.2%, Mem: 2.3GiB) ===
[info] saved results/pipelined/4096/rails.json
httparena-bench-rails
httparena-bench-rails
[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 f6095a7 into MDA2AV:main Apr 27, 2026
4 checks passed
@p8 p8 deleted the rails/pipeline-routes branch April 27, 2026 10:54
@p8
Copy link
Copy Markdown
Contributor Author

p8 commented Apr 27, 2026

/benchmark -f rails -t pipelined —save

@github-actions
Copy link
Copy Markdown
Contributor

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

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