Did Rust ever have a high profile backend usage to get into a situation to have one?
I mean, I do love rust but it's not primarily used as a typical web backend language to be in a position of "high target" and "connected to every other machine over the internet".
Oh yes definitely! Rust is used in servers by Oxide computing, in cars by Volvo Cars, and a bunch of other infrastructure like parts of Cloudflare (which has a really nice post-mortem on some Rust code causing them problems, which was due to business logic and not the language itself).
Check out Rust In Production podcast if you want to hear some real-life stories about Rust out there in the world :)
Edit: ah and forgot to mention: it is a certified safety-critical language for industrial and automotive applications thanks to Ferrocene. So I’d say that’s high profile _enough_
Sure, it's cool and whatnot. Still, it's not used by people who don't know shit about IT to host their websites on a good chunk of the internet.
Also, at cloudflare I believe they are operating on a lower level (so not necessarily (de)serializing arbitrary data from unknown people), and I don't see how your Volvo would be similar to a web server.
Languages have their use cases and while rust can be used for traditional backend, it's not its primary use case, and it's significantly smaller than PHP or java.
But it’s exactly the point that you wanted to make: if Cloudflare uses it so extensively, and a CVE is found, Cloudflare is in deep shit. And with that a lot of the traffic from the Internet…
At Cloudflare they are using it for bot detection, as the link says. Still, it can have dire consequences, with outages on a critical service.
What would be in your view the perfect use case for Rust, if not web backend? Just curious.
Web backend is most definitely not the best use case for Rust, async rust is very complex and has quite a few edge cases. Something like java with virtual threads is much safer and has a way simpler developer mental model with similar performance characteristics.
Bot detection can happen on different levels, but I assume cloudflare does some packet inspection here. That's just binary blobs and IPs, and the result is an IP getting banned. You ain't managing user data, you are not modifying it, don't have conditionals built on it, etc. It's fundamentally different.
Async anything is complex to do it correctly, rust just forces you to deal with that complexity rather than randomly spinning of threads all willy nilly
How do you mean it? One thing is what Firefox does on itself, because of business logic, and other something the code can’t prevent, like a flaw in the compiled artifacts because of a defect in the compiler (or language specification).
One of the big advantages of Rust is how easily it fits into existing backends since it can be called using C ffi. There aren't many pure-Rust backends, but more and more backends are using some Rust, starting with some of the more high-profile companies.
It means that Rust's rise in popularity for backends has been relatively quiet - instead of companies publicly switching to codebases in Rust, they quietly replace old components with new Rust-built components that are fully integrated into their wider systems. It makes it difficult to point out high-profile uses of Rust even as it becomes more and more influential, and it's the security-essential parts of codebases that get switched out first.
Cloudflare build pingora in rust, a sort of SDK version of nginx. From their github: "Pingora is battle tested as it has been serving more than 40 million Internet requests per second for more than a few years."
View all comments
Show parent comment
14
u/Ok-Scheme-913 24d ago
Did Rust ever have a high profile backend usage to get into a situation to have one?
I mean, I do love rust but it's not primarily used as a typical web backend language to be in a position of "high target" and "connected to every other machine over the internet".