Hacker News new | ask | show | jobs
by xutopia 40 days ago
Rails developer for 20+ years.

I converted 3 of 4 apps running on a 4GB VPS to Loco (short for Locomotive: a Rust framework using the Rails conventions).

I am really happy with the switch.

Heaviest app went from 700MB of RAM usage at peak to 60MB and can handle 30x traffic before it hits an I/O wall.

I save 20$ a month because I downgraded my VPS to 2GB and am now able to fit new projects that sat underplayed on my personal machine because I couldn't fathom paying for a larger VPS. I could easily run 4x the amount of projects on half the system I used before.

As a Rails developer for 20 years this is a bittersweet moment. Rails was truly wonderful in its heyday and I could run circles around larger teams and do in a day what could take months for them. This advantage was eroded as people opted for Javascript frontends and then accelerated with graphql.

The advantages were then nullified with LLMs taking over code generation. With RAM prices tripling in 18 months I think the web framework that is hungriest just won't make any financial sense over other systems. The only reason I stayed with Rails was because of the conventions and my love for Ruby. I'm sad to being reading Rust instead of Ruby now but it's a drop in the bucket of my considerations.

1 comments

Yeah, I've been using Django since 0.97 (almost 20 years) and have made similar switches on my personal apps, converting to Go, Elixir/Phoenix, or Rust/Axum depending on the app and my mood. Performance with Django was "fine" and I never had problems, but it's hard to argue with a 10x reduction in memory usage and latency. If I had to do it myself, the friction of dealing with Rust wouldn't be worth it, but with LLMs, it's not a factor.
I think a lot of the friction people experience with Rust slowly fades away once you learn the language and get used to the borrow checker. Once you pick it up things start to make sense and you actually feel how it helps you and gives you comfort when deploying because of the compile time checks.

But then again the language its very verbose which some do not like. Other downside is definitely compile times.

I'm reasonably comfortable with Rust but especially for smaller projects like the kind of low traffic scratch-my-own-itch web apps where security or correctness weren't terribly important that I was talking about, there's no question it was not as productive as something like Python or Ruby in the pre-LLM world (especially for someone with decades of Django/Rails experience). Now though, I'll use it even for a quick one-off dataviz experiment because the only real "cost" is an extra line or two of prompting to tell it to use Rust and Axum. OK, and compile times, I guess. But on a small codebase even that's not too bad.