How NodeJS Works? - You don't Know NodeJS

Поділитися
Вставка
  • Опубліковано 9 чер 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

КОМЕНТАРІ • 189

  • @shababsha5633
    @shababsha5633 4 місяці тому +39

    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

    • @unemployed-coder
      @unemployed-coder 4 місяці тому +1

      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?

    • @manishbhardwaj4587
      @manishbhardwaj4587 4 місяці тому +3

      @@unemployed-coder agree, virtually it do make sense but physical core is what matter the most.

    • @xiaoshen194
      @xiaoshen194 4 місяці тому +2

      Shabash but video mein to 4 threads hi dikhaya h default

    • @xiaoshen194
      @xiaoshen194 4 місяці тому +2

      ​@@manishbhardwaj4587video mein 4 kyu dikhaya h default agr default 128 h?

    • @prakharsinha6915
      @prakharsinha6915 3 місяці тому +1

      ​@@xiaoshen194 Default 4 hi hai bhai... Maximum pehle 128 tha and then increased to 1024

  • @engineerslab1664
    @engineerslab1664 3 місяці тому +5

    Ye koi nhi samjhaya h avi tk , i have searched a lot , thanks buddy for this wonderful explanation 😅

  • @vamsimudaliar7931
    @vamsimudaliar7931 4 місяці тому +1

    One of the finest and in-depth explaination. Thanks Piyush❣

  • @tanishqmanuja
    @tanishqmanuja 4 місяці тому +2

    Best node architecture video i have seen so far, keep up the good work 💯

  • @prvnpn216
    @prvnpn216 2 місяці тому +1

    this is like the most in-depth video on Eventloop and working of Node.js I found, Need a course like this.

  • @sundaramjha1776
    @sundaramjha1776 4 місяці тому +3

    Very well explained really. Have seen lot of other event loop video but this is special. Please continue creating this types of videos.

  • @raunakhajela
    @raunakhajela 4 місяці тому +4

    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.

  • @Akhil_NK
    @Akhil_NK 3 місяці тому +1

    Best Explination and the simplest one so Far Thanks Bhaiya

  • @ajmaln73
    @ajmaln73 2 місяці тому +1

    Thank you, I was looking for Nodejs Internal Working explanation for the last one year, This one is more Helpful kudos

  • @kiranmohare6276
    @kiranmohare6276 4 місяці тому +1

    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

  • @mayanksh219
    @mayanksh219 2 місяці тому

    Thank you Piyush for this amazing video. I learned a lot from this video like EventLoop and under the hood working of Node.js.

  • @NilanjanH
    @NilanjanH 3 місяці тому

    I really liked the way you explained, thanks for the easy explanation. I have never been understood better before watching this video. 👏

  • @hasnainmalik9644
    @hasnainmalik9644 4 місяці тому

    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.❤❤

  • @anujeetswain7368
    @anujeetswain7368 3 місяці тому

    Awesome video man!. I was very confused about differentiating the timers and io execution timings.

  • @krishna04051984
    @krishna04051984 17 днів тому

    Thanks piyush🎉. Best video for this topic, no one explained like this in UA-cam 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

  • @mohdaqib3638
    @mohdaqib3638 4 місяці тому

    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!!

  • @AsifAli-cp7uj
    @AsifAli-cp7uj 2 місяці тому

    Content is pure gold straight from heaven mann I am craving for more wisdom from this guy thanks piyush bhaiya

  • @Baljeetkaur-tu8qx
    @Baljeetkaur-tu8qx 2 місяці тому

    Such a detail video . Quite interesting and helps understanding deep concept of Node.js

  • @VishalYadav-gk1kg
    @VishalYadav-gk1kg Місяць тому +1

    Very nice explanation sir, Thank you!

  • @user-ec4sx6gg5w
    @user-ec4sx6gg5w 4 місяці тому

    i see the full video as well as coded with you . and thnx for this beautiful video . good work

  • @silentsagateller
    @silentsagateller 3 місяці тому

    This video was very helpful, thank you for the wonderful explanation of node.js architecture 😊

  • @lucky-laxmi4799
    @lucky-laxmi4799 2 місяці тому +1

    Awesome explanation. Keep making more of these in depth videos. 😍

  • @Kiran-khadka
    @Kiran-khadka 4 місяці тому +1

    Informative as usual❤

  • @me-16ayushverma40
    @me-16ayushverma40 4 місяці тому +1

    outstanding way of explanation bhaiya

  • @shaileshkamble8730
    @shaileshkamble8730 4 місяці тому

    Very indepth concept clearing video..... Thanks Sir...💌

  • @meghnasrivastava568
    @meghnasrivastava568 Місяць тому

    Hands down the best video!

  • @roshanaswal7221
    @roshanaswal7221 3 місяці тому

    Amazing sir, i would like to see more of these kind videos from you. Thank you for your content

  • @thisravigangwar
    @thisravigangwar 4 місяці тому

    Yes, aur videos chahiye, and what session bhaiya, bhaiya poora din barbaad krdiya faltu me ab neend achhi aayegi yh video dekhne ke baad.❤❤

  • @krishna04051984
    @krishna04051984 17 днів тому

    Plz make more video like this .
    Thanks from my bottom of heart❤

  • @rudrikasingh2892
    @rudrikasingh2892 3 місяці тому

    Best explaination ever!

  • @suryagupta1999
    @suryagupta1999 4 місяці тому +1

    Nice explanation 😃....Easy explanation for beginners.

  • @algobuddy
    @algobuddy 4 місяці тому +2

    Nice one bro, good to see you grow❤

  • @hatimtekri4949
    @hatimtekri4949 4 місяці тому

    Excellent explanation man
    Hats off
    Please create such videos, in nodejs only
    More insight about node js

  • @anikettripathi1160
    @anikettripathi1160 3 місяці тому

    Gem 💎content, bhaiya. Keep it up 👍Thank you!

  • @rohitpatel2671
    @rohitpatel2671 4 місяці тому +3

    i need this types of videos. please sir... to be continue............

  • @RahulChaudhary-hi2zo
    @RahulChaudhary-hi2zo 2 місяці тому

    Very Nice Video man, keep doing like this .

  • @niraz9701
    @niraz9701 4 місяці тому

    How can I thank you for being upload such a great video 😍

  • @SandeepSingh-px3sw
    @SandeepSingh-px3sw 4 місяці тому

    Ultimate😮 video, we want more videos like this.....

  • @najimali32
    @najimali32 Місяць тому

    Great Video. Enjoyed it a lot.

  • @azimkhan3927
    @azimkhan3927 3 місяці тому

    great video, nicely explained

  • @dhrubohootowl7579
    @dhrubohootowl7579 4 місяці тому

    very well explained thank you

  • @643kanavguleria9
    @643kanavguleria9 3 місяці тому

    amazing explanation , learned alot 👍

  • @pranayraj8945
    @pranayraj8945 3 місяці тому

    What an OP explanation!! ❤❤❤

  • @praveshpal9644
    @praveshpal9644 4 місяці тому

    perfect explanation sir 💯💯

  • @user-fo7qz5vo3v
    @user-fo7qz5vo3v 4 місяці тому +1

    ❤ Thankyou for explaning

  • @shaikhali5364
    @shaikhali5364 4 місяці тому +1

    Nice explanation! ❤

  • @unemployed-coder
    @unemployed-coder 4 місяці тому +1

    Nicely explained ❤❤

  • @waleed28ful1
    @waleed28ful1 2 місяці тому

    Amazing
    Thankyou soo much for amazing content

  • @abirsinha923
    @abirsinha923 20 днів тому

    excellent explanation 👌 👏 👍

  • @adityacholkar1421
    @adityacholkar1421 4 місяці тому

    Very well explained👍

  • @akshaykatrodiya6149
    @akshaykatrodiya6149 4 місяці тому

    "great explanation of how the Node.js event loop works", WD 👌🏽

  • @JS84129
    @JS84129 3 місяці тому

    Need more video like such

  • @dhruvdeora9781
    @dhruvdeora9781 4 місяці тому

    very imformatiive video. loved it

  • @coderkashif
    @coderkashif 3 місяці тому

    This is amazing....Thank you....

  • @AvinashSingh-tr5vt
    @AvinashSingh-tr5vt 4 місяці тому

    Awesome explanation 💚💚

  • @Zaheer__zk40
    @Zaheer__zk40 2 місяці тому

    Nice explanation ❤❤

  • @veerendrashukla
    @veerendrashukla 4 місяці тому

    very nice. nice drawing, nice explanation.

  • @chidambarjoshi3470
    @chidambarjoshi3470 4 місяці тому

    Next level explaination

  • @Ayush37262
    @Ayush37262 4 місяці тому +12

    Sir your NodeJS playlist >>> All paid + free courses 🗿

    • @shadabb2001
      @shadabb2001 3 місяці тому

      which theme is he using do you know ?

  • @rishabhkedia9304
    @rishabhkedia9304 3 місяці тому

    put more videos like this. it'll help you build core audience.

  • @JitendraLodhi-ei6vs
    @JitendraLodhi-ei6vs 4 місяці тому

    Very knowledgeable video🎉🎉🎉

  • @devangsharma8937
    @devangsharma8937 3 місяці тому

    Thanks a lot for the video

  • @GunjanShrimali
    @GunjanShrimali 4 місяці тому

    Great video best ever explain

  • @sumirandahal76
    @sumirandahal76 4 місяці тому

    THank you so much I enjooyed and understand

  • @shahzadmujtaba1725
    @shahzadmujtaba1725 3 місяці тому

    I love it make more videos on docker

  • @aditimahabole1761
    @aditimahabole1761 4 місяці тому

    Aap best ho !!!

  • @greeneryman2699
    @greeneryman2699 4 місяці тому +3

    42:45
    Yes cha hi hai aise video

  • @ayandippaul3108
    @ayandippaul3108 Місяць тому

    Bro really greattt❤❤

  • @r_lyricals_6201
    @r_lyricals_6201 3 місяці тому

    Genius brother 🎉

  • @mukulyadav3770
    @mukulyadav3770 4 місяці тому

    Absolute stunner

  • @TanmaySarkar
    @TanmaySarkar 4 місяці тому

    Very informative 💪🏻

  • @harshmehrotra1214
    @harshmehrotra1214 4 місяці тому

    reallly like to watch the explation of js working please make a video on that

  • @houseofcoding101
    @houseofcoding101 4 місяці тому

    Thank you sir!

  • @Khedhar108
    @Khedhar108 4 місяці тому +3

    "08:05"- Thread Pool
    "12:27"- IO polling
    "21:30" - undefinite behaviour of setTimeout and setInterval in main thread

  • @user-dd6zl4kg9d
    @user-dd6zl4kg9d 4 місяці тому

    bro some are some thing diff bro great work

  • @sidhant251
    @sidhant251 2 місяці тому

    Great video 😇

  • @gujaratinimoj3845
    @gujaratinimoj3845 4 місяці тому

    Good sir..👍👍

  • @RohitRaj-od3be
    @RohitRaj-od3be 3 місяці тому

    very interesting video.

  • @sameergaikwad222
    @sameergaikwad222 3 місяці тому

    Nice And Detailed Explanation. Quite Impressed.😍 Can you please also share those Notes.👍👍👍 Thanks👍👍👍

  • @bincebee
    @bincebee 3 місяці тому

    Hello Piyushbro,
    Please make video on transaction in mongoose…
    Your teaching method is very helpful..

  • @vrutilkjadav1030
    @vrutilkjadav1030 2 місяці тому

    informative video!

  • @punitpubggaming7531
    @punitpubggaming7531 4 місяці тому

    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 😂😂

  • @supravatsarkar5866
    @supravatsarkar5866 Місяць тому

    Never seen like that explanation .... Thank you so much Piyush Vai 💌. Create courses (Paid) regarding System Design /DSA / Devops/Microservice . All the best.

  • @rohansinghrathore5012
    @rohansinghrathore5012 4 місяці тому +1

    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💫

  • @abhisheknavgan6829
    @abhisheknavgan6829 4 місяці тому +2

    nice video

  • @_Blackwolf_01
    @_Blackwolf_01 4 місяці тому

    Thanks bhai ❤

  • @mohitjindal2036
    @mohitjindal2036 4 місяці тому +1

    Please make on video on how await works in this internally

  • @smartguy3k
    @smartguy3k Місяць тому

    great! Thanks

  • @atanumojumdar
    @atanumojumdar 3 місяці тому

    Thankyou 💜

  • @codewithsyedmqasim
    @codewithsyedmqasim 4 місяці тому

    helpful video

  • @ritikgupta1133
    @ritikgupta1133 5 днів тому

    loved it piyush, just curious to know that how js on browser and js on nodejs differs to work , like how the asynchronous operations execution differs on both ,is it same ? is it different ?

  • @vinitjain7
    @vinitjain7 3 місяці тому

    Thank u sir

  • @replymeasapp
    @replymeasapp 4 місяці тому +1

    sir please one video on all the vs code extensions you use please

  • @rishiraj2548
    @rishiraj2548 4 місяці тому

    Great thanks

  • @PramodSharma-dq3pi
    @PramodSharma-dq3pi Місяць тому +1

    @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?

  • @prakharsinha4145
    @prakharsinha4145 4 місяці тому

    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?

  • @debsouryadatta807
    @debsouryadatta807 4 місяці тому

    Yes we want more videos like this, very helpful and interesting 🫡

  • @Thechetankumar
    @Thechetankumar 4 місяці тому

    Thanks man

  • @ajaykumar-nx7kb
    @ajaykumar-nx7kb 2 місяці тому

    Please make a video series on Typescript

  • @shivashukla7894
    @shivashukla7894 4 місяці тому

    @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.