Here's Why Node JS is NOT Single Threaded

preview_player
Показать описание


Timestamps
0:00 Teaser
0:11 Video Starts
0:44 Operating System Fundamentals
1:45 LibUV
2:42 Bcrypt function
8:07 Conclusion
8:31 Outro

👉 Checkout codedamn on social:

If you found the video valuable, please leave a like and subscribe ❤️ It helps the channel grow and helps me pumping out more such content.

👋 About Me:
Hey! I'm Mehul Mohan, a CSE'21 graduate from BITS Pilani, Goa. I started coding early in life, at the age of 13 when I created my first blog on Blogger. I am listed in Google, Microsoft, Sony, eSet, etc. Hall of Fame for reporting vulnerabilities in their systems.

🍎 I am Apple's WWDC'19 Scholar - visited San Francisco and attended WWDC.

🚀 Currently working on my own startup - codedamn.

Connect with me:

🏷 Video Tags:
Node JS is NOT Single Threaded | Here's Why
nodejs
node tutorial
node js tutorial
nodejs tutorial
learn nodejs
node js
what is nodejs
node js tutorial for beginners
node js crash course

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

The breadth of topics you cover is jaw-dropping. Always look forward to your videos.

devorein
Автор

This is really perfect and detailed version of background processing while using node js.
Saw it once, now it's printed in my brain 🔥.
Thank you so much for this video and looking forward a great learning curve with you.

mayursonawale
Автор

The explanation you give for everything including NodeJS Multi Thread, CORS, Networking Basics etc is Amazing. Due to your videos I can understand these concepts clearly. Keep making such wonderful videos for us.

indurkar
Автор

This is too good! I have recently been watching your videos. Thanks and respect to your hard work.

enlightened
Автор

if the Libuv thread pool gets hold of all the cores in our system, how does a separate nodejs process like cluster or pm2 instance run a different process with its own libuv thread pool and main thread ??

eswarprasad
Автор

I watched this video till end. Great content.

rasikaraja
Автор

This is exactly what I was thinking... Thank you so much

madannikalje
Автор

Wouldnt be better initialize more node workers with less libuv threads to better utilization of processor for parallel requests processing priority?

vladimirhodan
Автор

Your explanation is pretty much clear for me. Thanks alot :)
Can I get some animated stuff of these process?
Would really help me and others like me alot. :D

jayjani
Автор

Great explanation.

Does this only happen for something like a C++ binary? Can I make use of multithreading when writing normal javascript code in node js, I believe when we use promises it just uses the event loop which is concurrent but not parallel so it is still utilizing only a single core of our cpu.

arpanghoshal
Автор

You are expert in Javascript. Thanks Engineer. Regards.

daimoncardenas
Автор

Thank you so much this must be relevant with all Web server : instances configurations.

VishnuVijai_
Автор

This concept seems more like what nodejs provides as worker threads for a compute heavy system. Is the concept same for IO intensive tasks as well? My question is which part exactly is responsible in os watching for a db query to be fulfilled?

gourabmukherjee
Автор

for example 500 request comes....and each has to perform 10 task and some task's code may be synchronous and some task's code is node js is single threaded it will put of all the request in a queue..it takes out 1 request and that request is to run 10 task of which say 4 task'code are asynchronous so that 4 task command will go to thread pool right?....remaining 6 task is performed and result is when the 4 lines asynchronous task result is generated the all 10 task result is clubed and response is send ...then for request 2 same thing why we say node js can handle multiple request at a is it like when request1 6 sync task is other 6 task of request 2 starts to get executed even though request 1 4 async task has not completed so node js is making the request run concurrently and not parallely this shows the single threading nature....if for suppose node js might have been multi threading that we could have access multiple request i getting it correct?

rankersfundae
Автор

Awesome !!
Thanks a lot !
" I watched this video till the end "

subhankardas
Автор

who will be placing the requests in thread pool to cores? Thread Pool or Scheduler?
Because in the diagram you made, it shows that thread pool is putting it on cores.

Atif
Автор

Thanks for the great video.

Did you actually dive deep into libuv's source code? Would be very interesting to see some videos where one points out how things really take place under the hood.

andreigatej
Автор

We have now async in python as well. FastAPI works somewhat similar to the Node js.

firdousProgrammer
Автор

As 1 request take 1 second for process + 1 second for callback = total 2 second. What about 500 request, for this example as we have 4 thread OS. What is total time to complete the execution for 500 request?

Could you please assist for this?

Thank you.

bhavinpatel
Автор

I watched this video till end.
Came to know about libUV👌👌

arvindshelke