If there is a database, it will almost always be the bottleneck. Caching, indexing, etc helps. Not the porpouse of this video, but running multi nodejs instances with pm2 or k8s is a good way to scale also. I'm a software engineer for a bank. We have a lot of unique and concurrent users (I'm not allowed to say the exact number but it is way above the tests of this video) and the main service is powered by node. It is handling well at most cases, with the things I mentioned previously. It is not the most performant language/VM but is good enough.
currently, nodejs if you configure it well, or use clusters or maybe aws to have extra instances or charge balances it will do the work pretty pretty well Remember that nodeus is a single thread but with workers we can do much more than a single thread =P
nodejs is not single threaded. Hate it when people make such vids pretending they know it fully. JS is single threaded. Nodejs is not a language, it is a runtime. it makes use of threads too.
Yes totally agreed. The tool being shown at the beginning is for browser runtimes and not Node.js runtime. The benchmarking is fine but the fundamental understanding of Node is not quite right.
Well kiddo... It's like saying Pi is NOT 22/7, "iTS irrAtionAl nUMBERRR" We know GC requires multiple threads... That doesn't change the fact JS has horrible performance
As per my knowledge, when a blocking request is written asynchronously, that request is assigned to the thread pool (place where all threads present), this is where multi threaded capability is achieved by assigning the asynchronous requests to the threads available in the thread pool.. if there's any mistake or my way of understanding is wrong, please correct me.
When you ran benchmark on your server and local machine you were actually utilising only 1 core of the CPU. Would be much better if you scale node at least with pm2 on local machine and VPS as well, then results would be slightly better.
If there is a database, it will almost always be the bottleneck.
Caching, indexing, etc helps.
Not the porpouse of this video, but running multi nodejs instances with pm2 or k8s is a good way to scale also.
I'm a software engineer for a bank. We have a lot of unique and concurrent users (I'm not allowed to say the exact number but it is way above the tests of this video) and the main service is powered by node. It is handling well at most cases, with the things I mentioned previously.
It is not the most performant language/VM but is good enough.
You use Typescript?
currently, nodejs if you configure it well, or use clusters or maybe aws to have extra instances or charge balances it will do the work pretty pretty well
Remember that nodeus is a single thread but with workers we can do much more than a single thread =P
nodejs is not single threaded. Hate it when people make such vids pretending they know it fully. JS is single threaded. Nodejs is not a language, it is a runtime. it makes use of threads too.
Yes totally agreed. The tool being shown at the beginning is for browser runtimes and not Node.js runtime.
The benchmarking is fine but the fundamental understanding of Node is not quite right.
Well kiddo... It's like saying Pi is NOT 22/7, "iTS irrAtionAl nUMBERRR"
We know GC requires multiple threads... That doesn't change the fact JS has horrible performance
As per my knowledge, when a blocking request is written asynchronously, that request is assigned to the thread pool (place where all threads present), this is where multi threaded capability is achieved by assigning the asynchronous requests to the threads available in the thread pool..
if there's any mistake or my way of understanding is wrong, please correct me.
@@kabali_da129in node js async functions are not multi threaded, if you want to execute a function concurrently you need to use a worker.
One of the most underrated TH-cam channel .
Great job! 👍 Please make a NodeJS scaling tutorial.
Loved the content man, thank you very much!
Bro you just rock. This video worth watching really 🔥🔥🔥
I'll rewatch this;
Thanks brother
Learned a lot. Thanks!
Hi, if we use nodejs cluster, can it do better?
have you tried nodejs cluster combine with worker-thread to load heavy concurrent requests ?
That was quite interesting and very insightful. Thank you !
Seriously underrated channel. But don't worry you are going to get 100k+ in nearby future.
When you ran benchmark on your server and local machine you were actually utilising only 1 core of the CPU. Would be much better if you scale node at least with pm2 on local machine and VPS as well, then results would be slightly better.
Good catch. How were u able to notice that?
@@david-tracy by default node is running on only 1 core, so to scale node you need to create an instance per core
you can also use cluster to have multiple express apps running on a different core
@@soniablanche5672 pm2 is far better and easier
pm2 + worker threads
How to scale node js app
Thanks for the video. Could you please suggest which programming language/framework would be the best for handling heavy tasks on the backend side?
Good information, Thank you.
what about clustering to make use of multiple cores
Much better to do this on the system layer. Aka: Typical are 1 core docker containers. Then auto scale the nodes with kubernetes.
@@dinoscheidt just run pm2
Awesome
Thank you So much 👍🏼🙏🎉❤️
which version of node have you used in this video??
Awesome video ++++++++++ 🙂
amazing
bruv thanks so much
Shouldn't you run benchmark on your server(Sever api endpoint) from your local machine instead of logging in to ssh?
it will probably cost him a lot if he pays by request for the VPS lol
How are you printing the response status and latency in terminal....please reply
Could you please make 2 playlists for:
1) nodejs tutorials
2) react/nextjs tutorials ?
Amazing content. thank you
Would be good if you use multiple threads.
hail golang :3
😍😍
Fastify would have actually performed better instead of express.
Its about 3x faster than express so it would have been a better fit for this video.
thanks
well, most of the time it's the database that causes errors or timeouts.
O(n!) not O(log n) Fibonacci
I don't know why, but somehow I could not understand anything in this. PS I have 7 YOE.
big noodles small bowl
@@vedagyasharma5438lol
I think jmeter is better