How NodeJS Works? - You don't Know NodeJS
HTML-код
- Опубликовано: 28 май 2024
- Hey Everyone, In this video, we will understand How NodeJS internally works? We'll deep dive into the concepts of Event Loop, Worker Threads, and Single Threaded Architecture of NodeJS.
Quick Links
Full Stack Twitter Clone learn.piyushgarg.dev/learn/tw...
Docker Course learn.piyushgarg.dev/learn/do...
Master NextJS 14 learn.piyushgarg.dev/learn/ne...
NodeJS Event Loop nodejs.org/en/guides/event-lo...
Timestamps
00:00 Introduction
01:25 NodeJS Architecture
04:00 How NodeJS Code Executes?
08:05 Thread Pool
11:05 Event Loop in NodeJS
15:00 Understand Event Loop with Code
29:55 Worker Threads in NodeJS
34:33 Increasing Worker Threads
37:08 NodeJS vs Other Programming Languages
41:15 Promise Handling in NodeJS
42:32 Outro
Video Titles
- How NodeJS work?
- Internal Architecture of NodeJS
- what is Event Loop?
- How NodeJS Handles Requests
- NodeJS Single Threaded Architecture
- Multi-threading with NodeJS
Hashtags
#nodejs #javascript #backendwebdevelopment #fullstackwebdevelopment #webdevelopment #engineering #webdevelopment #opensource #reactjs
The worker pool size in Node.js was changed from 128 to 1024 in version 10.5.0. Prior to this version, the default worker pool size was 128. From version 10.5.0 onwards, you can increase the worker pool size up to 1024 by setting the UV_THREADPOOL_SIZE environment variable
what is the significance of increasing it to 1024? It would not help you execute things faster. The ideal value for the thread pool size should be equal to your number of physical cores or if your system system provides hyperthreading then a little more than that too works. @piyushgargdev am I right?
@@unemployed-coder agree, virtually it do make sense but physical core is what matter the most.
Shabash but video mein to 4 threads hi dikhaya h default
@@manishbhardwaj4587video mein 4 kyu dikhaya h default agr default 128 h?
@@xiaoshen194 Default 4 hi hai bhai... Maximum pehle 128 tha and then increased to 1024
Ye koi nhi samjhaya h avi tk , i have searched a lot , thanks buddy for this wonderful explanation 😅
"08:05"- Thread Pool
"12:27"- IO polling
"21:30" - undefinite behaviour of setTimeout and setInterval in main thread
This is the best explanation by far. You explained it so well. I would like to learn more nodejs concepts that no one is talking here.
this is like the most in-depth video on Eventloop and working of Node.js I found, Need a course like this.
One of the finest and in-depth explaination. Thanks Piyush❣
Very well explained really. Have seen lot of other event loop video but this is special. Please continue creating this types of videos.
Best node architecture video i have seen so far, keep up the good work 💯
Thank you, I was looking for Nodejs Internal Working explanation for the last one year, This one is more Helpful kudos
Best Explination and the simplest one so Far Thanks Bhaiya
Awesome explanation of Node JS Architecture, especially Event Loop which had very confusing for me before watching this detail video.
Thank you so much for such awesome video
I really liked the way you explained, thanks for the easy explanation. I have never been understood better before watching this video. 👏
Awesome explanation of Node JS Architecture, especially EventLoop which had very confusing for me before watching this detail video.
Thank you so much for such awesome video.❤❤
Awesome video man!. I was very confused about differentiating the timers and io execution timings.
Thanks piyush🎉. Best video for this topic, no one explained like this in RUclips and I saw many video to clear this concept. Watch ing this video I got the concept, need to watch more this video to clear more
Very nice explanation sir, Thank you!
Thank you Piyush for this amazing video. I learned a lot from this video like EventLoop and under the hood working of Node.js.
Thank you for creating such an insightful and engaging video, I truly appreciated the valuable content and your skillful presentation. want more related videos, Thankyou!!
Nice explanation 😃....Easy explanation for beginners.
Content is pure gold straight from heaven mann I am craving for more wisdom from this guy thanks piyush bhaiya
Such a detail video . Quite interesting and helps understanding deep concept of Node.js
This video was very helpful, thank you for the wonderful explanation of node.js architecture 😊
i see the full video as well as coded with you . and thnx for this beautiful video . good work
Awesome explanation. Keep making more of these in depth videos. 😍
Very indepth concept clearing video..... Thanks Sir...💌
outstanding way of explanation bhaiya
Excellent explanation man
Hats off
Please create such videos, in nodejs only
More insight about node js
Amazing sir, i would like to see more of these kind videos from you. Thank you for your content
Nice one bro, good to see you grow❤
Gem 💎content, bhaiya. Keep it up 👍Thank you!
Yes, aur videos chahiye, and what session bhaiya, bhaiya poora din barbaad krdiya faltu me ab neend achhi aayegi yh video dekhne ke baad.❤❤
Informative as usual❤
Plz make more video like this .
Thanks from my bottom of heart❤
i think threadpool doesn't handle cpu intensive tasks,it only handles some cpu intensive tasks.for example:while loop with very long iteration is considered as cpu intensive task but it is not handled by the thread pool.
How can I thank you for being upload such a great video 😍
@piyushgargdev : How will the thread pool handle dynamic cryptographic requests? For example, if 1000 users requests password encryption at same time, how can the Node server manage these requests, given that we can't predict their origin?
i need this types of videos. please sir... to be continue............
Great Video. Enjoyed it a lot.
"great explanation of how the Node.js event loop works", WD 👌🏽
Very Nice Video man, keep doing like this .
great video, nicely explained
very well explained thank you
❤ Thankyou for explaning
Ultimate😮 video, we want more videos like this.....
Hands down the best video!
Amazing
Thankyou soo much for amazing content
amazing explanation , learned alot 👍
Sir your NodeJS playlist >>> All paid + free courses 🗿
which theme is he using do you know ?
What an OP explanation!! ❤❤❤
Nice explanation! ❤
perfect explanation sir 💯💯
Nicely explained ❤❤
Best explaination ever!
Hello Piyush Sir , I am being following your nodejs series , and currently i am on authentication. Sir my question is .. what is the best way to revise the concepts in nodejs or any other backend technologies .. so that my i can master the concepts properly ...
BTW your nodejs series is awesome💫
excellent explanation 👌 👏 👍
Much needed video, but just a suggestion, Please keep theme costant to dark everywhere, it will look more aesthetic and there will not a flashes in our eyes. Thanks 😂😂
very nice. nice drawing, nice explanation.
Very well explained👍
very imformatiive video. loved it
Awesome explanation 💚💚
This is amazing....Thank you....
Thanks a lot for the video
nice video
Nice explanation ❤❤
Nice And Detailed Explanation. Quite Impressed.😍 Can you please also share those Notes.👍👍👍 Thanks👍👍👍
Next level explaination
Please make on video on how await works in this internally
Never seen like that explanation .... Thank you so much Piyush Vai 💌. Create courses (Paid) regarding System Design /DSA / Devops/Microservice . All the best.
Very informative 💪🏻
THank you so much I enjooyed and understand
reallly like to watch the explation of js working please make a video on that
put more videos like this. it'll help you build core audience.
42:45
Yes cha hi hai aise video
Very knowledgeable video🎉🎉🎉
Thank you sir!
hey piyush one doubt as you said ki, for cpu intensive tasks we should go for multithreaded languages, but that too can be done using NODEjs right?
Great video best ever explain
@0.3s why I am getting the output same in both the cases? console of the setTimeout functin is getting printed first and later console of setImmidiate is printed, and this is same for both the cases.
Need more video like such
Genius brother 🎉
Hello Piyushbro,
Please make video on transaction in mongoose…
Your teaching method is very helpful..
Bro really greattt❤❤
Great video 😇
informative video!
Absolute stunner
Hi Piyush,
Nice video with explain.
I have one question kindly if possible please make video on it.
Consider one use case where I have Nodejs application with /abc endpoint inside this endpoint I have one function which is 1M of for loop which take time to complete 3 sec then give response to the endpoint. So 5 users can parallel make requests to this endpoint so what is time for 5th user will take ?
Is it 3 sec or 15secs and why ??
THANKS
I love it make more videos on docker
very interesting video.
great! Thanks
sir please one video on all the vs code extensions you use please
PHP is not multithreaded. PHP-FPM can handle multiple incoming requests at once by launching multiple processes. I like your node js explaination
bro some are some thing diff bro great work
Good sir..👍👍
Thanks bhai ❤
Thankyou 💜
Can it do multi threading like java?
you are wrong u said that first top level code run then require module run that is wrong u can take example that create fs.readFileSync and console.log its output and then run console.log("0") then output will be return result of fs.readFileSync then 0 will be printed
Thank u sir
Just you use crypto.. to node js automatic decide kr leta h kya isko thread pool me excute krna h ?
helpful video