Ask HN: Anybody running serious Rust web application in production?

45 points by majkinetor ↗ HN
And by serious, I mean with lots of users, lets say min 100K active and more complex then to do list, lets say e-invoicing service.

The performance of such potential app is what interests me the most, given that Rust is as fast as C/C++ and it doesn't have garbage collector.

13 comments

[ 834 ms ] story [ 2163 ms ] thread
I never did (I only played with Rust for a bit), so this doesn't answer the question. But realistically, the performance is almost certainly indistinguishable from C/C++, the bottleneck will be in the IO. The compiled code should look almost the same. (I don't remember if rust is using LLVM IR at some stage, but even so).

And given the advantages of Rust over C/C++ in terms of PL functionality, type system etc, I'd say it's worth it (unless you haven't already invested the effort to become proficient in it, and you're already happy with C/C++).

>(I don't remember if rust is using LLVM IR at some stage, but even so).

Rust is LLVM based, so yes.

I can share my maybe-unrelated-experience.

I'm working on a Java parser/semantics analysis in Rust, and it'll replace the current semantics engine of https://lilit.dev.

We are processing 100,000 Java files at a time with Scala/Java It currently uses 10GB of RAM. Moving to Rust will reduce memory usage drastically, and that will reduce my bill.

But I'm not going full Rust because of mundane stuff like move data here and there. It's better to use Scala or a language with higher abstraction. The time sink is IO/database call anyway, so the performance gain per request might not be that significant.

It's like Go, good for microservices. Standalone decoupled app that does heavy lifting of a specific task. It's not good at all for full stack. ORM is barebones, authn/authz story almost non-existent other than throwing around tokens. If it's a pretty standard enterprise app that's CRUD heavy and requires RBAC then use Django/Rails/.NET/maybe Node? for your main app and use Rust only for the CPU-bound stuff unless you are prepared to reinvent a lot of wheels.

Take a look at this it you want an idea of what your codebase would look like:

https://gitlab.com/bloom42/bloom/tree/dev/server

I'd suggest Elixir if you're starting from scratch and _don't_ have to deal with too many third-parties. It honestly feels like the holy grail ecosystem if you're comfortable dealing with the gritty stuff once in a while and can live without types.
Writing API wrappers is so easy in Elixir though, that you actually can usually get away with building your own 3rd party adapters though.
language rarely contributes to performance, neither does CPU speed. algorithm does tho. are you crunching maths? machine learning, graphics? nope? then even the slow poke ruby would most likely be more than adequate.
We are, depending on how you define "serious". The Rust usage is for our products as a company which largely target somewhat niche type of US companies. I can't speak much on it, but I do consider it "serious" because of the amount of money that flows through our product. However the corporate users are far far less than 100k.

I chose Rust because 1. I enjoy the hell out of it; I feel productive and safe in the language. 2. Some services within our infra have tight memory requirements and I was having difficulty feeling confident on handling these requirements in Go.

So if you're asking merely for concurrent traffic requests our uses are definitely not serious haha. If you're asking based on "professional" usage, our Rust usage is vital to tens of millions of USD. Not astronomical, but far more "real business" than a startup with 20 users haha :)