HeadlinesBriefing favicon HeadlinesBriefing.com

Kino: Ractor Web Server for Ruby 4.0+

Hacker News •
×

Kino is a high‑performance Ractor web server for Ruby 4.0+. Ruby threads cannot run code in parallel, so production setups fork a process per core and pay for each copy in memory. Kino runs your code on every core in one small process. A Rust (tokio + hyper) front‑end owns the network; parallel Ractor workers run your Rack 3 app, and a threaded fallback mode runs everything else, Rails included. Fast. On a real 8‑core server, every Kino mode is 1.5‑2× ahead of a Puma fork cluster on I/O‑light endpoints. Ractor mode also wins on pure CPU, 30%+. Benchmarks below. A fraction of the memory. About on the simplistic bench Ractor app, and about less memory than a Puma cluster serving Rails in fallback threaded mode. Parallel without forking.

Ractor mode runs CPU work more than 5× faster than Kino’s own GVL‑bound threaded mode, in the same small process. Production plumbing is included: graceful drain, crash supervision and respawn, bounded queues with 503 backpressure, request timeouts, hardened intake (slowloris and TLS‑handshake deadlines, connection and body‑size caps), an on_error hook for your error tracker, TLS (rustls), live stats, async access and app logging. Tells you why.

Kino’s CLI and config DSL are Puma‑shaped; if you can run Puma, you can run Kino.