In practical perspectives, I’m mostly concerned about computer resources usage; I have computer resources constraints. So using Rust would benefit on that. But it is for a Web application backend. So, is it worth it having to learn Rust + Tokio + Axum, … in this specific situation? Also, that this is mostly for initially prototyping an application. Also considering if I add developers in the future, they would most likely not be familiar with Rust, but with more popular frameworks such as Node.
I think if you know Rust then I think Rust + async is going to perform better and consume less resources than NodeJS by a LOT. It should also work more reliably on embedded devices, or even docker containers because memory isn’t going up and down like a yoyo because of GC.
That said NodeJS is more immediate and might lend itself to better prototyping / RAD and you might not care enough about performance to justify using a compiled language. A lot of web servers aren’t doing enough that you would even notice a difference in performance.
Another reason for Rust might also be because it’s more energy efficient. I wish Amazon and other cloud services would put a heavier cost penalty on efficiency. I wonder how many cloud web apps are running bloated stacks to serve up content which could be done with a fraction of the energy.
There was a post on Reddit from 2019 that I loved to link to which was about how the poster rewrote a NodeJS service into Rust.
The original was taken down in response to Reddit enshittifying, but it’s still up on the wayback machine and the graphs were hosted on Imgur, where they’re still up without needing the Wayback machine: