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

Do we know if a Rust webserver can provide just more pure raw metal performance? I believe I've heard the case to be true for Go. What use case do we have for this, high performance chat/game servers?


Rust typically beats Go web frameworks on tech empower performance benchmarks, if you're curious where languages typically rank up in terms of web framework performance. https://www.techempower.com/benchmarks/#section=data-r23

What does "pure raw metal" performance mean? Go has a garbage collector, which I usually hear causing GC pauses negatively affecting performance compared to C/C++/Rust.


pure raw metal

It means exactly what it means. If I get a pure bare metal server, will that computer simply handle more requests than a Go or a Node server (assuming the same single-threaded paradigm)? That's the only reason I'd ever consider moving away from the ergonomics of something like Node or Python, if my bare metal server can save me money by simply handling more requests with less cpu/memory.

Edit:

Thanks for that link though, just got turned onto this:

https://github.com/uNetworking/uWebSockets/blob/master/misc/...


> That's the only reason I'd ever consider moving away from the ergonomics of something like Node or Python, if my bare metal server can save me money by simply handling more requests with less cpu/memory.

… but what does the "bare metal server" have to do with it? Presumably, Occam's Razor would suggest that a Rust framework that outperforms Go on a VM would likely continue to outperform it on a bare metal. The bare metal machine might outperform a VM, but these are most two orthogonal, unrelated axes: bare metal vs. VM, or a Rust framework vs. a Go or Node framework…


It's a base case. We can use VM if you like, I just went further. We can go even further, will it simply be faster on my laptop compared to the others? I have a real use case for running a highly performant server locally so as not to hamper the user with extra resource usage.


How does a computer handle requests without running software? That software has to be written in a programming language.


Yes, it will handle more requests than Node or Go.


I wouldn't cite tech empower since they only benchmark HTTP/1.1


It's historically been heavily gamed as well, so it's not much better than a thumb in the wind. Good and bad results might both be due to very non-idiomatic non-representative code there. Both the false positive/negative outcomes have happened in the past, then been fixed after recognition and feedback.

IIRC TechEmpower contributed indirectly to the controversy about actix-web and its use of Rust unsafe keyword.




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

Search: