@@zacclifton5479 i was thinking about testing kafka with rabbit or nats, but realistically i need to use expensive ec2 instance types with fast local ssd disks and it could be expensive. cause i need to run at least 3 brokers otherwise it does not make sense to test standalone instances
rust frameworks, rocket, actix, axum and warp, there is also a promising new framework called pavex created by the author of the book "zero to production in rust"
just careful, unless it's a project that has over 1k-10k req/s it won't really make a difference. Even worse, fiber may require more expertise on a different implementation and ecosystem.
Awesome test, Anton! For those who haven’t seen your previous comparison of actix and fiber - it will be interesting to see how “real life” services written with go stdlib compare to actix or rocket 😊 Thank you!
this video came in so perfect time. I have just started my calling back in project in fiber. I am commenting before watching this video I don't know what about the fiber
Awesome test, as in any videos of these kind i know there will be that on the comments saying something like "Nooo, but you should do something something and this will improve the performance by 30000% on gin"
I am always open to criticism, especially if it follows a PR 😊. I actually got a couple of PRs that drastically improved the Rust code from the previous benchmark, and I'll release the results in a day or so.
sure, but i already have a few videos Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135 Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136 How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140 Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - github.com/antonputra/tutorials/tree/main/lessons/178 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
Incredible video, I personally would be interesting in seeing Fiber (the winner) vs Express vs Django. As many business still use those frameworks. Having a easy to understand test like this will provide the proof that transitioning to Go will allow the some hardware to performed better. So you get more for the same money spent.
Thank you for that update.... Perhaps I will reduce switch to standard library for my next project... I have been native to Gin and I love it ... But seems I could do better using stndlb
Great, great videos. Absolutely love how as close to real world these tests are compared what people usually do for these types of tests: Would not recommend mentioning fiber in the go reddit. Will be downvoted to absolute heck.
Hey Anton, excellent video comparison. I love this kind of videos that you have been posting recently. Could you please try the Ktor library, how it would perform?
4:36 this is wrong! Fiber has not reached its limits. You can clearly see: 1. CPU at about 70.3% (4:48) 2. CPU Throtteling did NOT happen (4:48) 3. NO Memory Peak discovered (4:48) You have run into another bottleneck, but NOT the one from the application. Maybe it was the network or else, but the graph clearly shows, that this was not a fiber-bottleneck. Even though not more requests came through, this does not mean that the application was the bottleneck. I was hyped about that test, but now I am disappointed. At 70% CPU load. Means fiber could easily handle about 42% more requests with the same setup.
thank you! well i may include it in one of the benchmarks in eks if I would need to store secrets from databases and include k8s integration with vault via csi driver
Just a suggestion for the latency graphs: Use logarithmic scale for better visualizing the differences when the request handling starts to shift to a slower pattern
You might wanna try comparing the Drogon (C++) framework to some Go and Rust ones. In one application I've seen it beat Go by 500% on req/s and similarly outclass it in latency.
Hi, very interesting this test, thank you very much. Could you compare these two Go frameworks : Fiber vs Herz (cloudwego). I love Fiber, but I just discovered Hertz (speed framework and HTTP3 ready and more something that tempts me)
thank you! yes i have few videos as well as otel with tracing and visualizing traces in grafana with tempo Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135 Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136 How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140 Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - github.com/antonputra/tutorials/tree/main/lessons/178 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
@@AntonPutra It would be very interesting because Java and C# are very popular and in other tutorials they show always some Fibonacci calculations or just calling a simple api.. but what you are doing is real world examples. Thanks 🙏
Hello! Nice benchmarks! Please can you record a benchmark of vert.x (async java framework), spring boot webflux, ktor multiplatform server (both jvm and native) and golang stdlib to compare with. Thanks in advance!
ok will do at some point! but i have few tutorials already Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135 Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136 How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140 Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
I've no idea about coding stuffs. I only work with DevOps tools. So i want to ask that a single pod can handle this much request ? If if we get more requests then we have to scale the pods? Or to do anything ?
you have 2 options, either to scale it vertically first (adding more cpu and memory here - github.com/antonputra/tutorials/blob/main/lessons/204/deploy/go-stdlib-app/deployment.yaml#L28-L34) or scale it horizontally, since it's a steless service it's very easy just by increasing the replica count nere - github.com/antonputra/tutorials/blob/main/lessons/204/deploy/go-stdlib-app/deployment.yaml#L10 you can scale vertically only so much, maybe 4-6 CPU max, then just start scaling horizontally
thank you! well i have few videos explaining how to monitor all of this, pls take a look Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135 Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136 How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140 Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
Would be interesting to see some framework like gin vs ogen. Ogen uses code generation to create static routing tree and uses fast json encoding/decoding for requests and responses. IMO, ogen works really well for building contract-first APIs
Great video! I looked at the Fiber docs, and I don't see where they recommend using the standard library first. Can you provide some details about this? I'd appreciate it.
sure, well it is based on fasthttp and it's from there official docs - "For most cases net/http is much better as it's easier to use and can handle more cases. For most cases you won't even notice the performance difference." also take a look at FAQ - "Are there known net/http advantages comparing to fasthttp?" github.com/valyala/fasthttp?tab=readme-ov-file#fasthttp-might-not-be-for-you
Ok this is aside the point but, How did you get that consistent coloring across dashboards in grafana (2:15), It's a small thing but damn does it make the page so much clearer
it's hard coded, if you select a graph and scroll all the way down, you can override bunch of attributes for each service including color scheme (you can harcode or use regex)
No i haven't in this benchmark but will use it next time when i compare with hertz and cover fork feature as well. Here is a good explanation - github.com/gofiber/fiber/issues/180#issuecomment-590009242
Thanks for sharing. One thing I see is that the memory comparison is meaningless due to the fact that you are testing a CPU intensive application. It would be interesting to see comparisons when the application is indeed memory intensive.
Why did the Fiber version on this test behaved different from the 1st test against Actix? In the test against actic both couldnt make to 2k req/s, but here is way beyond 10k. Am i missing something?
How can people go api latency in micro seconds? I tried using go to write api, it's always in 35 ms >. It's in my local machine, it's even worse if run in on cloud
my own go client that sends http requests and prometheus metrics, this is old verion - github.com/antonputra/tutorials/tree/main/lessons/201/client i'm updating this and keeping in different repo for now
"Are there known net/http advantages comparing to fasthttp(fiber is based on fasthhtp)?" net/http supports HTTP/2.0 starting from go1.6. net/http API is stable, while fasthttp API constantly evolves. net/http handles more HTTP corner cases. net/http can stream both request and response bodies net/http can handle bigger bodies as it doesn't read the whole body into memory net/http should contain less bugs, since it is used and tested by much wider audience. github.com/valyala/fasthttp
Next.js is a full stack framework. (Almost) everyone loves it, its popularity in unquestionable. But how does it perform especially on server-side, let's say compared to Express?
Did you test Java using virtual threads? They can be activated with JDK 21 + Spring Boot 3.2.x. The results would be interesting compared to platform thread tests.
As far as I know, there are no performance improvements in JDK 22 compared to JDK 21. (This is just my opinion.) However, you can still use JDK 21 or a higher version in your tests.
It would be great to see how NodeJs compares to this. I thought fiber much much faster, but it seems the difference not that big, in real world scenarios the bottleneck probably is the io/database.
We can't judge its highly depends on what your api is we call another api or communicate with dB than results will be totally different from how to perform socket operations what are latency issue And more imp how we can configure our nodes in your case its large machine what ami is use ? amd or asc? So in short we cannot figure out in advance only test and find the facts when actual workload is running.
🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com)
Kafka vs Pulsar vs Nats
next, nuxt, solidjs, other ssr suport frontent frameworks
@@zacclifton5479 i was thinking about testing kafka with rabbit or nats, but realistically i need to use expensive ec2 instance types with fast local ssd disks and it could be expensive. cause i need to run at least 3 brokers otherwise it does not make sense to test standalone instances
Python frameworks (django with DRF, FastAPI) vs node, go etc?
rust frameworks, rocket, actix, axum and warp, there is also a promising new framework called pavex created by the author of the book "zero to production in rust"
The winner Fiber vs Echo vs Chi. That would be interesting. As always, great video Anton. Very informative.
thanks! will do
@@AntonPutra That would be great! We are now researching those exact frameworks and that vid would help greatly!
@@AntonPutrawaiting for that video. Hopefully you'll do it soon :D
@@AntonPutra Also waiting for this one. "Fiber vs Echo vs Chi." . Thanks in advance!
and Gin
That's great. In the next benchmark add Echo.
Give the man a break
thanks! yes i have it mind!
Hertz claims to be better than Fiber. It would be great if you could benchmark fiber vs hertz
Also chi would be greatly appreciated
@@AntonPutraplease also add chi
I was looking for fiber vs stdlib benchmark two days ago and cant find it, but here we are. thanks Anton!
my pleasure :)
I've never been so happy that I chose Fiber over Gin for my current project. Thanks, Anton!
my pleasure!
why did you choose it?
just careful, unless it's a project that has over 1k-10k req/s it won't really make a difference.
Even worse, fiber may require more expertise on a different implementation and ecosystem.
Make this channel as a benchmark channel. Super helpful
🫡
@@AntonPutra Please bring more benchmarks. Echo vs Chi vs Gin
@@forbidden_lion noted!
Awesome test, Anton! For those who haven’t seen your previous comparison of actix and fiber - it will be interesting to see how “real life” services written with go stdlib compare to actix or rocket 😊 Thank you!
thank you! i'll update rust code with all the improvements and instead of fiber will use stdlib
Супер обзор, всё доходчиво и наглядно! 👍
spasibo! :)
great work as always Anton!
thank you!
To be honest, I was looking forward to this one.
i think it's time for stdlib :)
exactly what I wanted! Keep it up!
thanks!
I finally have a video i can point to when i tell people the standard lib is goated
cool, thanks!
Thanks for this breakdown, I think I’ll follow your advice on adopting stdlib!
yeah give it a shot
this video came in so perfect time. I have just started my calling back in project in fiber. I am commenting before watching this video I don't know what about the fiber
well it's very fast :)
Great work 👏 That was a really interesting comparison
thank you!
Excellent video! Thanks for making it.
thanks!
This is what I was waiting for!... Thanks @AntonPutra
my pleasure :)
Awesome test, as in any videos of these kind i know there will be that on the comments saying something like "Nooo, but you should do something something and this will improve the performance by 30000% on gin"
I am always open to criticism, especially if it follows a PR 😊. I actually got a couple of PRs that drastically improved the Rust code from the previous benchmark, and I'll release the results in a day or so.
Amazing video!!!
I'd like to see Go-Chi in these comparisons.
Would be interesting to see go vs elixir
will do soon!
@@AntonPutraYes please! Could you also compare scalability, it’s one of my main concern with these languages.
@@papakamirneron2514 ok will do
elixir will demolish all these benchmarks with phoenix
@@perc-ai thanks, noted!
please please please do a tutorial on how you create these benchmarks using kubernetes, grafana and prometheus
yes will do
Thank you, your videos have helped me a lot.
cool! thanks
Just goes to show how good the Go std library is. Remember Fiber is fast but it's not standard HTTP.
true
Fiber is good for l7 ddos mitigation tho since it can handle lots of raw rps
❤ Thanks, Go stdlib is incredible
yes it is :)
I needed this video!!! Thanks!!!
Thank you! Very useful! Could you please make a video about you infrastructure set up, especially monitoring
sure, but i already have a few videos
Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135
Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136
How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140
Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141
OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - github.com/antonputra/tutorials/tree/main/lessons/178 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
@@AntonPutra thank you!
Incredible video, I personally would be interesting in seeing Fiber (the winner) vs Express vs Django. As many business still use those frameworks. Having a easy to understand test like this will provide the proof that transitioning to Go will allow the some hardware to performed better. So you get more for the same money spent.
thank you! yes i'll include node and python in the future videous
interesting benchmark as always
thanks!
Very interesting thank you, I was using Gin recently to try out, but after that I might get back with the classic stdlib 🤣
yeah stdlib is nice :)
Could you compare chi vs gin vs echo, since there are most used frameworks in go.
yes, but first i need to test improved rust code
Спасибо, отличное видео, коротко и по теме как и всегда
spasibo, dumau korotkie delat dalshe!
amazing bench ❤ std all the way
💯
Thank you for that update.... Perhaps I will reduce switch to standard library for my next project... I have been native to Gin and I love it ... But seems I could do better using stndlb
yeah give it a shot
Wow. Thank you. Please, add Echo to the next one 🙏🙏
will do!
That's great. In the next benchmark add Chi.
well, stdlib multiplexer based on Chi logic, i think it would be similar
Очень круто! Столько работы в 6 минут сжать... Смотрел год назад бенчи по нжинксу и траефику. Рад за тебя, что растешь, подписался)
spasibo :)
Very interesting video! It would be interesting to see comparsion with Node.js, but not with Express.js, but with Fastify with fastify-uws added
thank you! noted will do nodejs maybe next week
Great, great videos. Absolutely love how as close to real world these tests are compared what people usually do for these types of tests: Would not recommend mentioning fiber in the go reddit. Will be downvoted to absolute heck.
haha, thanks!
Hey Anton, excellent video comparison. I love this kind of videos that you have been posting recently. Could you please try the Ktor library, how it would perform?
thanks! i'll give it a shout
Awesome test it was
thanks!
Hi Anton, I'd love to see a comparison of C++ and Rust web frameworks like Crow vs Actix Web.
ok will do!
4:36 this is wrong! Fiber has not reached its limits.
You can clearly see:
1. CPU at about 70.3% (4:48)
2. CPU Throtteling did NOT happen (4:48)
3. NO Memory Peak discovered (4:48)
You have run into another bottleneck, but NOT the one from the application. Maybe it was the network or else, but the graph clearly shows, that this was not a fiber-bottleneck.
Even though not more requests came through, this does not mean that the application was the bottleneck.
I was hyped about that test, but now I am disappointed. At 70% CPU load. Means fiber could easily handle about 42% more requests with the same setup.
thanks for the feedback! when I run the test between fiber and hertz, i'll make sure to take it up to 100% usage or close
Hey Anton, first of all. All your videos are a gem, do you have any plans to cover HCP Vault in the future? Keep up the great content
thank you! well i may include it in one of the benchmarks in eks if I would need to store secrets from databases and include k8s integration with vault via csi driver
You got a subscriber!!
Just a suggestion for the latency graphs: Use logarithmic scale for better visualizing the differences when the request handling starts to shift to a slower pattern
thanks!
node vs nest vs express vs go fiber please
thank you 😊
thanks, noted!
You might wanna try comparing the Drogon (C++) framework to some Go and Rust ones. In one application I've seen it beat Go by 500% on req/s and similarly outclass it in latency.
interesting! I'll definitely try it out
Hi, very interesting this test, thank you very much.
Could you compare these two Go frameworks : Fiber vs Herz (cloudwego).
I love Fiber, but I just discovered Hertz (speed framework and HTTP3 ready and more something that tempts me)
thanks for the suggestions, will do!
brillant!
thanks!
great man how about node framework like express vs fastify vs hono
thanks! will try to do nodejs next week
Awesome videos! Do you maybe have prometheus config and grafana dashboard source as well?
Do you have maybe otel collector in mind to create a video?
thank you! yes i have few videos as well as otel with tracing and visualizing traces in grafana with tempo
Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135
Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136
How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140
Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141
OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - github.com/antonputra/tutorials/tree/main/lessons/178 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
@@AntonPutra ♥
please test C# Dotnet core vs Java Vertx or Quarkus
thanks, noted!
@@AntonPutra It would be very interesting because Java and C# are very popular and in other tutorials they show always some Fibonacci calculations or just calling a simple api.. but what you are doing is real world examples. Thanks 🙏
Hello! Nice benchmarks! Please can you record a benchmark of vert.x (async java framework), spring boot webflux, ktor multiplatform server (both jvm and native) and golang stdlib to compare with. Thanks in advance!
thanks for the suggestion, noted!
please make a tutorial for beginners how to test out projects like this, like what tools you are using (ps: I am a beginner)
ok will do at some point!
but i have few tutorials already
Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135
Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136
How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140
Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
Tnx
my pleasure!
I would really be interested in Echo and a comparison to an elixir api
it's coming..
@@AntonPutra 😍
do one with elastic search
ok
fiber wins just because of its middleware handling
i need to test gnet
Hi @AntonPutra, Cool video, and cool comparison. Which software are you using to generate the load on the APIs?
thanks! adobe
Thanks
welcome!
I've no idea about coding stuffs. I only work with DevOps tools. So i want to ask that a single pod can handle this much request ? If if we get more requests then we have to scale the pods? Or to do anything ?
you have 2 options, either to scale it vertically first (adding more cpu and memory here - github.com/antonputra/tutorials/blob/main/lessons/204/deploy/go-stdlib-app/deployment.yaml#L28-L34)
or scale it horizontally, since it's a steless service it's very easy just by increasing the replica count nere - github.com/antonputra/tutorials/blob/main/lessons/204/deploy/go-stdlib-app/deployment.yaml#L10
you can scale vertically only so much, maybe 4-6 CPU max, then just start scaling horizontally
Thank you
my pleasure
great
thanks!
great, what about grafana dashboard source code?
i have dedicated video explaining how to set this up, source code - github.com/antonputra/tutorials/tree/main/lessons/135
Hello new member here, is there an explanation video for setting up prometheus, grafana and processing visualizing it on dashboard?
thank you! well i have few videos explaining how to monitor all of this, pls take a look
Monitoring EKS & EC2 instances with MANAGED Prometheus & Grafana - github.com/antonputra/tutorials/tree/main/lessons/130 How to monitor Persistent Volume usage in Kubernetes using Prometheus? - github.com/antonputra/tutorials/tree/main/lessons/134 How to monitor Containers in Kubernetes using Prometheus & cAdvisor? - github.com/antonputra/tutorials/tree/main/lessons/135
Monitor HTTP/REST API in Kubernetes using Prometheus & Nginx Ingress Controller - github.com/antonputra/tutorials/tree/main/lessons/136
How to Monitor Golang with Prometheus (Counter - Gauge - Histogram - Summary) - github.com/antonputra/tutorials/tree/main/lessons/137 How to Monitor Nginx with Prometheus and Grafana? (Install - Monitor - Fluentd) - github.com/antonputra/tutorials/tree/main/lessons/140
Prometheus Operator Kubernetes Tutorial - github.com/antonputra/tutorials/tree/main/lessons/154 How to Build Custom Prometheus Exporter? - github.com/antonputra/tutorials/blob/main/lessons/141 Take a look at all lessons here in the readme - github.com/antonputra/tutorials/blob/main/docs/contents.md
@@AntonPutra thank you very much Anton
Would be interesting to see some framework like gin vs ogen. Ogen uses code generation to create static routing tree and uses fast json encoding/decoding for requests and responses. IMO, ogen works really well for building contract-first APIs
thanks for the suggestion, noted!
Great video! I looked at the Fiber docs, and I don't see where they recommend using the standard library first. Can you provide some details about this? I'd appreciate it.
sure, well it is based on fasthttp and it's from there official docs - "For most cases net/http is much better as it's easier to use and can handle more cases. For most cases you won't even notice the performance difference."
also take a look at FAQ - "Are there known net/http advantages comparing to fasthttp?"
github.com/valyala/fasthttp?tab=readme-ov-file#fasthttp-might-not-be-for-you
Why php benchmarks are not included in the channel?
will do php soon, maybe next week
Ok this is aside the point but,
How did you get that consistent coloring across dashboards in grafana (2:15),
It's a small thing but damn does it make the page so much clearer
it's hard coded, if you select a graph and scroll all the way down, you can override bunch of attributes for each service including color scheme (you can harcode or use regex)
great work. are you using fork feature in fiber?
if yes can you explain what is that
No i haven't in this benchmark but will use it next time when i compare with hertz and cover fork feature as well.
Here is a good explanation - github.com/gofiber/fiber/issues/180#issuecomment-590009242
@@AntonPutravery interesting how prefork run in behind. thanks 👍
Go std is the way to go ✌️
yes
can you do it between fiber vs echo.
yes, soon!
rust axum vs another production level back-end service it can be .net fremwork or go anything which is most adopted in industry
ok noted!
Elixir vs Rust Vs Go please 😊
Cool!!!
thanks! :)
Can you test echo web framework pls? Thanks.
yes, soon
Thanks for sharing. One thing I see is that the memory comparison is meaningless due to the fact that you are testing a CPU intensive application.
It would be interesting to see comparisons when the application is indeed memory intensive.
I guess you are right, but what is the most common use case when an application uses a lot of memory? I'm not going to test generic algorithms.
Why did the Fiber version on this test behaved different from the 1st test against Actix? In the test against actic both couldnt make to 2k req/s, but here is way beyond 10k. Am i missing something?
i ran this test in aws (eks), previously on my home lab (esxi)
🍿 Benchmarks: ua-cam.com/play/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn.html&si=p-UOaVM_6_SFx52H
Std ftw !
💯
next, I think you should end the debate fastapi vs django vs flask
thank you for the suggestion! I'll put it into my list
@@AntonPutra cannot wait.
@@AntonPutra Looking forward to it sir
Win:fastapi
How can people go api latency in micro seconds? I tried using go to write api, it's always in 35 ms >. It's in my local machine, it's even worse if run in on cloud
which software did you use to generate the traffic load for testing?
my own go client that sends http requests and prometheus metrics, this is old verion - github.com/antonputra/tutorials/tree/main/lessons/201/client
i'm updating this and keeping in different repo for now
Please do .NET Native AOT vs either Go or Java Quarkus
yes it is coming, i already have updated quarkus code
@@AntonPutra thanks! looking forward to it
C# vs Java please 🙏
ok, will do!
Can we finally have a definite answer to Go (stdlib or framework) vs Laravel
👀
@@AntonPutra 🤣
Why exactly should I not use Fiber, apart from the Go community's sentiment of using stdlib for everything and writing verbose code?
"Are there known net/http advantages comparing to fasthttp(fiber is based on fasthhtp)?"
net/http supports HTTP/2.0 starting from go1.6.
net/http API is stable, while fasthttp API constantly evolves.
net/http handles more HTTP corner cases.
net/http can stream both request and response bodies
net/http can handle bigger bodies as it doesn't read the whole body into memory
net/http should contain less bugs, since it is used and tested by much wider audience.
github.com/valyala/fasthttp
@@AntonPutra thanks 🙏🏽
.NET Orleans vs Go
rhanks, noted!
please do one for echo vs gin vs stdlib with mongodb
noted
Next.js is a full stack framework. (Almost) everyone loves it, its popularity in unquestionable. But how does it perform especially on server-side, let's say compared to Express?
thanks! noted!
Can you add beego v2 with this benchmarks
Did you test Java using virtual threads? They can be activated with JDK 21 + Spring Boot 3.2.x.
The results would be interesting compared to platform thread tests.
not yet, but it is coming soon, why not jdk 22 by the way? it is not supported yet by spring boot?
As far as I know, there are no performance improvements in JDK 22 compared to JDK 21. (This is just my opinion.)
However, you can still use JDK 21 or a higher version in your tests.
@@jumping-wolf ok got it
Cool video! still very confused about the results between rust and go. rust shouldnt have performed so poorly i think. Maybe Actix vs Axum vs Rocket?
i got a lot of feedback as well as few PRs to improve Rust code. I'll release update video in a few days Rust(actix) vs Go (stdlib)
@@AntonPutra thanks a lot! please mention what the issue was in the video. always interesting!
@@Sillyvan sure, and I'll share PRs as well
It would be great to see how NodeJs compares to this. I thought fiber much much faster, but it seems the difference not that big, in real world scenarios the bottleneck probably is the io/database.
I'll run some Node.js benchmarks in a week or so. Also, Fiber's resource utilization seems much smaller compared to others.
what 3th party thing are you usign to create that graphics?
adobe
How about go chi?
stdlib is based on chi logic so i assume it is close but will test soon
which application are you using to display graphs?
adobe
@@AntonPutra I was talking about Grafana at that time 😅
@@dungeon4971 oh, yes grafana is the best but have some legal issues :)
why isn't Fiber recommended for all use cases?
take a look at this question "Are there known net/http advantages comparing to fasthttp (fiber)?"
github.com/valyala/fasthttp?tab=readme-ov-file#faq
We can't judge its highly depends on what your api is we call another api or communicate with dB than results will be totally different from how to perform socket operations what are latency issue
And more imp how we can configure our nodes in your case its large machine what ami is use ? amd or asc?
So in short we cannot figure out in advance only test and find the facts when actual workload is running.
well i used m6a.4xlarge nodes (16 cpu and 32 Gi) BUT i deploy those apps in K8s with pod limites 2cpu and 256Mi memory
Sveltekit vs Golang
i'll do some ui benchmarks soon, i even have a setup with selenium 😊