4 ms·
If you look at the Rust community, it’s split between those that consider Rust appropriate for systems level programming and those that want to use Rust for eve
by blub 4y ago
If you look at the Rust community, it’s split between those that consider Rust appropriate for systems level programming and those that want to use Rust for everything. The
back-end Rust comes from the latter part of the community and my impression is that it’s fighting an uphill battle, because the language is not a good match for such software when compared to Java or even Go or Python.
400.000 lines also sounds huge for a web project.
Contrary to other commenters I don’t advise learning Rust just for this project. In general maybe it’s worth it, but web Rust is new, has an uncertain future and likely no job market value. If it was a research project there’s no telling what horrors lie in that code base :-)
- kouteiheika 4y ago> The back-end Rust comes from the latter part of the community and my impression is that it’s fighting an uphill battle, because the language is not a good match for such software when compared to Java or even Go or Python. > > 400.000 lines also sounds huge for a web project. I maintain a 180k+ line of code back-end web project and I use Rust. Best decision I've ever made. I serve over half a millions of HTTPS requests per day. Everything hits the backend, no CDNs or caches of any kind. Average CPU usage on a cheap VPS? ~3%. Hugs of death? No such thing for me. It just runs itself without any supervision for months uninterrupted, so I can sleep at night and not get woken up by an outage. And refactoring is a breeze due to a strong type system, plus all other niceties that Rust has. So for a complex project that you're going to maintain long-term? Rust is absolutely the right choice, even for backend web-dev. A throwaway CRUD e-commerce website made by a random webdev consulting company on the cheap? Okay, yeah, maybe here you're right, and I probably wouldn't pick Rust there either.
- pipe_connector 4y ago500,000 requests/day is ~6 requests per second.
- goodpoint 4y agoYou could handle that with Ruby on a raspberry 1
- kouteiheika 4y agoIf you're just sending static pages, sure. Not if you're doing significant processing like I do. It's also an issue of scaling, where I could probably serve at least ~1000x more traffic on a single machine (and I know I'll never hit that much traffic). And if you don't need high availability (although I haven't had a single outage is over two years, thanks to Rust's reliability and focus on correctness) this simplifies your architecture and your deployment significantly, because now if you're on a single machine you don't have a distributed system, you don't even need caches, you don't need load balancers, you don't need to administer multiple machines, you don't need Kubernetes, backing everything up is very easy, etc. (But of course, I'm not saying this is how everyone should do it. I'm just saying what the benefits are for me because Rust's so fast, so it allows me in my particular case to do this, which I wouldn't be able to do with e.g. Ruby because it'd be too slow.)
- blub 4y agoIs this a one person operation you’re describing or a commercial project developed by a team which is bringing in revenue? How long has it been in production and how long will it be developed and supported? My concern regarding web Rust is focused on long-term viability and development speed, not performance which is a given or memory safety which is a standard in webdev.