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 tool directory that doesn't pretend every founder has the same needs User Avatar 64 comments I Was Picking the Wrong SaaS Tools for Two Years. Here's the Mistake I Finally Figured Out. User Avatar 61 comments Drop your landing page URL. I'll use Ferguson to tell you why visitors might be leaving User Avatar 52 comments AI helped me ship faster. Then I forgot what my product actually does. User Avatar 38 comments Most early-stage SaaS companies miss churn signals — here’s how to catch them early User Avatar 31 comments How I Run a 1.7M Product Search Engine at 66ms on a $0 Hosting Budget User Avatar 19 comments