How NodeJS Works? - You don't Know NodeJS

Поделиться
HTML-код
  • Опубликовано: 30 ноя 2024

Комментарии • 233

  • @shababsha5633
    @shababsha5633 10 месяцев назад +46

    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 10 месяцев назад +2

      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 10 месяцев назад +5

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

    • @xiaoshen194
      @xiaoshen194 9 месяцев назад +3

      Shabash but video mein to 4 threads hi dikhaya h default

    • @xiaoshen194
      @xiaoshen194 9 месяцев назад +2

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

    • @prakharsinha6915
      @prakharsinha6915 9 месяцев назад +1

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

  • @ajmaln73
    @ajmaln73 8 месяцев назад +3

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

  • @prvnpn216
    @prvnpn216 8 месяцев назад +2

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

  • @engineerslab1664
    @engineerslab1664 9 месяцев назад +5

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

  • @manojbhamre6062
    @manojbhamre6062 4 месяца назад +1

    Can't believe u have only 5 year of experience....ur knowledge is way above who has experienced of 10-15 years

  • @pratikshyapoudel7337
    @pratikshyapoudel7337 5 дней назад +1

    Your explanation hits me like a bolt of genius ⚡-straight to the brain! 💥 You're absolutely AMAZING! 🌟 You're my #1 FAVORITE RUclipsr right now! 🎥❤ Keep shining and growing

  • @Khedhar108
    @Khedhar108 9 месяцев назад +3

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

  • @Akhil_NK
    @Akhil_NK 9 месяцев назад +2

    Best Explination and the simplest one so Far Thanks Bhaiya

  • @raunakhajela
    @raunakhajela 9 месяцев назад +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.

  • @prigo333
    @prigo333 3 месяца назад +1

    This is the best explanation of nodesjs working so far

  • @jatinchavan5360
    @jatinchavan5360 2 месяца назад

    Summary -
    The sync tasks are run on the main thread by the v8 engine, the async tasks are taken care of by the libuv library. Libuv has event loop, which monitors 6 different queues and executes their callback by pushing to call stack whenever empty. Libuv uses the kernal/o.s threads (i.e. thread pool) to handle these async tasks and never blocks the main thread. Also, if there CPU intensive tasks on main thread (sync tasks) then they are offloaded to the thread pool straight away. That’s how Node/js being a single-threaded env, runs like multi-threaded.

  • @sundaramjha1776
    @sundaramjha1776 9 месяцев назад +4

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

  • @tanishqmanuja
    @tanishqmanuja 9 месяцев назад +3

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

  • @AsifAli-cp7uj
    @AsifAli-cp7uj 8 месяцев назад

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

  • @lucky-laxmi4799
    @lucky-laxmi4799 8 месяцев назад +1

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

  • @rakeshbhetariya
    @rakeshbhetariya 3 месяца назад

    This video will help me to understand the node js and most important part of the video is at the end time where and in which situation we can use node js and any multi threaded languages
    so thank you so much for such nice and simply but depth explanation

  • @AryanGupta-x2m
    @AryanGupta-x2m 14 дней назад

    I believe before the top level code gets executed, the modules imported using require() are resolve first and then only it proceeds as require is synchronous in nature.

  • @neerajsoni6350
    @neerajsoni6350 11 дней назад

    This video is GEM i must say nothing more left to read after this.

  • @kiranmohare6276
    @kiranmohare6276 10 месяцев назад +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

  • @darshanpandya1087
    @darshanpandya1087 Месяц назад

    thank you so much piyush sir for keep delivering this high knowledge videos with brief discussions ... i am loving it...

  • @PawanGupta-oh5ln
    @PawanGupta-oh5ln 5 месяцев назад

    Really loved the way you explained the entire architecture. You are a great teacher, you know what is going on in students mind and you answer them methodically. Please let me know if you have any video for V8.

  • @ibrahimshaikh3642
    @ibrahimshaikh3642 2 месяца назад

    Lakho me Ek video h, mast h

  • @krishna04051984
    @krishna04051984 6 месяцев назад

    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

  • @rohitpatel2671
    @rohitpatel2671 10 месяцев назад +3

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

  • @rohanraj2604
    @rohanraj2604 8 дней назад

    Damn Man You're teaching in a very beautiful way

  • @greeneryman
    @greeneryman 10 месяцев назад +3

    42:45
    Yes cha hi hai aise video

  • @mayanksh219
    @mayanksh219 8 месяцев назад

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

  • @thisravigangwar
    @thisravigangwar 10 месяцев назад

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

  • @Ayush37262
    @Ayush37262 10 месяцев назад +13

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

    • @shadabb2001
      @shadabb2001 9 месяцев назад

      which theme is he using do you know ?

  • @shivansh901
    @shivansh901 5 месяцев назад

    Excellent explanation, extensive details & good pace. Worth a subscribe bro.

  • @KamleshSahu-qy2fw
    @KamleshSahu-qy2fw 3 месяца назад

    Thankyou Piyush brother for the deep explanation 👍

  • @akshaykatrodiya6149
    @akshaykatrodiya6149 10 месяцев назад

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

  • @NilanjanH
    @NilanjanH 9 месяцев назад

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

  • @rishabhkedia9304
    @rishabhkedia9304 9 месяцев назад

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

  • @raahultrivedimusic
    @raahultrivedimusic 4 месяца назад

    Very well structured, and very well explained Piyush! You know when to say what and in what sequence! Thank you so much for all your efforts for all of us. Amazing work, keep it up! 🔥🔥

  • @me-16ayushverma40
    @me-16ayushverma40 10 месяцев назад +1

    outstanding way of explanation bhaiya

  • @anujeetswain7368
    @anujeetswain7368 9 месяцев назад

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

  • @hasnainmalik9644
    @hasnainmalik9644 10 месяцев назад

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

  • @VishalYadav-gk1kg
    @VishalYadav-gk1kg 6 месяцев назад +1

    Very nice explanation sir, Thank you!

  • @xtan-io
    @xtan-io Месяц назад +1

    36:14 its not top level code, expressions that have the global execution context are pushed into a call stack, and it's not executed directly the execution context of nested functions are then stored on top of that call stack and non primitive data structures are stored to the heap. Now the js call stack executes in FILO method. Thats why closures are possible in js, the nested function has access to the execution context of its parent function ( it gets that within the call stack )

    • @MythicEcho
      @MythicEcho 28 дней назад

      I'm also confused about fs task,
      Once he said they are taken care by thread pool as they are cpu extensive task
      And he had also shown them in event loop execution.
      Not sure where fs belongs.

    • @xtan-io
      @xtan-io 28 дней назад

      @MythicEcho it uses libuv ( a c library) as an API, it must be thread pool ig.

    • @vikaas.sharma
      @vikaas.sharma 16 дней назад

      @@MythicEcho For async fs tasks, Node.js uses the thread pool but keeps the event loop non-blocking.
      For sync fs tasks, the event loop gets blocked until the task completes, which is usually not recommended in a non-blocking environment like Node.js.

  • @Baljeetkaur-tu8qx
    @Baljeetkaur-tu8qx 8 месяцев назад

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

  • @amanninave9520
    @amanninave9520 2 месяца назад +1

    Great Video Thank you so much for creating such valuable content

  • @OmkarChebale
    @OmkarChebale 9 месяцев назад

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

  • @shaileshkamble8730
    @shaileshkamble8730 9 месяцев назад

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

  • @silentsagateller
    @silentsagateller 9 месяцев назад

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

  • @roshanaswal7221
    @roshanaswal7221 9 месяцев назад

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

  • @avi_5827
    @avi_5827 10 месяцев назад +1

    Content Quality >>>

  • @krishna04051984
    @krishna04051984 6 месяцев назад

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

  • @hatimtekri4949
    @hatimtekri4949 10 месяцев назад

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

  • @mohitjindal2036
    @mohitjindal2036 10 месяцев назад +1

    Please make on video on how await works in this internally

  • @vivekchavan9926
    @vivekchavan9926 4 месяца назад

    one of the best best explainations

  • @manojbhamre6062
    @manojbhamre6062 4 месяца назад +1

    U r gem man...just found ur channel ❤

  • @parv2742
    @parv2742 5 месяцев назад

    Very good explanation, sir 👏🏻

  • @algobuddy
    @algobuddy 10 месяцев назад +3

    Nice one bro, good to see you grow❤

  • @rohansinghrathore5012
    @rohansinghrathore5012 10 месяцев назад +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💫

  • @punitpubggaming7531
    @punitpubggaming7531 10 месяцев назад

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

  • @SandeepSingh-px3sw
    @SandeepSingh-px3sw 10 месяцев назад

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

  • @sumitkachare6628
    @sumitkachare6628 4 месяца назад

    nice explanation, thanks for such detailed video

  • @mohitpatel713
    @mohitpatel713 3 месяца назад

    Great explaination for event loops. sir can you please make a video on memory leaks and how to prevent them?

  • @suryagupta1999
    @suryagupta1999 10 месяцев назад +1

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

  • @crsanjaysingh1737
    @crsanjaysingh1737 9 месяцев назад

    PHP is not multithreaded. PHP-FPM can handle multiple incoming requests at once by launching multiple processes. I like your node js explaination

  • @PramodSharma-dq3pi
    @PramodSharma-dq3pi 7 месяцев назад +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?

  • @harshmehrotra1214
    @harshmehrotra1214 9 месяцев назад

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

  • @rahul-m2e8r
    @rahul-m2e8r 3 месяца назад +1

    yes please create this type of videos.

  • @sameergaikwad222
    @sameergaikwad222 9 месяцев назад

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

  • @divyarajsinhrana6045
    @divyarajsinhrana6045 4 месяца назад

    Good explanation of Node.js architecture. Is there any playlist for Node.js with express.js and mongo DB ?

  • @bincebee
    @bincebee 9 месяцев назад

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

  • @mohdaqib3638
    @mohdaqib3638 10 месяцев назад

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

  • @shreyajoshi3886
    @shreyajoshi3886 4 месяца назад

    Very informative video💯 Thank u sir😄

  • @anikettripathi1160
    @anikettripathi1160 8 месяцев назад

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

  • @bulbergaming9142
    @bulbergaming9142 6 месяцев назад

    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.

  • @supravatsarkar5866
    @supravatsarkar5866 6 месяцев назад

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

  • @FaizShaikh-dt8wp
    @FaizShaikh-dt8wp 9 месяцев назад

    same content as Jonas Schedtman instructor on udemy. But Great work for delivring to indian people.

  • @AseemAsghar
    @AseemAsghar 9 месяцев назад +1

    Why am I feeling sleepy while watching your tutorial?

    • @Mainak908
      @Mainak908 8 месяцев назад +1

      Uss bro😂

  • @jafariqbalchoudhary3926
    @jafariqbalchoudhary3926 9 месяцев назад

    Hi Piyush, can you please make a video on Node Js C++ addon.

  • @sreeharshaudayshankar7217
    @sreeharshaudayshankar7217 5 месяцев назад

    Excellent explanation

  • @engineerslab1664
    @engineerslab1664 9 месяцев назад

    Need more explanation of setimmediate working at top level and inside eventloop

  • @niraz9701
    @niraz9701 9 месяцев назад

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

  • @abhisheknavgan6829
    @abhisheknavgan6829 10 месяцев назад +2

    nice video

  • @ajaykumar-nx7kb
    @ajaykumar-nx7kb 8 месяцев назад

    Please make a video series on Typescript

  • @praveshpal9644
    @praveshpal9644 10 месяцев назад

    perfect explanation sir 💯💯

  • @arbabhere-h6s
    @arbabhere-h6s 3 месяца назад

    Great Explanation sir

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

  • @shahzadmujtaba1725
    @shahzadmujtaba1725 9 месяцев назад

    I love it make more videos on docker

  • @abirsinha923
    @abirsinha923 6 месяцев назад

    excellent explanation 👌 👏 👍

  • @rudrikasingh2892
    @rudrikasingh2892 8 месяцев назад

    Best explaination ever!

  • @ratnakiduniya8138
    @ratnakiduniya8138 10 месяцев назад

    Bhai aapke CHARAN kahan hain ? So much love from Bengaluru ♥

  • @chameliacharjee2809
    @chameliacharjee2809 8 месяцев назад

    Please include the other webapi and handling http request also. You have not mentioned the http calling here how it handles it

  • @Kiran-khadka
    @Kiran-khadka 10 месяцев назад +1

    Informative as usual❤

  • @noobchess2516
    @noobchess2516 3 месяца назад

    is the concept of callstack ,microtask queue ,callback queue is of brower environment and nodejs environment is different?
    i have a doubt as per the video , top level code will be executed first then import modules. but what if top level code uses the modules then how??

  • @bhavnishpatel9903
    @bhavnishpatel9903 16 дней назад

    Great Explanation 💯

  • @ajaypatidarmusic
    @ajaypatidarmusic 9 месяцев назад

    @piyushgargdev what happens to the blocking or synchronous operation.

  • @643kanavguleria9
    @643kanavguleria9 9 месяцев назад

    amazing explanation , learned alot 👍

  • @chidambarjoshi3470
    @chidambarjoshi3470 10 месяцев назад

    Next level explaination

  • @someshkumarmishra8279
    @someshkumarmishra8279 4 месяца назад

    bhai maza agaya thank you sir ji

  • @pavankulal9311
    @pavankulal9311 2 месяца назад

    where does the async and promise been executed . the callback that is returned in promise is executed in between the phase i got to know but does it run's in the different thread?

  • @pranayraj8945
    @pranayraj8945 9 месяцев назад

    What an OP explanation!! ❤❤❤

  • @JAINVISHAL-n9e
    @JAINVISHAL-n9e 10 месяцев назад

    bro some are some thing diff bro great work

  • @shortflicks83
    @shortflicks83 5 месяцев назад

    Amazing Explanation.

  • @pravinrathod1676
    @pravinrathod1676 10 месяцев назад

    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