Implementation

Ruby on Rails

Ruby on Rails 8.1.4.1 · Ruby · Full-stack frameworks · ranked

frameworks/rails on GitHub

Scores

Score relative to Axum (1.00×, higher is better) and position among the 14 ranked implementations; Stability: pass.
CategoryPositionScore±
Hello world130.013*±23.0%
Database11–130.30*±24.8%
Application11–130.10*±32.8%
Memory (high-water mark)130.15±9.4%
Startup1–130.72±22.3%

Runner CPUs: EPYC 7763, EPYC 9V74, Xeon 6975P-C

Settings

Runtime
Ruby 4.0.9 with YJIT and jemalloc
Server
Puma 8.1 behind Thruster 0.1, as in the Dockerfile rails new generates
Workers
Puma cluster mode: WEB_CONCURRENCY = BENCH_WORKERS (2) workers x 3 threads (the generated RAILS_MAX_THREADS default)
Database layer
Active Record (pg 1.7), pools of up to 8 connections per worker (16 in total); 6 in use, one per Puma thread (2 workers x 3 threads)
Templates
ERB (Action View)
Logging
Rails at warn (no request lines); Thruster's request log off
Dependency source
–
Status
measured

Notes

Application endpoints: mechanisms

Validation
Route constraint id: /\d+/ (404); Active Model form objects (ActiveModel::API with numericality and length validations) for the query string, the JSON body and the form: 422; malformed JSON 400
CSRF
token (built-in): protect_from_forgery (ActionController::Base default): token in the encrypted cookie session, masked authenticity_token field, Origin checked when present; InvalidAuthenticityToken, 422
Session store
postgresql (generator): bin/rails generate authentication: a sessions row looked up through the signed session_id cookie, the user loaded through it; has_secure_password (bcrypt) on users.password_bcrypt

Tier 1 endpoints

Medians over every round (lowest and highest round in brackets); vs Axum: the median of the per-round ratios on the same runners.
Endpointreq/svs AxumEfficiency (req/CPU-s)p99 (ms)ErrorsLimits
/text1,823 (1,697–2,848)0.01913182.530
/json1,856 (1,760–2,923)0.01931163.440
/db-single1,567 (1,517–2,431)0.10785184.540
/html1,733 (1,585–2,544)0.01869191.700
/queries?queries=20604 (542–1,163)0.68305251.340
/fortunes1,444 (1,342–2,144)0.06723217.100
GET /world/{id}1,570 (1,435–2,345)0.11787195.070
GET /worlds1,268 (1,214–1,865)0.12636238.730
POST /form1,300 (1,213–1,774)0.02652308.970
GET /me1,169 (1,066–1,593)0.15586246.380
/updates?queries=20273 (244–542)0.71145522.880
PUT /world/{id}1,291 (1,190–1,847)0.11651203.790

Measured versions

Runner jobs

Each job ran on its own GitHub-hosted runner; the CPU model differs between jobs.
JobCPU modelRoundsStatus
1EPYC 77635measured
2EPYC 9V745measured
3Xeon 6975P-C5measured