Quarkus (Java) vs Fiber (Go): Performance Benchmark in Kubernetes

  Рет қаралды 144,703

Anton Putra

Anton Putra

Күн бұрын

Пікірлер: 500
@AntonPutra
@AntonPutra 4 ай бұрын
🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com)
@ooijaz6063
@ooijaz6063 4 ай бұрын
Are you sure that both apps are using same amount of connections in pool? Connection pool often makes most of the performance diff in this kind of benchmark. Quarkus defaults to 20 concurrent connections, and pgpool to 4 or runtime.NumCPU() from what I have read. Have you check performance for more than 20 connections in a pool?
@AntonPutra
@AntonPutra 4 ай бұрын
@@ooijaz6063 I used the defaults, but for the next tests, I'll double-check how many connections are actually opened on the PostgreSQL side.
@111segasonic
@111segasonic 4 ай бұрын
Perhaps you could also try helidon SE instead of quarkus. Helidon was built from the ground up by Oracle labs to use the latest java tech like virtual threads to serve requests
@AntonPutra
@AntonPutra 4 ай бұрын
@@111segasonic thanks i'll try it out
@Comeyd
@Comeyd 3 ай бұрын
I’d love to see Rust thrown into the mix as well!
@PanicAtProduction
@PanicAtProduction 4 ай бұрын
A benchmark must be like this. State of art. Good job!
@AntonPutra
@AntonPutra 4 ай бұрын
@ChengPhansivang
@ChengPhansivang 3 ай бұрын
What is state of art mean ?
@AntonPutra
@AntonPutra 3 ай бұрын
@@ChengPhansivang i guess something that people can relate to :)
@avalagum7957
@avalagum7957 4 ай бұрын
Wow, this is really good. The setup (kubernetes cluster, prometheus, grafana ...) deserves another video.
@AntonPutra
@AntonPutra 4 ай бұрын
Thanks! Just in case, the source code with all of these components is in my GitHub: github.com/antonputra/tutorials/tree/main/lessons/201/monitoring.
@rajivkumar-ub6uj
@rajivkumar-ub6uj 4 ай бұрын
Hey, can you make a video on how to setup this in local? May be with k8s supplied with docker desktop if relevant?
@AntonPutra
@AntonPutra 4 ай бұрын
@@rajivkumar-ub6uj i think so, the easiest way is just package everything as docker compose or perhaps just use local minuke cluster. i'll think about it
@rajivkumar-ub6uj
@rajivkumar-ub6uj 4 ай бұрын
@@AntonPutra yes, compose is the best way for larger audience. Would appreciate if you can share the compose config for this, thanks in advance
@AntonPutra
@AntonPutra 4 ай бұрын
@@rajivkumar-ub6uj ok
@ДеянДелчев-ы9з
@ДеянДелчев-ы9з 4 ай бұрын
I am go fanboy but I really like applications written in Quarkus. My first language was Java and it is mind-blowing how fast and light Quarkus feels compared to Spring
@AntonPutra
@AntonPutra 4 ай бұрын
some people say it is slower than jvm based, I'll see if I can test it
@lufenmartofilia5804
@lufenmartofilia5804 4 ай бұрын
You would be surprised how far spring came his way. With that being said, for long running app spring boot as none aot compiled would remain faster thanks to the jit compiler. Quarkus is really only good of you need fast startup or low ram consumption
@awesomesuprise9141
@awesomesuprise9141 4 ай бұрын
@@lufenmartofilia5804 good point
@AntonPutra
@AntonPutra 3 ай бұрын
@@lufenmartofilia5804 will test, when you say long running, how long?
@chrisfreel
@chrisfreel 3 ай бұрын
@AntonPutra long running is at least 10,000 tx before you start measuring. In the real world, weeks or months...
@SeySvK
@SeySvK 4 ай бұрын
Love these benchmark videos, nice work
@AntonPutra
@AntonPutra 4 ай бұрын
thank you! :)
@renbangbprd7236
@renbangbprd7236 3 ай бұрын
Please do Java Spring Boot (Native) vs Spring Boot (JDK) VS Quarkus (Native) vs Quarkus (JDK)
@AntonPutra
@AntonPutra 3 ай бұрын
ntoed!
@stealth-350
@stealth-350 Ай бұрын
And add Micronaut (Native & JDK) to this chain, plz
@TweakMDS
@TweakMDS 4 ай бұрын
This second test scenario is absolute perfection in testing real world applications. It's easy to get excited about a performance difference of like 400% (for example) in a synthetic benchmark, but by including database, storage and (de)serializing, it gives a much more nuanced picture of how it would actually scale and perform. In this case I would say both applications performed well and comparable. I'd be interested in a bit of a deeper dive in these applications by including opentelemetry and seeing what functions might bottleneck.
@AntonPutra
@AntonPutra 4 ай бұрын
Thanks. Well, in some tests, I used OpenTelemetry clients with this Prometheus client in both Go and Java. I'm wondering what else you would instrument besides these function calls to S3 and the database. I might include it in the following videos. example - github.com/antonputra/tutorials/blob/main/lessons/201/go-app/images.go#L50-L62
@TweakMDS
@TweakMDS 4 ай бұрын
@@AntonPutra Must have missed that detail, very well done and thanks for the reply!
@AntonPutra
@AntonPutra 4 ай бұрын
@@TweakMDS thanks!
@GBXS
@GBXS 3 ай бұрын
But it doesn't do that much. The programs doesn't change any data. It just uploads it.
@AntonPutra
@AntonPutra 3 ай бұрын
@@GBXS I'm thinking about adding an additional test with Kafka consumer/producer and perhaps a simple ETL pipeline. Any suggestions?
@ninjaasmoke
@ninjaasmoke 4 ай бұрын
Finally! A detailed comparison that just doesn’t test the /hello-world endpoint
@AntonPutra
@AntonPutra 3 ай бұрын
haha, thanks!
@GabrielPozo
@GabrielPozo 4 ай бұрын
Love these benchmark videos, your work is amazing!
@AntonPutra
@AntonPutra 4 ай бұрын
❤️
@DillPL
@DillPL 4 ай бұрын
Interesting comparison, BUT: - the first tests does not test the startup time itself (should be
@AntonPutra
@AntonPutra 4 ай бұрын
I try to improve each time I create benchmarks. Next time, I will definitely use the v2 Go SDK and apply some other recommendations from your side. Thank you for taking the time to leave this feedback.
@DillPL
@DillPL 4 ай бұрын
@@AntonPutra glad I could help and you haven't taken it as a personal attack or something :D I really value your videos and open source code for every video! Looking forward to seeing more of them.
@AntonPutra
@AntonPutra 4 ай бұрын
@@DillPL thank you! i actually implemented your suggested idea in the new video and reduced the size by 6 mb (45 -> 39) :) - kzbin.info/www/bejne/a2e3hpmtms9-nNE will try other tips next as well and finally update that sdk lol
@jorgetovar621
@jorgetovar621 4 ай бұрын
This is definitely the best DevOps channel.
@AntonPutra
@AntonPutra 4 ай бұрын
@gasha1137
@gasha1137 2 ай бұрын
бро ты красавчик, ничего лишнего, все по делу, качество и битрейт на высоте, видосик красивый, респект!
@AntonPutra
@AntonPutra 2 ай бұрын
spasibo❤️
@cewa44
@cewa44 2 ай бұрын
From the whole video I have profited so much in percentails. You have clear so much
@AntonPutra
@AntonPutra 2 ай бұрын
cool
@mayboroda
@mayboroda 3 ай бұрын
First of all, this is the best content on youtube so far. Well done. Thank you!
@AntonPutra
@AntonPutra 3 ай бұрын
thank you! :)
@Bourn77
@Bourn77 4 ай бұрын
please do c# vs Java, use minimal api with AOT for c# and GraalVM or whatever AOT thing Java has.
@AntonPutra
@AntonPutra 4 ай бұрын
ok will do soon!
@siya.abc123
@siya.abc123 4 ай бұрын
Would love to see C# vs Go
@krzysi3k-yt
@krzysi3k-yt 4 ай бұрын
C# vs Go vs Java would be nice
@AntonPutra
@AntonPutra 4 ай бұрын
any specific test scenarios? or the same
@krzysi3k-yt
@krzysi3k-yt 4 ай бұрын
@@AntonPutra your current test scenarios are very good so I wouldn't change anything. Regarding C# I would use LTS version (dotnet 8) which is the fastest one amongst other versions according to Microsoft.
@AntonPutra
@AntonPutra 4 ай бұрын
@@krzysi3k-yt ok, I'll maybe do it next
@1wsm1
@1wsm1 4 ай бұрын
Rust - same tests
@Serizon_
@Serizon_ 2 ай бұрын
this is so professional! I love it! please do bun vs deno v2 since deno has gotten npm compatibility , the only difference now between bun and deno (aside from being written in zig and rust) is the speed (I think , both have gotten very nice std library) please do a benchmark comparing everything!
@RayAndrewsDev
@RayAndrewsDev 2 ай бұрын
I really admire the effort you put into describing why you chose your testing methodology as well as the testing itself
@henryong7788
@henryong7788 4 ай бұрын
Seems like Java 21 was used but Virtual threads wasn't used for the Quarkus application. Wasn't that the whole point to using newer Java version with the performance improvements and non-blocking reactivity APIs?
@AntonPutra
@AntonPutra 4 ай бұрын
yeah, i used java 21. I'll make sure to test virtual threads next time, maybe try to compare different java frameworks as well
@henryong7788
@henryong7788 4 ай бұрын
​@@AntonPutrahey, thanks for making this video. Just that needed to point out the code looks to be done in a older/traditional method even though Quarkus has annotations that resolves traditional blocking calls that modern programming languages like Go probably already has underlying. Great detailed video as always! Maybe I'll try this out on my local machine to test out too!
@AntonPutra
@AntonPutra 4 ай бұрын
@@henryong7788 I'll soon be comparing Quarkus with Spring Boot, and I'll make sure to use the latest language features.
@EricSouzarys
@EricSouzarys 4 ай бұрын
Virtual Threads are not better in performance compared to fully reactive code. Quarkus fully reactive or Spring fully reactive will always beat virtual threads, both in performance and resources usage.
@AntonPutra
@AntonPutra 4 ай бұрын
@@EricSouzarys good to know thanks
@xelesarc1680
@xelesarc1680 4 ай бұрын
Please test dotnet lastest 8 vs go thanks
@AntonPutra
@AntonPutra 4 ай бұрын
ok, comming next
@metaltyphoon
@metaltyphoon 4 ай бұрын
@@AntonPutraensure to use Minimal APIs and compile it AOT.
@Nick-yd3rc
@Nick-yd3rc 4 ай бұрын
Interestingly, in your Test scenario 2, your Quarkus app is spiking in DB latency while having constant times in between, as if the Postgres client would be idling to gather the queries (or waiting on a lock?) and send them in bursts.
@AntonPutra
@AntonPutra 4 ай бұрын
yeah, I noticed it
@or1699
@or1699 4 ай бұрын
Great video! The benchmarks were really helpful. Keep up the great work!
@AntonPutra
@AntonPutra 4 ай бұрын
thank you! will do
@slansky6626
@slansky6626 Ай бұрын
Excelent video, thank you so much! Do you think you could show this same benchmark comparing quarkus and go pushing both to its limits as you've done in your other videos?? I'm really curious about how they both compare on performance under heavy loads. My guess is quarkus would break first but I wonder how big is the difference. (I'd expect both are kinda close) Excelent work, and I'm very excited for your future videos!
@shamilAliyev92
@shamilAliyev92 4 ай бұрын
Could you do the same test for Kotlin and Java ? Or Kotlin and Go. Please 🙏
@AntonPutra
@AntonPutra 4 ай бұрын
ok let me see
@belkocik
@belkocik 4 ай бұрын
​@@AntonPutra Would love see a Quarkus and Kotlin benchmarks compared to Spring Boot and Kotlin
@AntonPutra
@AntonPutra 4 ай бұрын
@@belkocik 🫡
@ManuelMartinez-nl5cy
@ManuelMartinez-nl5cy 4 ай бұрын
Great videos like the rest of what you do. I'm using your video sto improve my knowledge on cloud/kubernetes area.❤❤
@AntonPutra
@AntonPutra 4 ай бұрын
thank you!❤
@kamurashev
@kamurashev 4 ай бұрын
It would be interesting to see what happens if you push requests to the limits and how high that limits are. Additionally for the Java it can be build to native image with spring boot as well. It sometimes not that smooth though but honestly I expect it to perform better with spring boot.
@ooijaz6063
@ooijaz6063 4 ай бұрын
Idk, native image crashes randomly and have lower performance than jited code atm. It's good only (if not crashes) for low traffic applications on serverless.
@kamurashev
@kamurashev 4 ай бұрын
@@ooijaz6063 I haven’t loaded my test app extensively but for me it worked ok and had better performance.
@ooijaz6063
@ooijaz6063 4 ай бұрын
It may change though with strong adoption of virtual threads in next few years and servlet api will be good again.
@AntonPutra
@AntonPutra 4 ай бұрын
I have the same limits for both: github.com/antonputra/tutorials/blob/main/lessons/201/deploy/java-app/deployment.yaml#L27-L33, and I run them on dedicated nodes using the ESXi Hypervisor.
@kamurashev
@kamurashev 4 ай бұрын
@@AntonPutra I do understand, what I wanted to say is what happens if you push client requests higher and higher. The load seemed to be not that high, so the light load conditions were tested but what would happen under high load? It can be really detrimental in real world.
@robertoaraneda6006
@robertoaraneda6006 2 ай бұрын
thanks for sharing.. can you do it with nodejs :P?
@AndrewGraaff-n4g
@AndrewGraaff-n4g Ай бұрын
Great video. Did you use the Reactive version of Java or the OS Thread version? If the Blocking version it would be interesting to see what would happen if you ran those on virtual threads. And what were the results of the reactive version.
@AntonPutra
@AntonPutra Ай бұрын
thanks, it's been a while, but you can find a link to the source code in the description
@AndrewGraaff-n4g
@AndrewGraaff-n4g Ай бұрын
@@AntonPutra I did. There are 2 versions and it looks like the regular hardware thread version was used. Since these workloads are all IO it would be better to use virtual threads (annotate with @RunOnVirtualThread) or the reactive version. But maybe the reactive version was used. I have always seen better performance on Quarkus than Go so these results are a bit surprising.
@AndrewGraaff-n4g
@AndrewGraaff-n4g Ай бұрын
@@AntonPutra But your work is amazing. And I shall surely learn from it, especially the observability.
@jordanrothschild8310
@jordanrothschild8310 Ай бұрын
Great video! The test seems a bit unfair to Java, as much of the time was likely spent serializing JSON, which can vary significantly based on the library used. It would be interesting to see results with a more complex application that uses intricate data structures, as Go’s garbage collector introduces pauses and latency, while Java is known for its efficiency in these scenarios. Now, on the topic of environments and the test setup, I have a few questions. Is it statistically valid to compare a test run on Kubernetes with minimal requests? For the comparison to hold up with few requests, each application's runtime environment would need to be exactly the same, which can be difficult to guarantee given the cluster load and where each pod is deployed. It might actually be easier to run the test on your local machine, where you can control the resource allocation. However, I noticed you’re using a Mac, so factors like virtualization might make the results diverge even further from what you’d see in a production environment
@ПавелАвдеев
@ПавелАвдеев 4 ай бұрын
I'd be interesting to compare Hotspot (various GC) vs GraalVM(Quarkus, SpringBoot)
@AntonPutra
@AntonPutra 4 ай бұрын
ok let me see
@terribleprogrammer
@terribleprogrammer 4 ай бұрын
It would be interesting to test long term throughput in this comparison.
@AntonPutra
@AntonPutra 3 ай бұрын
@@terribleprogrammer how long? day, 2, a week?
@terribleprogrammer
@terribleprogrammer 3 ай бұрын
@@AntonPutra one week would be interesting. You can also mix up jvm, graalvm and go Lang in a single video
@AntonPutra
@AntonPutra 3 ай бұрын
@@terribleprogrammer ok, i'll see if it makes any difference and if it does i'll make something
@vishnugovindan8550
@vishnugovindan8550 3 ай бұрын
What about micronaut? Would love some benchmarks on this 😊
@AntonPutra
@AntonPutra 2 ай бұрын
ok, i'll take a look, i'll get back to java soon
@john33john33
@john33john33 4 ай бұрын
a good indeed comparison. only one thing wanna further look into, how do same test behave at high throughput like 500 / 1000+ req/s
@AntonPutra
@AntonPutra 4 ай бұрын
Thanks, I may include screenshots or just improve my tests in the future.
@ramencombo
@ramencombo 2 ай бұрын
Why does Java's memory usage is high when it is idle? Also will it also go high when it is idle after processing requests?
@a.nk.r7209
@a.nk.r7209 4 ай бұрын
How to create this setup of k8s + grafana + promethues . Please create a video of this setup
@AntonPutra
@AntonPutra 4 ай бұрын
well i use esxi hypervisor to host my Kubernetes at home, i have some steps to reproduce it with metalb if you are interested - github.com/antonputra/kubernetes-on-premise Also to deploy monitoring stack (prometheus & grafana & cadvisor & kube-state-metrics etc) i use terraform with yaml tf - github.com/antonputra/tutorials/tree/main/lessons/201/terraform yaml - github.com/antonputra/tutorials/tree/main/lessons/201/monitoring
@a.nk.r7209
@a.nk.r7209 4 ай бұрын
@@AntonPutra thanks! 🫱🏻‍🫲🏼
@vivekchaudhary5728
@vivekchaudhary5728 4 ай бұрын
can you please do a GO vs node.js Lambda testing? with cold start time, memory usage and other metrics
@AntonPutra
@AntonPutra 4 ай бұрын
ok i already have some lambda benchmarks in that playlist but i'll refresh it soon
@rodhash
@rodhash 9 күн бұрын
14:20 seems strange Java memory decreasing once the App starts.. Java uses more memory when App is down?
@rajumondal4283
@rajumondal4283 13 сағат бұрын
Lol
@pi3ni0
@pi3ni0 4 ай бұрын
Nice job, I would like to see Test 2, but with higher RPS
@AntonPutra
@AntonPutra 4 ай бұрын
Okay, I might just include additional screenshots under lesson '201' in my GitHub repo
@pi3ni0
@pi3ni0 4 ай бұрын
@@AntonPutra It would be great, thank you Anton!
@dweblinveltz5035
@dweblinveltz5035 2 ай бұрын
Very nice video! Seems like if cost-cutting is of great concern, you'd lean towards go to keep CPU utilization down. I would love to see a similar comparison video between Java and JavaScript/Node.js.
@AntonPutra
@AntonPutra 2 ай бұрын
thanks! noted
@yuriimalikov9855
@yuriimalikov9855 2 ай бұрын
Love your videos! What tool do you use for creating those amazing animations and mounting videos?
@vladimirkashitsyn1871
@vladimirkashitsyn1871 3 ай бұрын
Please, compare native image of Vert.X (with java 21) and Go)
@AntonPutra
@AntonPutra 3 ай бұрын
thanks for the suggestion, noted!
@RiccardoPasquini
@RiccardoPasquini 3 ай бұрын
I would also compare compile time of quarkus native and go executables....
@AntonPutra
@AntonPutra 2 ай бұрын
ok noted
@phyohtetpaing44
@phyohtetpaing44 4 ай бұрын
There was a non-blocking Netty server implemented with Spring Reactive Web, which is more efficient. for databae approach use R2DBC the reactive nonblocking data repository. btw spring also support graalvm and it is not outdated.
@AntonPutra
@AntonPutra 4 ай бұрын
ok thanks, it's not outdated just it's been around for a long time
@yohanebergerkouokamkuisu4238
@yohanebergerkouokamkuisu4238 3 ай бұрын
Quarkus uses non-blocking netty
@KhoaH11
@KhoaH11 4 ай бұрын
Nice work! The explanation around the benchmark is easy to understand and full of information there. IMHO, you should start to build your own courses on Udemy :)
@AntonPutra
@AntonPutra 4 ай бұрын
thanks! maybe
@kentra-io
@kentra-io 2 ай бұрын
Very informative! How about comparing performance of java vs python stream processors in Apache Flink?
@AntonPutra
@AntonPutra 2 ай бұрын
thanks, yes, i was thinking about spark/flink and different apis: python, java, scala, etc.
@Sasha192_
@Sasha192_ Ай бұрын
Please make a comparison for Java Vert.x vs Golang Fiber
@AntonPutra
@AntonPutra Ай бұрын
added!
@helloworld7796
@helloworld7796 2 ай бұрын
Okay, you got me now. I will start trying prometheus and grafana. The question I have is which tools do you use for load testing? You are using word "client" for this. I assume you use some kind of tools, like jmeter, k6 or?
@marcwinner567
@marcwinner567 4 ай бұрын
Love these benchmarks! 🎉
@AntonPutra
@AntonPutra 3 ай бұрын
thanks! i try to add some extra
@Nephtys1
@Nephtys1 4 ай бұрын
Can someone explain the extreme drop in memory usage for Java here? Under Hotspot JIT I would assume something similar, but this is running on SubstrateVM instead of JVM. Sadly I have little experience with Native Image and Substrate, so an explanation eludes me. What is happening here with memory usage?
@AntonPutra
@AntonPutra 4 ай бұрын
I'm not an expert in Java, and I hope to get feedback from someone who is, but it looks like it optimizes for the load that is given to the application.
@EricSouzarys
@EricSouzarys 4 ай бұрын
probably because of garbage collections (graalvm stills have a simple GC). The GC learns what objects need to be cycle e and what does not need. Missing JIT actually affects CPU usage. You can easily test this by running a benchmark against native code and JVM. You will see that under high load JVM version uses less CPU
@AntonPutra
@AntonPutra 4 ай бұрын
@@EricSouzarys i'll be testing quarkus vs jvm spring boot soon, any suggestions?
@EricSouzarys
@EricSouzarys 4 ай бұрын
@@AntonPutra I think that you Just need to be careful to not compare orange and apples. I think you can compare these combinations if the tests are going to be applied to an I/O bound app: 1. Quarkus Blocking vs Spring Blocking 2. Quarkus fully reactive vs Spring Fully reactive (with webflux) 3. Quarkus with virtual threads vs Spring with virtual Threads. An extra combination could be Quarkus Fully Reactive vs Spring with Virtual Threads as virtual threads with Spring is more used than with quarkus. A comparison between reactive quarkus against Spring (without virtual threads) would not be fair
@AntonPutra
@AntonPutra 4 ай бұрын
@@EricSouzarys ok noted!
@pauluslestyo7646
@pauluslestyo7646 4 ай бұрын
It's great if you can benchmark framework from bun runtime like Hono and ElysiaJS
@AntonPutra
@AntonPutra 4 ай бұрын
ok noted!
@ionutale1950
@ionutale1950 4 ай бұрын
nice comprarison, this could work great on a batch. how is it going to compare on an app, that has peaks during a specific time of the day?
@AntonPutra
@AntonPutra 4 ай бұрын
Thanks! There is a very small difference in terms of scalability; both are small with a fast startup time. I think Go is a little more efficient, so potentially you would need fewer compute resources.
@ionutale1950
@ionutale1950 4 ай бұрын
​@@AntonPutra the way java is using memory with GraalVM is very smart, is like observing the needs, then optimise the RAM needs. This could suggest that we could provision the JAVA container with a smaller POD in term of RAM. My concern is: how well does java handle random peaks? if we have 200 req/s, than right after the RAM stabilises suddenly we get 500 req/s, how well does JAVA handle that peak? is java going to panic and ask for wayyyy more memory than it actually needs? if this is the case, than the JAVA app may actually crash for insuficient container memory. Does it make any sense, what i've just said?
@AntonPutra
@AntonPutra 4 ай бұрын
@@ionutale1950 yes, it does. i'll try to configure the client next time to simulate such spikes when I compare spring boot with quarkus
@harshwardhanparmar8258
@harshwardhanparmar8258 3 ай бұрын
Amazing video, great job !!
@AntonPutra
@AntonPutra 3 ай бұрын
thank you!
@alexanderv5975
@alexanderv5975 2 ай бұрын
Hi. Nice video indeed. Can you explain why Java uses significantly less memory under load then in idle run?
@BroddeB
@BroddeB 3 ай бұрын
I guess the latency peaks in the database graph is caused by the garbage collection overhead. Is golangs garbage collection implementation that much better? Is the p90 statistics hiding some latency spikes?
@AntonPutra
@AntonPutra 2 ай бұрын
yes, actually, there is a huge difference between p90 and p99
@bibahbibah5108
@bibahbibah5108 4 ай бұрын
i wona see spring boot native image vs Quarkus vs go spring native is framework like Quarkus so it's nice to compare this 2 framework
@AntonPutra
@AntonPutra 4 ай бұрын
ok noted!
@vasilekx8
@vasilekx8 4 ай бұрын
Please compare envoy with nginx, traffic, caddy
@AntonPutra
@AntonPutra 4 ай бұрын
ok will do caddy soon.. Nginx vs. Envoy performance benchmark - kzbin.info/www/bejne/ZoKcemCuYpKhppY Apache vs. Nginx performance benchmark - kzbin.info/www/bejne/fKmbkpmMj69_mpY Traefik vs. Nginx performance benchmark - kzbin.info/www/bejne/mJjGl3iNlL6bbac
@furylao8107
@furylao8107 2 ай бұрын
really nice approach to monitoring performance. can you make a similar video but with java profiling tool to detect which specific part of the code must be reworked?
@GreenVanGeek
@GreenVanGeek 2 ай бұрын
Nice video. One comment. Scale up/down is increase or decrease the machine resources like CPU and memory. Scale in/out y horizontal scaling ;)
@mantovani96
@mantovani96 4 ай бұрын
Loved the video, subscribed!
@AntonPutra
@AntonPutra 4 ай бұрын
thanks!!
@nabeelmemon6852
@nabeelmemon6852 3 ай бұрын
Interesting. These tests could be extended to compare Hotspot VM, Generational ZGC and a few other switches. Can you make a video of your entire testing setup (focusing on docker, kubernetes, prometheus and grafana) from scratch? I think it's totally worth it.
@bernhardbaumgartner4702
@bernhardbaumgartner4702 Ай бұрын
What’s the explanation for the memory profile of Quarkus, can someone explain this?
@AntonPutra
@AntonPutra Ай бұрын
i'll run some more tests in near future
@bernhardbaumgartner4702
@bernhardbaumgartner4702 Ай бұрын
I’m just wondering why the memory usage goes up and up and up at the beginning, and at some point (reaching a threshold or something?) something like an aggressive GC seems to kick in never letting memory usage go up again.
@malikmalik-zx1wq
@malikmalik-zx1wq 5 күн бұрын
can you tell me how to query promql to display the memory usage graph?
@korbendallasmultipass1524
@korbendallasmultipass1524 4 ай бұрын
Would be good to see a native build test with GraalVM in comparison. Furthermore can Quarkus use Mutiny as Reactive Framework - maybe this would bring the two closer together as well.
@AntonPutra
@AntonPutra 4 ай бұрын
ok noted!
@Kessra
@Kessra 3 ай бұрын
Small improvement suggestion: In Java you could use a record instead of a class. This shouldn't have a big impact on the test results but at least spares you a bit of typing. It would have been great to include a base Java and a Spring/Spring Boot comparison deployed into a java21 image container here as well just to see how much of an impact Quarkus and the native container optimization really yields. So far I couldn't convince anyone at our company to try out Quarkus. Just a question out of interest: Are you going to create a benchmark framework where similar tasks are done by various language implementations and then release your findings to the public? I just stumbled across an other video and then this one was recommended to me, and to me it looks like your videos basically doing that but just with a smaller and more comprehensible scope. So a combination of runtime analysis of different languages for various tasks would definitely be helpful, I guess
@AntonPutra
@AntonPutra 3 ай бұрын
thanks, yes i'll get to Java soon and I'll try to improve a few things
@MovinduLochanaWijethunge
@MovinduLochanaWijethunge 3 ай бұрын
@@AntonPutra Can you try using both Spring Boot Native and Quarkus to see how much of a performance difference they have
@AntonPutra
@AntonPutra 3 ай бұрын
@@MovinduLochanaWijethunge yes will do
@alienmars2442
@alienmars2442 2 ай бұрын
If those java containers are converted into graalvm native code, I wonder what the comparation will be ?
@ilyanemtsev2790
@ilyanemtsev2790 3 ай бұрын
Can you test Spring Boot vs Spring Boot WebFlux
@AntonPutra
@AntonPutra 3 ай бұрын
ok noted!
@Virus00000000000001
@Virus00000000000001 3 ай бұрын
Could you try GraalVM next?
@AntonPutra
@AntonPutra 2 ай бұрын
yes soon
@Jollyrogger805
@Jollyrogger805 3 ай бұрын
I work on both Java and go, your results are similar to my observations. Java consumes memory due to too much of autoconfigurations which involves hell lot of classes + some of jdk had garbage collection issue but if you develop an enterprise ready application in go with distributed tracing, logging, metrics, database writes heavy operation etc, their performance is almost equivalent. I had to manually write all those functionalities in go Lang due to lack of autoconfiguration and libraries
@nojerome497
@nojerome497 3 ай бұрын
Very good point. Java frameworks like Quarkus are doing a lot to make large scale application development easier. All of that stuff it's doing will affect runtime performance.
@larryliang6748
@larryliang6748 2 ай бұрын
How much memory was allocated to each program? the vidoe focused on showing the difference but I wanted to know say is a 25% usage of what. thx
@AntonPutra
@AntonPutra 2 ай бұрын
256Mi - github.com/antonputra/tutorials/blob/main/lessons/201/deploy/java-app/deployment.yaml#L32
@richarmunicosamaniego8216
@richarmunicosamaniego8216 4 ай бұрын
and what will happend with Quarkus vs SpringBoot
@AntonPutra
@AntonPutra 4 ай бұрын
interesting, i'll test it soon
@LawZist
@LawZist 4 ай бұрын
Great Benchmark! can you share the promQL for the metrics? is it some plugin or you wrote it by yourself? thanks
@AntonPutra
@AntonPutra 4 ай бұрын
thanks! it's just open source and i actually have dedicated youtube tutorials how to measure, cpu/memory/vpc etc.. here is a dashboard and promql queries for this specific video - github.com/antonputra/tutorials/blob/main/lessons/201/dashboard.json java metrics - github.com/antonputra/tutorials/blob/main/lessons/201/java-app/src/main/java/com/antonputra/ImageResource.java#L51-L59 golang metrics - github.com/antonputra/tutorials/blob/main/lessons/201/go-app/metrics.go#L13-L27
@LawZist
@LawZist 4 ай бұрын
@@AntonPutra is there any reason to prefer summary over histogram? And can you please share the link for your measure tutorials? Thanks a lot!
@AntonPutra
@AntonPutra 4 ай бұрын
@@LawZist use summary in edge cases when you have a single instance of the app and you can only scale vertically, cause it's not possible to aggregate them over multiple instances, for example to get p90 percentile for 5 replicas of your app. With summary prometheus compute p90 on the client itself. Use histogram in all other cases kzbin.info/www/bejne/jYalm5-Ar65ll5I kzbin.info/www/bejne/jJupd619e96Jors kzbin.info/www/bejne/mn7GkmegfcaZqpo kzbin.info/www/bejne/nJfCiXujbpuDgbM
@LawZist
@LawZist 4 ай бұрын
@@AntonPutra thanks!!
@陳秉寬-t7y
@陳秉寬-t7y 3 ай бұрын
The sql latency difference might be due to the use of prepared statement
@AntonPutra
@AntonPutra 3 ай бұрын
maybe, but go postgres driver does it by default and do not recommend explicitly "prepare" statements before execution.
@alvinxyz7419
@alvinxyz7419 4 ай бұрын
this is very neat, i love it
@AntonPutra
@AntonPutra 4 ай бұрын
thank you!
@muray82
@muray82 2 ай бұрын
It would be good to change a bit what the application is doing. In our company we have a piece of code that is meant to validate if we don't have any delays in network stack. To do so we tell the app to generate random 1000 bytes and sent that to client. With that nothing is cached.
@ugurata
@ugurata 2 ай бұрын
Java runtimes were historically designed to consume the resources of the whole VM so may be you can compare a Java app running on a JVM (not a native image but a hotspot JVM) on a VM with 4 cores and 4 GB RAM vs a go app running on Kubernetes using that same VM
@r1nlx0
@r1nlx0 2 ай бұрын
Is this using graalvm oracle or graalvm community edition ? very interest on comparing graalvm oracle AOT & JVM based vs golang
@AntonPutra
@AntonPutra 2 ай бұрын
it should be the community version. i'll make some more java content in the near future.
@awesomesuprise9141
@awesomesuprise9141 4 ай бұрын
Wonderful content Anton!
@AntonPutra
@AntonPutra 3 ай бұрын
thank you!
@madmasontv7254
@madmasontv7254 4 ай бұрын
Thanks for you video! I really like it. Could you do the same tests for Spring vs Quarkus?
@AntonPutra
@AntonPutra 3 ай бұрын
thanks, will do, but first rust vs go
@havefun599
@havefun599 4 ай бұрын
Like always you rock, can you make a video about database architecture for production like MySql Replication Group etc, Thank you
@AntonPutra
@AntonPutra 4 ай бұрын
thank you! let me see
@whiletrue1-wb6xf
@whiletrue1-wb6xf 4 ай бұрын
Great work ! What about C++ vs GO ?
@AntonPutra
@AntonPutra 4 ай бұрын
will do! :) any specific frameworks on c++?
@eugehacks
@eugehacks 3 ай бұрын
@@AntonPutra drogon framework is very very fast and well written
@ZzooD
@ZzooD 3 ай бұрын
It would be interesting to see a test to failure, who and under what load will start throttling
@AntonPutra
@AntonPutra 3 ай бұрын
yes will do with improved java next time
@kawin-vir
@kawin-vir 4 ай бұрын
Would be nice to see Go (Fiber) vs Bun (Elysia)
@AntonPutra
@AntonPutra 4 ай бұрын
ok noted!
@germandavid2520
@germandavid2520 4 ай бұрын
Would be cool to see in a future video the framework web for Kotlin called Ktor.
@AntonPutra
@AntonPutra 3 ай бұрын
noted!
@helloworld7796
@helloworld7796 2 ай бұрын
I do think you should do some kind of load testing on the cheap 5$ instances. For example how many requests these cheap vps can handle before they crash, using golang, rust, php etc.
@Ayush-lj6pq
@Ayush-lj6pq 4 ай бұрын
Please make a tutorial on Golang.
@AntonPutra
@AntonPutra 4 ай бұрын
i have couple... How to Monitor/Instrument Golang with Prometheus (Counter - Gauge - Histogram - Summary) - kzbin.info/www/bejne/jYalm5-Ar65ll5I OpenTelemetry Golang Tutorial (Tracing in Grafana & Kubernetes & Tempo) - kzbin.info/www/bejne/kHqxaHtmZdqfh9k
@ChristopheDCPM
@ChristopheDCPM Ай бұрын
what does Java needs to have request coming in to lower its memory consumption ?
@AntonPutra
@AntonPutra Ай бұрын
i think memory plays an insignificant role in these tests
@sarabwt
@sarabwt 3 ай бұрын
It would be interesting if you compare go vs java non native, as non native should have better performance than native. You compile java to native only if you are building a CLI or a lambda, when you need fast startup.
@AntonPutra
@AntonPutra 3 ай бұрын
ok noted!
@dessavio
@dessavio 3 ай бұрын
I'd like to see how these both perform in multithreading and concurrency scenarios.
@AntonPutra
@AntonPutra 3 ай бұрын
can you suggest any use cases?
@dessavio
@dessavio 3 ай бұрын
@@AntonPutra Perhaps an ETL pipeline or batch processing. Ingest a large dataset, split it into chunks then process each in separate threads. Store the results into a database.
@dfghgfhb
@dfghgfhb 2 ай бұрын
Link for the prevoius java spring boot video?
@AntonPutra
@AntonPutra 2 ай бұрын
It’s a very old one. I’ll make an updated video soon.
@volshebniyfonar
@volshebniyfonar 28 күн бұрын
Гуд ынглиш, май бразер!
@HeyItsSahilSoni
@HeyItsSahilSoni 2 ай бұрын
Thia is all good, checking how well it performs, but if its not throttling, anything is fine as long as client latency is not out of whack. I think some stress testing will also give good comparision, like you did with node and go
@AntonPutra
@AntonPutra 2 ай бұрын
'll come back to java soon with improved benchmarks
@bonk1463
@bonk1463 4 ай бұрын
hey good test! can you test with go-chi instead of Fiber? go-chi is more optimized in terms of memory usage so that might explains why Java was using less memory in that first test. Overall, good video! Keep it up
@AntonPutra
@AntonPutra 3 ай бұрын
Thank you! I used Chi for one of my projects, but I think memory usage doesn’t play a major role in the user experience, such as client latency etc..
@yashshinde8185
@yashshinde8185 4 ай бұрын
How to get this bench mark dashboard to check the memory, etc. performance.
@AntonPutra
@AntonPutra 4 ай бұрын
I haven't published it yet, I may consider doing so in the future, but the Grafana dashboards themselves are in the repo.
@Mrhennayo
@Mrhennayo 3 ай бұрын
Java wise it's normal I didn't check your code but I assume that you used blocking request which in turn adds more over head and drops The cpu usage is divided between jvm + code + gc Memory java allocates the memory it needs from the get go and keeps increasing until it hits the headspace limits I'm pretty sure that maybe go can be a bit faster but we can ultimately optimize the application to handle more requests and minimize the drops by using reactor But before concluding I'm not saying that java or go or even delphi is better, constraints defines the application and vice-versa
@AntonPutra
@AntonPutra 3 ай бұрын
I want to test the Java Kafka Streams API, maybe with Go, and perhaps build a simple ETL pipeline. What do you think?
@Mrhennayo
@Mrhennayo 3 ай бұрын
@@AntonPutra that's sounds great, I created a dummy project for that if you wanna play with
@AntonPutra
@AntonPutra 3 ай бұрын
@@Mrhennayo thanks
@yashumittal
@yashumittal 2 ай бұрын
Please create a benchmark performance test for Deno 2.0?
@AntonPutra
@AntonPutra 2 ай бұрын
yes in about a week
@gabrielmartinez2455
@gabrielmartinez2455 4 ай бұрын
C# vs Go would be amazing to see. Maybe add to test 2 some simple reads from the database, and maybe add test 3 with some simple data structure or general purpose calculations to see how well each language performs. Amazing content. I am currently writing a high performance C# application for the government with .Net 8 and it is incredibly fast. I wonder if .net 8 has been improved so much that might even beat Java at this point.
@AntonPutra
@AntonPutra 4 ай бұрын
Can you elaborate on using simple data structures or general-purpose calculations to evaluate how well each language performs? I don't really want to run fibonacci anymore lol
@gabrielmartinez2455
@gabrielmartinez2455 4 ай бұрын
@@AntonPutra You can try to implement 3 different types of algorithms (In addition to the 2 tests you already did in your previous video). 1- Searching Algorithms (linear search) - ex: Create a List of 1 million objects (person: {Id, Name} - Id: must be unique integer 1 to 1,000,000. Name: generate random string. Populate your list with 1 objects (Person). Test: Generate a random Int value from 1 to 1million and find the Person object (by ID) using the random generated Int, and get the Name, then find the object in the list (by Name) compare and validate both ID match 2- Sorting Algorithms (sort the entire 1 million object (person) by name. 3 - File I/O Operations - generate random Int value from 1 to 1 million, find the Person in the List, write the Person's name to the first line in a file, if file already contains a line replace with the new name. Leverage ChatGPT to create the code for you in both languages. Just some ideas, lol
@AntonPutra
@AntonPutra 4 ай бұрын
@@gabrielmartinez2455 thanks! i'll try it
@KangoV
@KangoV 4 ай бұрын
Try Micronaut with its ahead of time compiled JSON databinding (Micronaut Serialisation).
@AntonPutra
@AntonPutra 3 ай бұрын
ok, will try
@VuLinhAssassin
@VuLinhAssassin 3 ай бұрын
Can you do with Java 21 using virtual thread vs go coroutine?
@AntonPutra
@AntonPutra 3 ай бұрын
i'll probably go with 22, i have something in mind
@alche8411
@alche8411 2 ай бұрын
Great job! But a few comments: Spring supports building native images as well, and they have maven/gradle plugins and a dedicated project Spring Native for this case. Actually, we are using it in production and building most of the Spring apps in native images. Summary: GO is faster, then JVM based stuff, well no surprise here :) In general, Quarkus doesn't give anything interesting compared to Spring, it's just a bit more modern and doesn't have much legacy stuff. What might be interesting to look at in this regard is Micronaout, because it does a fundamentally different Framework (compile-time and supports native images out of the box in comparison with runtime Spring with additional projects and layers for native support). Most likely Micronaout will show similar to GO numbers.
@AntonPutra
@AntonPutra 2 ай бұрын
thank you for your feedback. i'll get back to the java world soon, maybe next week, and make a few improvements
@archie400
@archie400 2 ай бұрын
Check java (helidon) with go (whatever framework)
@AntonPutra
@AntonPutra 2 ай бұрын
ok will do java soon
@humanardaki7911
@humanardaki7911 3 ай бұрын
"There are no solutions. There are only trade-offs" Thomas Sowell servers are cheaper than developer time
@AntonPutra
@AntonPutra 3 ай бұрын
true
@andreipushkin_globant
@andreipushkin_globant 3 ай бұрын
Not always true. Paying for each CPU cycle in the cloud you can easily get out of budget on scale. That is why optimization and algorithm knowledge is valuable again - it helps to save money.
Five of my favorite project ideas to learn Go.
11:31
Dreams of Code
Рет қаралды 90 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
Java 21 Is Good?! | Prime Reacts
27:08
ThePrimeTime
Рет қаралды 251 М.
Deno vs. Node.js vs Bun: Performance Comparison
12:28
Anton Putra
Рет қаралды 76 М.
Why You Want to Code With Quarkus in 2023
18:21
Sebastian Daschner
Рет қаралды 24 М.
Nginx vs Caddy Performance
15:27
Anton Putra
Рет қаралды 32 М.
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 128 М.
Java vs Go. Что выбрать?
14:17
Sergey Nemchinskiy
Рет қаралды 60 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН