Show HN: Itsi – all-in-one HTTP server and proxy with first-class Ruby support

itsi.fyi

5 points by Wouterken 2 days ago

Hey HN,

Meet "Itsi", a high‑performance, all‑in‑one HTTP server and proxy with first-class Ruby support. It's a drop‑in replacement for your current Rack server, built on Hyper and Tokio, ships with batteries‑included middleware, and lets you go from dev to production without any surprises.

Itsi is my attempt at eliminating the disparity that commonly exists between production and non-prod environments. A single, efficient process containing everything you need to serve your app, equally at home on a Raspberry Pi or local dev box as it is on your production VPS or Kubernetes cluster.

You get a broad set of built-in security and performance features (rate limits, JWT auth, CSP, intrusion-protection, automated certs, compression, ETag support, cache-control, etc.), an ergonomic dev experience with bundled RubyLSP support, zero-downtime config reloads, first-class Ruby gRPC handler support, Fiber-scheduler mode (à la Falcon), and more—all in one minimal library.

In addition to native performance on par with top Rust and C servers, Itsi’s big wins come from replacing Ruby middleware and application-level concerns with native equivalents, freeing your Ruby CPU cycles for the logic that actually matters.

Itsi is new but well-tested and already powering small production apps. I’d love to hear from eager early adopters who can help kick the tires and battle-test it.

Thank you!

Wouterken a day ago

For those who prefer just seeing some code over reading through the documentation, there's a bunch of minimal, realistic examples here:

https://github.com/wouterken/itsi/tree/main/examples

For each example you can take a look at the included README and take a look at the Itsi.rb, to get a little glimpse of some of Itsi's capabilities.

Alifatisk 14 hours ago

Cool, is there any benchmarks on this?

  • Wouterken 11 hours ago

    Thanks for taking a look! I haven’t included any benchmarks in the repository (to avoid discussions focusing excessively on benchmarks that don’t reflect realistic or practical scenarios, rather than on other compelling features that have a greater impact in real-world use).

    That said, it should be very fast across the board.

    FWIW on my M1 Pro MacBook, if I run Itsi with a *single* worker and *single thread* (e.g. `itsi -w 1 -t 1`) I see these figures:

    A hello world Rack app E.g. ->(env){[200, {}, ["hello world"]]}

    Runs at approximately 100,000 requests per second using wrk http://localhost:3000 -c 60

    A simple endpoint E.g. get "/" do |req| req.ok "Hello World" end

    Runs at approximately 115,000 requests per second wrk http://localhost:3000 -c 60

    Static file serving of small files (no compression) approaches 150K rps.

    In essence, it should easily be fast enough that it's very unlikely that HTTP server performance is going to be the bottleneck in your workload except for the most extreme workloads.

    All these numbers can increase further as you increase worker count. (There's many performance tuning knobs to twiddle)