Kino: a Ractor web server for Ruby 4.0 that runs one process on all cores
Kino: A high-performance Ractor web server for Ruby 4.0
Kino is a high-performance Ractor web server for Ruby 4.0+ that runs your app on every core in one small process, using a Rust tokio/hyper front-end and parallel Ractors. On an 8-core server, it beats a Puma fork cluster by 1.5-2x on I/O-light endpoints and uses about 7x less memory on a tiny Ractor app. It includes production features like graceful drain, crash supervision, and a --check tool to identify Ractor blockers. Ractors are experimental in Ruby 4.0, so Kino also offers a threaded fallback mode for Rails.
The GVL allows only one Ruby thread to run at a time. To use all cores, Ruby servers fork processes, and every fork costs a full copy of the app. Ractors do not have this limit: each one has its own lock, so one process can run Ruby in parallel.
- ksec
It will be interesting to see the Ruby Rails direction on ractor vs Fiber. Shopify is testing on Falcon / Fiber for production already.
Edit: Turns out they are working on Ractor as well
- flossly
I've such fond memories of Ruby. Just moved to Kotlin since and it feels like a Ruby-with-types-and-Java-interop. Both Ruby and Kotlin are OO-first but FP-ready. Both are very expressive.
Interesting enough the JVM is so much further ahead that my HTTP-server is implemented "in JVM" (the built in "Sun" HTTP server is good enough for production use in our case). Where as in Ruby land there was (and is) always a native HTTP-server in the dependencies of a production app.
- baggy_trough
Excited to see the recent momentum for Ractor in Rails as well as base Ruby!