« All posts

Kino: A Rust-powered Ractor web server for Ruby 4.0

Kino brings Ractor-based parallelism to Ruby 4.0 with a Rust core, beating Puma clusters on speed and using up to 7x less memory.

Kino is a new web server built for Ruby 4.0+ that leverages Ractors instead of forked processes. Since Ruby threads can't execute Ruby code in parallel due to the GVL, traditional servers fork a process per core, multiplying memory usage. Kino instead runs a Rust (tokio + hyper) network front-end that dispatches requests to parallel Ractors executing a Rack 3 app inside a single small process, with a threaded fallback mode for apps like Rails that aren't yet Ractor-shareable.

On a real 8-core server, every Kino mode outperforms a Puma fork cluster by 1.5-2x on I/O-light endpoints, and Ractor mode beats it by over 30% on pure CPU work. Memory savings are even more notable: roughly 7x less than a Puma cluster on a simple synthetic benchmark app, and about 4x less on a real Rails app running in threaded fallback mode.

The server ships with production-grade features out of the box: graceful drain, crash supervision and respawn, bounded queues with 503 backpressure, request timeouts, hardened intake against slowloris and TLS-handshake attacks, TLS via rustls, and live stats and logging. A built-in kino --check command diagnoses exactly what prevents an app from running in Ractor mode, and its config and CLI mirror Puma's familiar workers x threads model. Ractors remain officially experimental in Ruby 4.0, and Kino positions itself as the best way to experiment with them today while its threaded mode is already considered solid.

This synthesis was produced from its source by AI; there is no human editor or manual review step. How we work