Node.js vs Go (Golang): Performance (Latency - Throughput - Saturation - Availability)

  Рет қаралды 45,695

Anton Putra

Anton Putra

Күн бұрын

Пікірлер: 411
@AntonPutra
@AntonPutra 2 ай бұрын
► What should I test next? ► AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra ► Benchmarks: kzbin.info/aero/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn&si=p-UOaVM_6_SFx52H
@Yukiixs
@Yukiixs 2 ай бұрын
UDP echo server!
@alexreustle
@alexreustle 2 ай бұрын
Would you consider OLAP database benchmarks? Compare managed RDS postgres vs Redshift vs self managed greenplum cluster, vs clickhouse, duckdb, monetdb etc?
@朝秦-f2h
@朝秦-f2h 2 ай бұрын
node vs bun vs deno
@adriandrozman3404
@adriandrozman3404 2 ай бұрын
fastify vs elysia vs deno
@efrainsoteloferry4075
@efrainsoteloferry4075 2 ай бұрын
Go(stdlib) vs FastApi(Python)
@Blue-jk4fw
@Blue-jk4fw 2 ай бұрын
Can we see Bun vs Golang?
@Blue-jk4fw
@Blue-jk4fw 2 ай бұрын
I recommend Hono as the backend
@Abioticodin2387
@Abioticodin2387 2 ай бұрын
@@Blue-jk4fw or Elysia since it's a bun-specific library
@sherkan_n
@sherkan_n 2 ай бұрын
@@Blue-jk4fwor elysia
@bhuvanbm9104
@bhuvanbm9104 2 ай бұрын
Hono with bun is great and soo simple
@AlexanderMoon
@AlexanderMoon 2 ай бұрын
hyper-express (uWebSockets) will outperform bun/deno with express.
@Gorops
@Gorops 2 ай бұрын
Huh, I wonder how the newest JS runtimes, Deno 2 and Bun, compare to the classic Node.
@JohnDoe-ji1zv
@JohnDoe-ji1zv Ай бұрын
What’s the point to compare them if nobody using them in production anyway
@lucsoft
@lucsoft Ай бұрын
@@JohnDoe-ji1zvmany companies use deno
@Serizon_
@Serizon_ 2 ай бұрын
Please make a video on first comparing bun js and deno 2 speed then bun and golang I REALLY LOVE YOUR VIDEOS
@artemcodes
@artemcodes Ай бұрын
Amazing approach with the metrics. It’s was very nice to see the difference on real environment. Keep it going!
@AntonPutra
@AntonPutra Ай бұрын
thank you!
@conman7644
@conman7644 2 ай бұрын
yeah, these newer runtimes would be really interesting to see. like bun and deno 2.0
@AntonPutra
@AntonPutra 2 ай бұрын
next deno vs. node.js vs bun 😊
@conman7644
@conman7644 2 ай бұрын
​@@AntonPutra sounds awesome
@midewestmond9442
@midewestmond9442 2 ай бұрын
​@@AntonPutralet go
@AGAU1022
@AGAU1022 2 ай бұрын
​@@AntonPutraIf you use Elysia for Bun, then I would recommend using Fresh for Deno and Fastify or Hono for Node to keep it fair.
@ehfoss
@ehfoss 2 ай бұрын
Babe, wake up. Anton posted more benchies!
@Mr.BinarySniper
@Mr.BinarySniper 2 ай бұрын
would be awesome video.
@gustavomelo6560
@gustavomelo6560 2 ай бұрын
Amazing benchmarks as always you do! Please, make a video teaching us how to setup kubernets, grafana and prometheus to start play with some codes. Maybe a minikube, sidecards, deploying apps, metrics, etc. I would love to start playing with all of this tecniques
@fuzzylogicq
@fuzzylogicq 2 ай бұрын
I think something like a leader board for all the benchmarks would be interesting, (like how car drags have some board or laptime boards etc) would be interesting to come back later and see what tops and what tradeoffs to make between a certain language or framework etc.
@AntonPutra
@AntonPutra 2 ай бұрын
thanks! i was thinking about it. i want to eventually compare the fastest frameworks that each language has, and maybe also compare interpreted and compiled ones, then have a final battle 😊
@jungervin8765
@jungervin8765 2 ай бұрын
The difference is crazy I have never thought the difference can be this much, thank you. I made a good decision to use go :D
@galower405
@galower405 2 ай бұрын
Express is still one of the slowest frameworks for node, you may want to give a try to something like Hono.js. Also perhaps using something like the deno or the bun runtime which provide massive performance difference.
@AntonPutra
@AntonPutra 2 ай бұрын
yes, it's just a beginning.. next: deno vs. node.js vs bun
@jhirn2957
@jhirn2957 2 ай бұрын
These are fun to watch. I’d love to see one with Rails/Puma vs. whatever. I know Ruby isn’t going to win any drag races but it’s still the most Rapid development experience by a mile. I’d be happy to provide assistance with any configuration if you need.
@exapsy
@exapsy 2 ай бұрын
i love you man, thanks for these.
@AntonPutra
@AntonPutra 2 ай бұрын
thanks you! :)
2 ай бұрын
I would love to see the comparison of Java frameworks: helidon vs spring boot vs micronaut vs quarkus - with and without the support of native images. Many thanks for the great job you already have done!
@baluditor
@baluditor 2 ай бұрын
Thank you! Exactly what I wanted to see :)
@anonymous2596
@anonymous2596 2 ай бұрын
You are doing gods work
@sumantpatel7262
@sumantpatel7262 2 ай бұрын
Great job Anton, we are getting very insightful info on frameworks and runtime, but most of us in community are familiar with JS, can you please provide the comparison of different JS runtime maybe express but in bun runtime.
@thisistotest
@thisistotest 2 ай бұрын
Sir, C++ vs Rust vs Go. Especially C++ vs Rust.
@bloodpriest1302
@bloodpriest1302 11 күн бұрын
Nothing beats rust. Every other thing competes fr the 2nd place
@thisistotest
@thisistotest 11 күн бұрын
@bloodpriest1302 zig is faster than rust.
@bloodpriest1302
@bloodpriest1302 11 күн бұрын
@@thisistotest no its not. particular zig implementations of something could be faster under some scenarios involving dealing with default workings of both, but once you place in the optimizations & everything, rust is better
@ManiBalajiC
@ManiBalajiC 2 ай бұрын
man throwing those instances like its cheap ...
@Serizon_
@Serizon_ 2 ай бұрын
I am noob , could you please tell me how much it would cost? I don't think it would cost that much as compared to the reputation he has garnered in the industry
@asdasfdfgewqgrgyjh
@asdasfdfgewqgrgyjh 2 ай бұрын
​@@Serizon_ Youre right its not that much as he was only running the test for two hours. You can use AWS on demand pricing chart to figure it our. He ran the tests for two hours and used the following EC2 nodes. 3 m7g.4xlarge: $0.6528 per node per hour = $3.9168 1 m7g.2xlarge: $0.3264 per node per hour = $0.6528 2 m7g.xlage: $0.0816 per node per hour = $0.3264 For a total of $4.896 for the full test. Now he was running the nodes for longer then the test period but that should be a good estimate of how much this test cost him. Oh and you'd need to add however much the EKS cost to run in AWS that
@asdasfdfgewqgrgyjh
@asdasfdfgewqgrgyjh 2 ай бұрын
Look like I only counted the time for the second test. So you'll need to add another hour for the first test
@JonathanFraser-i7h
@JonathanFraser-i7h 2 ай бұрын
@@asdasfdfgewqgrgyjh EKS is only like $100 bucks a month for the hosted service. It's basically zero compared to compute unless you are running really small nodes.
@MS-oy3ry
@MS-oy3ry 2 ай бұрын
@@asdasfdfgewqgrgyjh and why exactly would you use on demand instead of spot?
2 ай бұрын
Wonderful and simple content , thank you !!
@AntonPutra
@AntonPutra Ай бұрын
thank you!
@BrunoFerro-sy9en
@BrunoFerro-sy9en 2 ай бұрын
Great work man! But I think that we need Java vs C# and Node Vs Python comparison too.
@Mr.BinarySniper
@Mr.BinarySniper 2 ай бұрын
Sir, you've promised your next video will be Node vs Bun vs Deno we are waiting for that legendary js compression.
@AntonPutra
@AntonPutra 2 ай бұрын
it's literally the next video, which i hope to release in a couple of days: "deno vs. node.js vs bun" 😊
@simonparis84
@simonparis84 2 ай бұрын
You should properly configure the connection backlog size in node. If you don't, the server is spending most of its time on requests that are already very very close to the timeout limit. And, it looks like your client latency chart doesnt count timed out requests which gives a very wrong picture.
@skuwamy
@skuwamy 2 ай бұрын
🤣🤣🤣🤣🤣
@yuu.relief
@yuu.relief 2 ай бұрын
Its so funny when i read notification "Anton Putra publish a new video". Your channel name sound like Southeast asia people. btw nice comparation, i never expect node.js vcu stuck at around 60%
@musashigarami
@musashigarami 2 ай бұрын
Not surprised at all, but very interesting to see! Would be good to have a Node Vs Bun Vs Deno 2.0
@Mr.BinarySniper
@Mr.BinarySniper 2 ай бұрын
he promised next video will be Node vs Bun vs Deno 2.0
@AntonPutra
@AntonPutra 2 ай бұрын
yes, it will be next in 2 or 3 days; i just decided to start with the slowest one 😊
@musashigarami
@musashigarami 2 ай бұрын
@@AntonPutra Awesome! This is great content
@Leonhart_93
@Leonhart_93 2 ай бұрын
Better results than I thought for NodeJS, especially considering the CPU usage was lower for a lower amount of requests.
@ThomazMartinez
@ThomazMartinez 2 ай бұрын
pls do Go vs Bun
@codedusting
@codedusting 2 ай бұрын
Can you create a tutorial on how to setup such system for comparison? So that we can do it ourselves for any 2 languages.
@AntonPutra
@AntonPutra 2 ай бұрын
yes will it in near future
@grandlagging0zero175
@grandlagging0zero175 2 ай бұрын
Thanks for this video! Maybe. you create a table with all test results(all test
@AntonPutra
@AntonPutra 2 ай бұрын
perhaps in the future, for now, i'll just keep improving the tests. eventually, when i standardize them, i will
@vikaspoddar001
@vikaspoddar001 2 ай бұрын
Anton brother, you are great
@AntonPutra
@AntonPutra 2 ай бұрын
haha, thanks!
@xNajdaa
@xNajdaa 2 ай бұрын
Would love to see a test of a language on the BEAM that is designed for optimal concurrancy like Elixir or the newer Gleam!
@errores-me6yu
@errores-me6yu 2 ай бұрын
дождался, спасибо!
@AntonPutra
@AntonPutra 2 ай бұрын
haha, more js to come 😊
@cesarmartinez2207
@cesarmartinez2207 2 ай бұрын
Hey bro, can you do an express-js(deno) vs express-js(bun) perfomance benchmark, the gain here is to see real life tests to confirm which js runtime is winning, if need help, would be glad to help and thanks again for this amazing work
@duongphuhiep
@duongphuhiep 2 ай бұрын
thanks for the hard work. Your videos are very helpful. It will be better if you keep your test scenarios and the infrastructure consistent so that the Go numbers won't changed between your differents videos, then we can "join" all of your videos together and make a table out of them to compare everything together. I mean that it is better to have a "fixed base" though out all of your videos. To simplify things, this "fixed base" would only focus on the max RPS, and the Latency (at 1K rps) for example. The number (max rps, latency) is fixed for Go/stdlib, Viewer should only focus on the results of the "challenger" (Java, Node, C#...) By the way, I'd like to request comparison for the most popular backends technos: Java Quarckus, C#, Node/Deno, PHP vs Go stdlib as the base. I bet that many people would like to see the fight between them :D
@AntonPutra
@AntonPutra Ай бұрын
i get your point, but with each new video, i try to improve something, and once in a while, i have to change the infra setup as well. at some point, i'll probably freeze infra changes and focus on the applications. also, thanks for the benchmark suggestions.
@boot-strapper
@boot-strapper 2 ай бұрын
Node sucks, but I highly recommend trying cluster mode. If you want peak js performance try bun with cluster/reuse port turned on. With that setup I found similar performance to golang in my testing
@badscrew4023
@badscrew4023 2 ай бұрын
you need more total CPUs though?
@boot-strapper
@boot-strapper 2 ай бұрын
@@badscrew4023 go already does this, utilizing cluster makes it apples to apples
@D9ID9I
@D9ID9I 2 ай бұрын
no it doesn't sucks.
@boot-strapper
@boot-strapper 2 ай бұрын
@@badscrew4023 nope
@WhiteRickRoss
@WhiteRickRoss 2 ай бұрын
Stop asking why not this framework... He uses the GO standard library and express which is kind of standard for nodejs. Go also has very performant frameworks, but here the situation is to test the standard libraries
@skuwamy
@skuwamy 2 ай бұрын
Saw it coming, javascript kiddies are delusional.
@тимур_атмосферный
@тимур_атмосферный 2 ай бұрын
Express is slow and was never a Node.js standard
@Александр-ф9в4ю
@Александр-ф9в4ю 2 ай бұрын
Node.js itself is a joke.
@skuwamy
@skuwamy 2 ай бұрын
@@тимур_атмосферный lol there is no standard in the JS world.
@eugenekalashnikov9331
@eugenekalashnikov9331 2 ай бұрын
How you can say that express is a standard?
@andresaguilar3055
@andresaguilar3055 2 ай бұрын
Thank you!. This is the benchmark Ive been waiting! I always wondered why js kept degrading so fast compared to go even in low stress situationts. It would be really cool to see the impact of the number of database connections allowed in the performance.
@shadowfaxenator
@shadowfaxenator 2 ай бұрын
You should use gomaxproc equal to the limit of k8s for your pod, otherwise go uses cores equal to the maximum number of cores of host machine, and k8s throttles them. It can lead to a huge performance penalty. The second thing you have to use scale nodejs pods to the number == of golang process cores.
@ooijaz6063
@ooijaz6063 2 ай бұрын
Then you will compare 4 nodejs applications vs 1 go application. I think better comparision would be to test performance on machine with only 1 core.
@Kavantix
@Kavantix 2 ай бұрын
Exactly this, node only uses 1 core + a little for runtime. And Gomaxproc would indeed more reflect a production, although in this case it doesnt really matter 😂
@lucaerrani3734
@lucaerrani3734 2 ай бұрын
I think (and pls correct me if I'm wrong) that the instances you're using (m7g.4xlarge) have 16vCPUs but since NodeJS is single threaded it cannot leverage more than one. This could be an explanation about why the RPS metrics maxed at 9k/s but the CPU was heavily underutilized (40%ish free)
@TheRanguna
@TheRanguna 2 ай бұрын
So he's only running a single instance per cpu? I thought k8s would scale the pod instances inside the same machine.
@lucaerrani3734
@lucaerrani3734 2 ай бұрын
@@TheRanguna No he's running a single nodejs instance per pod and one pod per language (one for nodejs/express, one for go) K8s automatically scales the number of pods if configured, but this test setup doesn't seem to have horizontal scaling enabled (which is correct since that would increase dramatically the changing variables in the test) Therefore since go is multithreaded, it is able to use all the vCPUs of the pod it's running on, while nodejs isn't (but that's just my opinion, I quickly skimmed the conf files in the repo and I didn't find anything that would seem to counter it)
@TheRanguna
@TheRanguna 2 ай бұрын
@@lucaerrani3734 took a look at the spec and it seems like each node process is getting 2 vCPU, meaning 1 vCPU is wasted for every node process. Yep, that could explain why node doesn't go further than around 60% cpu usage.
@uwontlikeit
@uwontlikeit Ай бұрын
💡more ideas for benchmark testing: NATS vs Kafka, Kafka vs Pulsar, NATS microservice communication vs Rest. Great videos, than you for doing it!
@AntonPutra
@AntonPutra Ай бұрын
thanks! noted! i'll do on some infra components in the near future
@commonfolk663
@commonfolk663 2 ай бұрын
But express is slowest nodejs we server, you would use fastify or even deno 2.0 for speed
@skuwamy
@skuwamy 2 ай бұрын
whatever js web framework you throw at go. you will never beat or come near as fast as go. LOL
@commonfolk663
@commonfolk663 2 ай бұрын
​@@skuwamyit doesn't matter, it just makes little sense to compare worst server implementation for nodejs. It's not why you would use nodejs for backend anyway, especially with apps as simple as ud do with golang
@xomiachuna
@xomiachuna 2 ай бұрын
​@@skuwamycan you elaborate on the simplicity of apps? From my understanding go is quite robust and in fact kubernetes is written in it (looks complicated enough for me). I don't have much experience with node or go backends, just curious what you mean by that
@skuwamy
@skuwamy 2 ай бұрын
@@xomiachuna what the hell you are talking about? 🤣🤣
@TweakMDS
@TweakMDS 2 ай бұрын
I'm loving these language-specific benchmarks, but I would also be super interested in queueing technology comparison. For example: pub/sub using mqtt (Mosquitto for example), Kafka, NATS and maybe some AWS native queueing. Would you be interested in this?
@AntonPutra
@AntonPutra 2 ай бұрын
yes, actually it was my initial idea to test open source databases, messaging systems, etc., but then i got sucked in by the requests for testing different frameworks 😊 i'll get there, i promise
@user-abc855
@user-abc855 2 ай бұрын
Thank you for the video! Express.js is veeeery slow, what about usage of Fastify with fastify-uws instead?
@Payamafshari-r7k
@Payamafshari-r7k 2 ай бұрын
do .NET 8 or 9 with optimization with golang stdlib
@nixoncode
@nixoncode 2 ай бұрын
.net8 as it's lts
@gahshunker
@gahshunker 2 ай бұрын
Yeah, do the .NET aot compilation, to be on par with golang
@alehkhantsevich113
@alehkhantsevich113 2 ай бұрын
@@nixoncode LTS doesn't mean anything. I am working in Enterprise and our project will be migrated to .NET 9 in November. So, I would like to see .NET 9 RC NativeAOT vs Go
@nixoncode
@nixoncode 2 ай бұрын
@@alehkhantsevich113 perhaps you're not in control, jumping on to 9 right now just seems stupid as you're not even compensated for it
@0xd3c0d3d
@0xd3c0d3d 2 ай бұрын
@@nixoncode It has already been announced that NET 9 has huge performance gains compared to the previous version. And this is actually happening, there is a lot of work on internal APIs, especially in Linq.
@steveoc64
@steveoc64 2 ай бұрын
Would be interesting to see a comparison of the same load running on AWS vs Azure vs GCP vs Some Generic VPS Do you get what you pay for with the big hosting companies?
@lastink444
@lastink444 2 ай бұрын
Would be nice to see some alternatives to express that have better performance. Fastify maybe
@ValerioBarbera
@ValerioBarbera 28 күн бұрын
Fantastic!
@AntonPutra
@AntonPutra 27 күн бұрын
thank you!
@GolderiQ
@GolderiQ 2 ай бұрын
Redo the same with Deno, Bun, Node.js, Go, and Rust please! Please!
@stickyblicky11
@stickyblicky11 2 ай бұрын
Theres a video on this
@GolderiQ
@GolderiQ 2 ай бұрын
@@stickyblicky11 I was so happy reading your comment, then I search the name of the channel plus Bun, Deno, Elysia, and Hono and nothing pop up
@MrEW1985
@MrEW1985 2 ай бұрын
As expected nodejs is slaughtered
@ADP4031
@ADP4031 2 ай бұрын
Yeah, NodeJS was not made to be fast though, results were previsible and fair
@steinarst9084
@steinarst9084 2 ай бұрын
@@ADP4031 a language created over a weekend competing with a massive collaborative superpowered hivemind competing with eachother. of course javascript always lose. but using express for benchmark is just downright cruel.
@ireydiak
@ireydiak 2 ай бұрын
@@steinarst9084 Just like using the std in Go for the server which is not exactly optimized for this kind of test. Using something like Echo would be more relevant. Also doing something a little bit realistic and involved than a simple post request that generates a uuid.
@Nurgul626
@Nurgul626 2 ай бұрын
Hey, great video! (previous comment was deleted, trying one more time without any links) At a glance, numbers don't add up for node. Yes, node is slower, but not so much, so I checked source code for your tests: 0. Express is really not the fastest guy in town, you can try using fastify for example, or a built-in HTTP module to remove unnecessary overhead 1. I might be wrong, but it looks like go example uses prepared statements for inserts, while node is running the full SQL insert for each request 2. You are using async functions for express, while express doesn't support async middleware (I don't think it affects performance too much, but can be the case for availability) 3. You are giving 1 CPU core to nodejs in kubernetes configuration. Can't tell for Go, but Node uses concurrent Garbage Collection, and giving node process 1 CPU really hits GC times and as a result, the performance 4. Also noticed that in Node example you are modifying payload directly on the request object and pass it into functions, which can give you memory leaks (you don't seem to get one, but it definitely can hurt the performance)
@AntonPutra
@AntonPutra 2 ай бұрын
thank you for your feedback! 0. yes, i decided to start covering javascript frameworks/runtimes with the slowest one 1. yes, go automatically prepares and caches sql statements 2. well, i followed the express "best practices guide" where it says to use async functions 3. i gave it 2 vCPU - github.com/antonputra/tutorials/blob/main/lessons/210/deploy/node-app/2-deployment.yaml#L52 4. noted
@Nurgul626
@Nurgul626 2 ай бұрын
@@AntonPutra 1. Just I thought :), postgres client that you use doesn't make prepared statement by default (you need to handle it yourself), so in this test Go does less job than node.js 2. Ahh, I see, you use express 5. Case dismissed :). Note: the vast majority of projects still use express 4 with no async/promise support. (version 5 got released 16 days ago, after 10 years of development, so the adoption of version 5 is minuscule)
@SilasDuarte-e9k
@SilasDuarte-e9k 2 ай бұрын
FastAPI, Elysia, Hono vs Go! There are a lot of frameworks that claim to be fast as Go
@e2e23e
@e2e23e 2 ай бұрын
IMO, if you are using the Go standard library, you also need to use node builtin HTTP server
@ha5anmukhlis
@ha5anmukhlis 2 ай бұрын
you should use a faster nodejs web framework like hyper-express. express is notoriously slow!
@everyhandletaken
@everyhandletaken 2 ай бұрын
That's true, but it is a fun real world test, as Express is extremely popular out there too.
@sama7496
@sama7496 2 ай бұрын
@@everyhandletaken this is the first time i am hearing about hyper-express
@skuwamy
@skuwamy 2 ай бұрын
@@sama7496 there's a lot of web framework in js hahahaha.
@everyhandletaken
@everyhandletaken 2 ай бұрын
@@sama7496 I haven't heard of Hyper-Express either, just regular old Express, which despite the name, isn't winning any performance awards 😂
@Gruak7
@Gruak7 2 ай бұрын
You should try a more modern js web framework such as Hono.
@AntonPutra
@AntonPutra 2 ай бұрын
i decided to start covering javascript frameworks/runtimes with the slowest one, next, deno vs. node.js vs bun
@AlexanderBorshak
@AlexanderBorshak 2 ай бұрын
The Node was created to resolve the 10K requests problem. So, it resolves exact this problem )))
@AntonPutra
@AntonPutra 2 ай бұрын
haha
@j.r.r.tolkien8724
@j.r.r.tolkien8724 2 ай бұрын
What a great way to start a "fair" comparison. Literally the slowest node.js framework vs Go's std. Why not use framworks from both?
@tunexpectedv0id
@tunexpectedv0id 2 ай бұрын
The nodejs number suggest you have to rethink your nodejs deployment, at minute 3:02 I think the 56.7% is the total cpu usage in the cluster but I think you need more nodejs instances per node. It is possible to get nodejs reaching 100% cpu (even more than 100% if you account for OS threads doing the IO work, 1.4 cpu cores per nodejs instance is a decent assumption), Go by default will use all the resources much more efficiently without hiccups, nodejs is a bit more tricky to get right.
@vitor14
@vitor14 2 ай бұрын
I think the biggest problem is that you are not using clustering, which is something that comes by default in go, it is a little unfair to compare them without worker threads to take better advantage of the available cpu, obviously you are not going to take all the advantages of clustering with 1 or less cpu but in this case I think it would improve seeing that the cpu only reaches 50%.
@fortuneosho8137
@fortuneosho8137 2 ай бұрын
Spotted a nodejs apologist 😂
@_Verac
@_Verac 2 ай бұрын
​An apologist? Nodejs is not a religion that making an argument for it would make one an apologist especially when the argument is purely logical.@@fortuneosho8137
@elvispalace
@elvispalace 2 ай бұрын
This video basically explain why performance issues is more related with skills issues
@bjbegui
@bjbegui 2 ай бұрын
@AntonPutra you have an amazing youtube channel
@Shenepoy
@Shenepoy 2 ай бұрын
how much does it cost to run those tests, I would assume not less than 200$ for the entire test
@skuwamy
@skuwamy 2 ай бұрын
Goodluck! Javascript kiddies are coming....
@ADP4031
@ADP4031 2 ай бұрын
As a javascript dev, I don't disagree with the results. Even the CPU usage doesn't mean Javascript uses less CPU, it means it didn't managed to use it to its full potential.
@powerofpavan7710
@powerofpavan7710 2 ай бұрын
​yes
@TheRanguna
@TheRanguna 2 ай бұрын
Go is naturally optimised to scale itself in the same machine. Whilst node is made to be single threaded by nature. Does this setup scale the node instances in the same machine or do we have a single node instance on a 16 vCPU machine? What do you mean "increasing the number of replicas"? Clearly node is not filling the whole cpu.
@TheRanguna
@TheRanguna 2 ай бұрын
My comment got deleted because I pasted a link. Seems like the deployment spec for the node app is assigning 2vCPU to each node process, meaning 1 vCPU is wasted. Which could explain why the CPU usage doesn't go above 60% Meaning that in its current state, this is equivalent to comparing two CPUs, one with a multicore stress test and another one with a single core stress test and concluding that the CPU that was tested with multi core test performs better than the one tested with the single core test. In other words, this test proves that node was indeed made to be single threaded, and if you want more performance on parallel tasks, you can just spin up new instances. Unless I'm reading the deployment manifest wrong.
@dweblinveltz5035
@dweblinveltz5035 Ай бұрын
@@TheRanguna I believe you are correct; without even seeing the CPU allotments, he did not show any Node.js code that sets up Cluster mode, so... and he mentioned multiple replicas in a cluster, but I don't believe he's scaled them up to match the number of threads Go may be using internally.
@TheRanguna
@TheRanguna Ай бұрын
@@dweblinveltz5035 A new video was released with this and other adjustments as well
@dweblinveltz5035
@dweblinveltz5035 Ай бұрын
@@TheRanguna I watched, very good followup. Making this mistake actually provides great insight for his viewers that may not have been highlighted so well otherwise.
@laskyb4275
@laskyb4275 2 ай бұрын
What do you use for metrics? Prometheus/ grafana? How do you prevent this 2 services from using too much performance of your k8s..i noticed that monitoring sometimes require more performance than my app itself if it's small
@sanchitwadehra
@sanchitwadehra 2 ай бұрын
Dhanyavad
@AntonPutra
@AntonPutra 2 ай бұрын
my pleasure!
@adcodes
@adcodes 2 ай бұрын
Can you do something like 10 separate containers running 10 most popular JS libraries working simultaneously vs only 1 running Go?
@skuwamy
@skuwamy 2 ай бұрын
what the?🤣🤣🤣
@adcodes
@adcodes Ай бұрын
@@skuwamy 😅🤪
@arytiwa4351
@arytiwa4351 2 ай бұрын
please do it with bunjs and deno 2.0
@ijazkhan3335
@ijazkhan3335 Ай бұрын
It was a pretty obvious result. Go is vastly superior in every kind of benchmark that relates to server side. But you did not run NodeJS the way it should be in production.
@AntonPutra
@AntonPutra Ай бұрын
well, just released an updated video and fixed some mistakes
@easy-draw
@easy-draw 2 ай бұрын
Not sure using express in Node vs Go is comparable at all. You could go even slower if using Node with NestJs. 😀
@Error_00101
@Error_00101 2 ай бұрын
Answer to your Question as to why node is stuck at 60% usage: Node itself (by default) runns applicatins only on 1 cpu core. -> first 50% the other 10% is the kernel and the node environment doing things.
@pierromojito
@pierromojito 2 ай бұрын
Do a Go vs Bun (JS) benchmark pls
@AntonPutra
@AntonPutra 2 ай бұрын
yes, after deno vs. node.js vs bun
@stevanmoeladi1058
@stevanmoeladi1058 2 ай бұрын
Can we see Deno 2 vs Golang?
@arrow_function
@arrow_function 2 ай бұрын
Do please node vs deno vs bun test. It will be so interesting to see
@zakimimit
@zakimimit 2 ай бұрын
Can we see: -Django DRF vs Django ninja -Django with celery Vs nodjs or Go This will be fair comparison Thank you for the content
@pawegraczyk6050
@pawegraczyk6050 2 ай бұрын
You are giving 2 virtual cores to nodejs that uses only one, due to the way node stack works. The test should be about how stacks compare in speed when accessing underlying resources fully.
@AntonPutra
@AntonPutra Ай бұрын
yes, just released an updated video with improvements
@ehfoss
@ehfoss 2 ай бұрын
Could you do Python FastAPI v Node.js?
@hex6651
@hex6651 2 ай бұрын
Hi! Will you sometime make C++ comparison to GO for example? Seastar framework looking so promising for your benchs
@SamerLOLOfficial
@SamerLOLOfficial 2 ай бұрын
I was waiting for this a long time a ago, can you please compare different nodejs frameworks, like expressjs and nest js, and bun and deno and GO? since Last time you compared go with node js you didn't add measures for # of requests. Also why the numbers you have is different from what published on internet?
@AntonPutra
@AntonPutra 2 ай бұрын
next i'll do deno vs. node.js vs bun. when it comes to numbers, i use what i have in my repo for tests. if you think i misconfigured something, please let me know source code - github.com/antonputra/tutorials/tree/main/lessons/210/node-app
@ulrich-tonmoy
@ulrich-tonmoy 2 ай бұрын
Python vs Node would be a great comparison both are interpreted And Node vs Deno vs Bun would be a great one too
@firefox_tn1815
@firefox_tn1815 2 ай бұрын
Why not fastify
@upcomingweeb136
@upcomingweeb136 2 ай бұрын
Won't still perform as good as Go
@тимур_атмосферный
@тимур_атмосферный 2 ай бұрын
​@@upcomingweeb136That's not the answer
@baxiry.
@baxiry. 2 ай бұрын
no-optimazed vs no-optimazed. this is fair
@Balaji-ed3ms
@Balaji-ed3ms 2 ай бұрын
Deno 2 vs Golang?
@gabrielmartinez2455
@gabrielmartinez2455 2 ай бұрын
I want to see C++ vs Go, also C++ vs rust 🎉
@AntonPutra
@AntonPutra 2 ай бұрын
ok 😊
@ParthaSarathylink
@ParthaSarathylink 2 ай бұрын
Hopefully AWS gives you discount for your services
@rankala
@rankala 2 ай бұрын
Elixir or gleam API would be very interesting.
@AntonPutra
@AntonPutra Ай бұрын
noted
@MrChiefTabaka
@MrChiefTabaka 20 күн бұрын
I’m curious what software are you using to visualize those values; I mean those charts, is this some kind of dashboard?
@AntonPutra
@AntonPutra 18 күн бұрын
Sure, i'm using open source prometheus to collect metrics and grafana to visualize them
@lraondua
@lraondua 2 ай бұрын
fastify vs express would be cool
@AntonPutra
@AntonPutra 2 ай бұрын
ok noted!
@farSleeper
@farSleeper 2 ай бұрын
Название NodeJS VS что-то. Открываешь код - express. Классика прямо :)
@Александр-ф9в4ю
@Александр-ф9в4ю 2 ай бұрын
Адепта ноды порвало. Сейчас автор пойдет разбираться в миллиарде нодовых Фреймворков, которые будут лагать все как один даже на фоне го 😢
@antnzr656
@antnzr656 2 ай бұрын
@@Александр-ф9в4ю та смысл в том что бы если ты берёшь стандартрую либо в го для сравнения, то и для ноды бери так же.
@Nurgul626
@Nurgul626 2 ай бұрын
​@@Александр-ф9в4ю кто бы мог подумать, что чтобы сравнить производительность правильно, нужно разобраться в том что тестируешь
@dromix_ai
@dromix_ai 2 ай бұрын
I noticed in one of your videos that go is able to handle ~20k RPS, here is ~75k RPS. What is the difference between tests? EC2 instances?
@0xd3c0d3d
@0xd3c0d3d 2 ай бұрын
I want to see tests with C# with NativeAOT, it would be something new on yt
@temperkan3727
@temperkan3727 2 ай бұрын
Go: “ I don't make mistakes. I'm not just like the rest of you. I'm stronger. I'm smarter. I'm better. I AM BETTER.”
@AntonPutra
@AntonPutra 2 ай бұрын
😊
@bopon4090
@bopon4090 2 ай бұрын
Whats the conclusion?? Why is go memory usage going up?
@AntonPutra
@AntonPutra 2 ай бұрын
the standard library does not have rate limiting middleware, and it caches all the requests. eventually, they pile up and exceed the memory limit
@timelimitexceeded0
@timelimitexceeded0 2 ай бұрын
we need comparison between go standard library and bun runtime without any framework
@chiebidoluchinaemerem5860
@chiebidoluchinaemerem5860 2 ай бұрын
Please which tool do you use for the benchmarks
@thegrumpydeveloper
@thegrumpydeveloper 2 ай бұрын
Graviton arm vs x86, also what’s the graphing tool? Also laravel vs node fastify vs go
@gameloop9861
@gameloop9861 2 ай бұрын
Dude, node is called node for a reason. It's single threaded and must be deployed in multiple instances in production with load balancing.
@AntonPutra
@AntonPutra 2 ай бұрын
Yes, I'm debating whether to run 2 replicas with a 1 vCPU limit or 1 replica with 2 vCPUs but limit the Golang concurrency to 1 by setting GOMAXPROCS=1 to make it a 'fair' test. I use an m7a.xlarge instance for each app.
@ottohavasvolgyi2448
@ottohavasvolgyi2448 Ай бұрын
I wonder why node's data access slowed down so much, while go's didnt at that load
@ob34915
@ob34915 2 ай бұрын
Node is single threaded after 9000 req per second the thread will start slowing down its expected
@AntonPutra
@AntonPutra Ай бұрын
yes, just released an updated video with improvements
@mdjpurdon
@mdjpurdon Ай бұрын
I was looking for the container you used to run the test client, `aputra/load-tester` but I don't see it on docker hub or in your github repo. Any chance we could have a look at that?
@AntonPutra
@AntonPutra Ай бұрын
sure, i need to refactor it before i can show it to the world 😊
@JesseLZamora
@JesseLZamora 2 ай бұрын
Can you do Swift vs. C#?
@robertodev2002
@robertodev2002 2 ай бұрын
Node is not made to grow vertically scalability, but to grow horizontally scalability, at some point if you give it more cpu or ram, Node will not know how to take advantage of it.
@ggcc3261
@ggcc3261 2 ай бұрын
Have you done C++ vs Go benchmarking yet? That would be fun to see
@Александр-ф9в4ю
@Александр-ф9в4ю 2 ай бұрын
Have you tried to write backend in C++ yet? That would be fun to see
@ggcc3261
@ggcc3261 2 ай бұрын
@@Александр-ф9в4ю yeah, I've recently used Drogon. Haven't you written a backend in C++? 😆
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 137 МЛН
За кого болели?😂
00:18
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН
Молодой боец приземлил легенду!
01:02
МИНУС БАЛЛ
Рет қаралды 2,1 МЛН
Node.js vs Golang COMPARISON
6:56
Jelvix | TECH IN 5 MINUTES
Рет қаралды 10 М.
Go IS Slower Than PHP | Prime Reacts
5:22
ThePrimeTime
Рет қаралды 85 М.
Actix Web vs. Axum: Is One a Clear Winner?
8:59
OptiCode
Рет қаралды 1,7 М.
Nginx vs Apache Performance
14:57
Anton Putra
Рет қаралды 38 М.
Java vs Go. Что выбрать?
14:17
Sergey Nemchinskiy
Рет қаралды 59 М.
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 225 М.
.NET and C# are in trouble. Here is what I'd do.
10:57
Ed Andersen
Рет қаралды 105 М.
Go vs Rust vs Bun vs Node | Prime Reacts
18:07
ThePrimeTime
Рет қаралды 175 М.
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 137 МЛН