October 5, 2026
Campfire in Rust outpaces Ruby: up to 168 times faster in Basecamp's benchmark
David Heinemeier Hansson questions the choice of a developer-friendly language if humans no longer read the code.

In Basecamp's Oct 4 benchmark, the Rust version of Campfire handled 168 times as many room-page requests as Ruby.
Hansson tasked AI agents with implementing and optimizing the Campfire chat app in other languages. He previously accepted Ruby's lower speed for the sake of developer productivity and enjoyment. Now he asks how much that trade-off matters if developers no longer read the code.
How the versions compare
Performance under load. Basecamp compared the versions using the same data, allocating 4 hardware threads of an AMD Ryzen AI MAX+ 395 to each. The room-page test used 16 clients and production servers with gzip, with results taken from the medians of two runs.
| Campfire version | Room-page requests per second | Message-send latency at the 99th percentile, ms | | --- | ---: | ---: | | Ruby | 216 | 368.3 | | Elixir | 722 | 83.1 | | Go | 3,860 | 59.7 | | Rust | 36,260 | 14.5 |
Basecamp measured message sending separately, with 64 clients. In this test, Rust reduced wait times even for slow requests.
In a separate comparison on Oct 1, Rust also needed fewer resources to start and run the chat app.
| Metric | Rails | Rust | | --- | ---: | ---: | | Cold start | 2,731 ms | 157 ms | | Idle container memory | 393 MB | 20 MB | | Compressed Docker image | 359 MB | 67 MB |
The Rails container included Redis and Thruster. Rust ran as a single process.
Basecamp also sped up the Go version after the initial result. A separate Oct 4 benchmark with 16 HTTP clients and 4 CPUs allocated to the app showed these changes:
| Operation | Before optimization, requests/s | After, requests/s | Gain | | --- | ---: | ---: | ---: | | Room page | 10,175 | 15,218 | 49.6% | | Send message | 4,025 | 5,036 | 25.1% |
How to run the ready-made chat app
Rust is already packaged. The ready-made Docker image supports amd64 and arm64. Deploy it through ONCE with `once deploy ghcr.io/basecamp/once-campfire-rust --host chat.example.com`, replacing the domain with your own.
The Rust version preserves the formats of the SQLite database, file storage and signed or encrypted Rails cookies. To switch without migrating data or logging users out, keep `/rails/storage` and the existing secrets.
The Go version is built from source to run locally. The README lists these dependencies:
- Go 1.27.1 and a C compiler. - pkg-config, libvips and libzstd. - ffmpeg and Python 3.
After `git submodule update --init --recursive`, run `bin/build`, set `SECRET_KEY_BASE` and start `DISABLE_SSL=1 HTTP_PORT=8080 ./campfire server`. Initial setup is available at `http://localhost:8080/first_run`.
For the Elixir version, the README describes building the reference Rails version and preparing the tools, dependencies and app assets. With Elixir 1.19.5 and OTP 28, build the image using `docker build -t campfire-elixir:release .` and run it with Docker.
Daniel Collin, known as emoon, contributed optimizations to the Rust version through PR #43 for database task processing, rich text and gzip for cached pages.
Source
