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
710% Growth on my tiny productivity tool hit differently, here is what worked in January User Avatar 65 comments Write COLD DM like this and get clients easily User Avatar 32 comments I built a tool to search all my messages (Slack, LinkedIn, Gmail, etc.) in one place because I was losing my mind. User Avatar 26 comments Our clients have raised over $ 2.5 M in funding. Here’s what we actually do User Avatar 14 comments 🚀 I Built a Chrome ExtensionThat Turns Reddit Into a Real-Time Lead & Research Engine(Free for First 10 Users) User Avatar 11 comments How I got my first sale from a forgotten project User Avatar 10 comments