1
1 Comment

Benchmarking Rust vs Go REST APIs performance

Hi, Indie community!

CEO of the company I'm happy to work with is an avid fan of Rust language - he implemented a Twitter-like REST API in Rust and plans to compare its performance to its Golang equivalent.

I highly recommend taking a look at his article:

https://docs.qovery.com/guides/tutorial/create-a-blazingly-fast-api-in-rust-part-1/

posted to Icon for group Developers
Developers
on April 30, 2020
  1. 1

    Hi! Just read the article but I must say for this kind of workload, a website/REST API, the kind of performance difference you'd get between those two languages wouldn't matter much beyond a "on-my-laptop" benchmark.

    Both are compiled and I presume Rust spreads eventloop executions across CPUs, so efficiency wise (not wasting entire-CPU cores vs say Python/Node/Ruby) they would be the same.

    Really your friend will end up benchmarking the ORM and database libraries because that's the most complicated code in the setup with the most system calls. Not trying to discourage you or your friend from playing around, but just be cautious about languages ;). It's sort of a religion everywhere lol.

    In the use case of a public REST API users connection latency to your site will dwarf all other numbers, seconded by your database.

    If there was an action item from this -- I'd say stick with something you like writing in. If you like Rust, and are most productive in it, use that.

    For most levels of web/REST usage (not pegging CPUs at 100%) Python/Node/Ruby are fine too if you like writing in those. And if you hit those limits -- GREAT! Champagne problems! Then you can get creative maybe use autoscaling and single core machines, idk! But success will bring you the resources to deal with some very busy single-core interpreted code.

    This got kind of long, I hope that makes sense. Let me know what you think!

    =D

Trending on Indie Hackers
I built a text-to-video AI in 30 days. User Avatar 67 comments What 300 Builders Taught Us at BTS About the Future of App Building User Avatar 52 comments I built something that helps founders turn user clicks into real change 🌱✨ User Avatar 50 comments From a personal problem to a $1K MRR SaaS tool User Avatar 47 comments This Week in AI: The Gap Is Getting Clearer User Avatar 35 comments How An Accident Turned Into A Product We’re Launching Today User Avatar 29 comments