Actix (Rust) vs Fiber (Go): Performance Benchmark in Kubernetes #203

preview_player
Показать описание
Go vs Rust comparison.

▬▬▬▬▬ Experience & Location 💼 ▬▬▬▬▬
► I’m a Senior Software Engineer at Juniper Networks (12+ years of experience)
► Located in San Francisco Bay Area, CA (US citizen)

▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬

▬▬▬▬▬▬ Related videos 👨‍🏫 ▬▬▬▬▬▬

▬▬▬▬▬▬▬ Timestamps ⏰ ▬▬▬▬▬▬▬
0:00 Intro
3:29 Summary vs Histogram
3:49 Summary
5:11 Histogram
9:42 1st Test
16:01 2nd Test

▬▬▬▬▬▬▬ Source Code 📚 ▬▬▬▬▬▬▬

#rust #golang #kubernetes
Рекомендации по теме
Комментарии
Автор

Great work (as always), Anton. Your visual explanations are top notch.

slcooIj
Автор

This video is just a goldmine of information, I love that you added some solid background, which - to be honest - could have been a separate video

TweakMDS
Автор

PLEASE Go need to rest for the next battle 😂. Great work 🎉

ManuelMartinez-nlcy
Автор

finally some good non micro benchmarks that test realistic use of the languages. elixir vs go would be interesting to see

Lewboskii
Автор

Why services cannot handle more than 1.6k requests in Test 1 when we still have CPU/RAM resources available?

pini
Автор

this is a great performance test.
well done

ionutale
Автор

Excellent video yet again. Can you do golang / rust vs c++? Also, would like to see more real world cpu extensive task like compression and encryption

deirdrechong
Автор

can you please make a video about how to benchmark and monitor a backend service effectively

kal.leroux
Автор

I would like to see Elixir (or Gleam) vs Go

manosragiadakos
Автор

Thanks for the great content! I noticed around 1:38 that the calculation for availability was mentioned as the ratio of failed requests to total requests. I believe it should actually be the ratio of successful requests to total requests (availability = successful requests / total requests). Just thought I'd share this in case it helps clarify things for others. Keep up the great work!

ulvigulu
Автор

Can I suggest a short video showing how you created those custom dashboards in grafana 👀?!

ziad_m_
Автор

Probably the AWS Rust SDK is still a littlebit undercooked.

Endorsememe
Автор

I think irrespective of the result, the Go performance is extremely good, for quite a high level language.

It would be really interesting to see a top 3 most performant server frameworks for bother Go & Rust, then put them against each other. Quite a few people are saying Axom for Rust & probably FastHTTP would be expected to be the fastest for Go?

I like that you consider real world usage & not just simply number of requests for a hello world endpoint, much more realistic.

everyhandletaken
Автор

Wow! I loved this video! Thanks!

I started to love histogram data for horizontal scaling...

Bleibruk
Автор

Amazing work on this video. This is super useful data and answers a lot of questions I've had about rust performance and I commend you even if this video doesnt get millions and millions of views.

InternetEntreprenuer
Автор

Nice video and I appreciate your approach.

Would love to see some Nim in the mix

PouriyaJamshidi
Автор

Now we need comparison with zig zap framework 🧐

Chris-rmpn
Автор

Thanks for making this video. I too was surprised by the results: why do they show Rust so much slower (latency) and why does it consume more CPU and fluctuating level of CPU (there is no GC to add periodic overhead)?

I took the code and ran test 1 (static get devices) locally (M1 Mac Studio) to see if I could repro your results. I found something different. Both Go and Rust performed incredibly similarly: about 570us per request... But I was driving it with 50 concurrent threads achieving about 27k requests per second. I get similar results at 100 concurrent threads (50k requests/s).

Further, with these tests I see Rust taking 55% CPU / 9MB RAM consistently, whilst Go is fluctuating 130-180% CPU / 20 MB RAM during the run.

My results are not directly comparable with yours (not network between the client and server, different machine, etc)... but the relative performance is comparable. I see latency parity between the two languages. This is what I would expect for such a simple test... returning static data, both compiled and optimised languages. As expected I see Go using more memory and a little more CPU to cover off its overheads like GC.

Can you double check your Prometheus graphs to make sure the CPU usage graphs are the right way around?

I can't come up with a suggestion for the differing latency figures... Any ideas Anton?

FrankTaylorLieder
Автор

It would interesting to change Actix by Axum, for Rust.

LinuxForLife
Автор

Axum is number 1 for many months now, yet every youtube video is still with actix-web...

pawegraczyk