Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I kept things stupidly simple. I didn't invent a new product or idea. I seen a number of companies doing it and I thought, "I can do that..."

The initial product was built with Ruby on Rails. It stayed in Rails for three years. At that point I had enough API traffic the memory on the server was getting out of control and Ruby just couldn't handle the concurrent traffic (with a reasonable budget).

I re-wrote the entire product in Go on the third year mark (converted ERB to Go templates, re-wrote all backend logic with Go, etc).

The Go version worked wonderfully and reduced my server costs substantially (from $600/month to $88/month). I had the Go version running for four years and I re-wrote it again in Rust (actixweb, askama, htmx).

For funsies, I re-wrote a portion in Rust and noticed the amount of code used was substantially lower (about 50% less code in Rust). I was surprised by that (I figured it would use more being lower level). At that same time I was growing frustrated with maintaining the Go monolith (it had a lot of legacy cruft from the Rails port and spaghetti code). I decided to re-write the whole thing in Rust and cull the cruft in the process.



That's really interesting. Any further cost savings going from Go to Rust?


There were no financial savings from the transition, but there were certainly overall resource savings (cpu, memory). I think I could cut the financial cost in half, but I am currently stuck where I am due to the (postgres) database size and memory requirements. It's on my list of things to improve some day, but I'm not I'm not too worried about it right now :)


Thanks!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: