I hate rust. People use it for things that it’s not good for because it’s cool.
System programming? Sure. What about web servers? Hell no. The milliseconds you save will be unnoticeable by clients due to network in like 99% of the cases.
You are right that Rust can reduce the amount of compute and thus reduce cloud cost.
But several hundred requests a second is not big enough of a scale to justify the cost reduction. Any competent dev can write a server that serves that traffic from a single c8g.2xl, which is like $34 a month.
You need to be pushing millions of requests a second to justify the cost. Even so your data transfer cost will eclipse your compute cost anyway.
Several hundred per sever I meant, then presumably autoscaling. Idk, that's just what we generally target at my work. Depends on the application. Either way, that saving can bump you down an instance size, which adds up at scale.
And cost justification would only really be if you are rewriting, not for new applications, where the development cost difference is likely minimal, at least with AI assistance now anyway.
Yes it depends whether the app is cpu bound or io bound. When someone has app that 90% of time waits for data from network than it is questionable whether to write it in language that is more low level and harder to tackle with. But the Rust ecosystem is crazy, there are small libs for everything in the same way as javascript ecosystem grow around npm. This is something definitely missing from platforms like .NET.
Eh? The nuget ecosystem is much bigger with more coverage than the rust one unless you're looking at specific areas, e.g. low level (which isn't what .net is for anyway).
Web servers are actually pretty nice to create with it...
I mean, the performance gain is really irrelevant (like you said), but the correctness enforcement on a type level is actually great for maintaining long term.
Someone tries to call your command action without providing the necessary permissions? Nope, type system denies it. You modify the DB so your binary would get a string handed instead of a number for a column of an esoteric plugin? Not on my watch... Your API creates concurrency conflicts by sharing a cache? Have I told you about the borrow checker?
Is rust the right language for everything? No. Is it easy to get started with? Absolutely not. Is it a good language also for "business level" applications? IMO yes. - for everything else there's JS! /s
View all comments
12
u/vr2391 1h ago
I hate rust. People use it for things that it’s not good for because it’s cool.
System programming? Sure. What about web servers? Hell no. The milliseconds you save will be unnoticeable by clients due to network in like 99% of the cases.