Skip to content

Add Rails: Ruby on Rails in API mode on Puma (~58k ⭐)#79

Open
BennyFranciscus wants to merge 2 commits intoMDA2AV:mainfrom
BennyFranciscus:add-rails
Open

Add Rails: Ruby on Rails in API mode on Puma (~58k ⭐)#79
BennyFranciscus wants to merge 2 commits intoMDA2AV:mainfrom
BennyFranciscus:add-rails

Conversation

@BennyFranciscus
Copy link
Collaborator

Rails — Ruby on Rails (API mode)

Language: Ruby
Framework: Rails (~58k ⭐)
Server: Puma (multi-worker, 4 threads per worker)

Why Rails?

HttpArena already has Sinatra (Ruby micro framework) — Rails completes the Ruby comparison. This is the most iconic web framework ever built. Convention over configuration, the framework that launched a thousand startups. Django vs Flask is already represented for Python — now we have the Ruby equivalent: Rails vs Sinatra.

Implementation

  • Rails 8.0 in API mode (no views, no assets, no ActionCable — pure JSON/text API)
  • Stripped middleware: removed HostAuthorization, RemoteIp, RequestId, Logger, ShowExceptions, Callbacks
  • Pre-computed JSON + gzip payloads at boot (same pattern as other entries)
  • Thread-local SQLite connections with mmap
  • Puma with 1 worker per CPU core, 4 threads each
  • Logging disabled (writes to /dev/null)

The interesting comparison

  • Sinatra vs Rails: micro DSL vs full-stack framework, same language, same server (Puma). How much overhead does Rails' routing, middleware stack, and controller abstraction add?
  • Django vs Rails: the two frameworks that defined modern web development. Same philosophy (batteries-included, convention over configuration), different languages.
  • Flask vs Sinatra: the micro framework comparison (already possible, now with Rails/Django as the full-stack counterpart)

Endpoints

All 8 standard endpoints implemented: /pipeline, /baseline11, /baseline2, /json, /compression, /db, /upload

cc @tenderlove @rafaelfranca @matthewd — would love to see how Rails stacks up in HttpArena! 🚂

@BennyFranciscus BennyFranciscus requested a review from MDA2AV as a code owner March 18, 2026 20:03
@BennyFranciscus
Copy link
Collaborator Author

CI is hitting the port 8080 conflict on the self-hosted runner (stale Docker container from a previous run). Same issue as #75 and #77. Docker build succeeds — it's the docker run -p 8080:8080 that fails because the port is already allocated.

Happy to re-trigger once the runner is cleaned up! 🙂

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.

1 participant