How to scale NodeJs applications using the cluster module.

  Рет қаралды 33,835

Piyush Garg

Piyush Garg

Жыл бұрын

► Master NodeJS Playlist: • Master NodeJS
In this video, we will explore the clusters and workers in NodeJS
► Complete Full Stack Web Developer RoadMap 2023: • Complete Full Stack We...
► My Website: www.piyushgarg.dev
My Gears
► My Girlfriend: amzn.to/3WD6FRp
► Apple MacBook Laptop: amzn.to/3WBJgQn
► Anker USB Hub: amzn.to/3GhZSr0
► Blue Yeti Microphone: amzn.to/3YKZ9FT
► External 27” Monitor: amzn.to/3Vp3xaO
► Logitech MK295 Wireless Keyboard and Mouse: amzn.to/3DuL1bB
► Seagate Expansion 1TB External HDD: amzn.to/3QMm5Q8
► Tripod: amzn.to/3S4OwK4
► Ring Light: amzn.to/3YLf8DR
Video Titles ✨
NodeJS Clusters
NodeJS Multi-Threading
NodeJS Cluster and Worker Threads
Tags
#nodejs #streaming #javascript #expressjs #mongodb #mernstack #developer #api #https #server #javascriptinhindi #webdevelopment #webapp #realtimeapp #serverside #nonblockingio #tech

Пікірлер: 82
@harisankarsahoo5870
@harisankarsahoo5870 11 ай бұрын
Needful.TQ so much sir.
@scaleindiachannel
@scaleindiachannel 8 ай бұрын
Nice Content Sir . This Playlist is Amazing Best Node js Playlist In KZfaq
@sammykumar1777
@sammykumar1777 Жыл бұрын
Thank you bhaiya
@itbhuelex
@itbhuelex Жыл бұрын
nice as always
@mayanksh219
@mayanksh219 4 ай бұрын
Investing time in this series is totally worth it !!!!. You are suh a great teacher. Thank you Piyush for this amazing series.
@mostakahamed6169
@mostakahamed6169 Жыл бұрын
Your content is always amazing.
@explore_coding
@explore_coding Жыл бұрын
Crystal clear ❤️
@scorcism.
@scorcism. 4 ай бұрын
cluster clear
@user-en1pd3zc7e
@user-en1pd3zc7e 26 күн бұрын
Awesome thanks a lot
@shubhamgupta-bl1tr
@shubhamgupta-bl1tr Жыл бұрын
Nice explanation..sir can u come with a real time project where we can use these concepts (soket streaming cluster etc)
@dineshsinghbisht07
@dineshsinghbisht07 Жыл бұрын
Very helpful 🤩
@ashirmuneer1580
@ashirmuneer1580 29 күн бұрын
Great way of teaching .
@jatilyadav4000
@jatilyadav4000 Жыл бұрын
Amazing video
@shivamkumarkashyap9273
@shivamkumarkashyap9273 15 күн бұрын
This video help me a lot ... For video streaming app
@mohsinsayyad6347
@mohsinsayyad6347 2 ай бұрын
Nice video bro... 🔥
@sumandutta944
@sumandutta944 5 ай бұрын
great bhai , now understanding nodeJs so easy
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@iampiyush100
@iampiyush100 Жыл бұрын
Never stop teaching you have great skills🎉🎉❤
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@mohd0606
@mohd0606 Жыл бұрын
Very clean explanation
@mohd0606
@mohd0606 Жыл бұрын
I thought man you need kudos for a very calm and composed nature. Keep it up.
@ritesh4165
@ritesh4165 Жыл бұрын
Great Explaination bro
@piyushgargdev
@piyushgargdev Жыл бұрын
Thank you ❤️
@deepakbisht5149
@deepakbisht5149 Жыл бұрын
super bro 👍👍👍
@piyushgargdev
@piyushgargdev Жыл бұрын
Thank you so much
@codekicks2171
@codekicks2171 8 ай бұрын
Amazing video sir
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@mohd0606
@mohd0606 Жыл бұрын
If possible can you explain using a microservice architecture?
@user-md1gp6hn2s
@user-md1gp6hn2s 7 ай бұрын
Piyush one word for you RESPECT... Possible to have video on system design and components involved..
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@corruptionFreeIndia02
@corruptionFreeIndia02 3 ай бұрын
Thanks, Well which chrome plugin are you using to see json response in the browser?
@lovishduggal9064
@lovishduggal9064 6 ай бұрын
Thanks
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@lovishduggal9064
@lovishduggal9064 5 ай бұрын
@@arpitmehta779 It is great.
@user-ws2gp1ze3y
@user-ws2gp1ze3y Жыл бұрын
use case kya h iska? deployment services like aws have their own load balancers and auto scaling groups. is this good for on premise servers?
@harshnamdeo613
@harshnamdeo613 3 ай бұрын
Loadbalancing in Multiple docker containers are more useful or node js clustering?
@user-jg2cj2lm4m
@user-jg2cj2lm4m 2 ай бұрын
hey piyush, i have one question. Doesnt the primary cluster allocate a CPU?
@chidambarjoshi3470
@chidambarjoshi3470 8 ай бұрын
So only multi-core processors support parallelism? What if I use multiple single-core machines with increased RAM?
@prandyachikane7815
@prandyachikane7815 3 ай бұрын
Can u plz make video on child process
@ranawaqas4080
@ranawaqas4080 4 ай бұрын
restart vs code cntrl + p type. " > reload " select reload window enter
@hey_utkarshh
@hey_utkarshh 5 ай бұрын
What does it mean we can create multiple threads ? as we know nodejs is single threaded
@mr.webdeveloper656
@mr.webdeveloper656 21 күн бұрын
Bhaiya ye jb hm deploy krenge toh kitne CPUs bnenge or kese Handel hoga ye sb..
@anshumansharma2251
@anshumansharma2251 Жыл бұрын
Is there any difference in the explicitly creating load balancers on aws or using clusters???
@subhajitbhattacharjee007
@subhajitbhattacharjee007 5 ай бұрын
Here the cluster load balancer is distributing the requests among the CPU Threads in a single machine (server). As you asked, "explicitly creating load balancers" is used to distribute loads among the multiple servers.
@saurabhchaudhary624
@saurabhchaudhary624 28 күн бұрын
Dear i write same code as in your video in server.js file but when i open multiple browser tab then the workerId is same in all tab. can you suggest me where i am wrong ????
@weforyouweb1165
@weforyouweb1165 Жыл бұрын
Good explanation Piyush ji I want to ask one question regarding this I am using PM2 for production but not able to distribute load after 2-3 days my servers is not working. And one last question if I have 9 cores and I have 3 node server for different purpose so each server have 9 workers in cluster or each will get 3 worker Please clear my doubt sir ji🎉🎉
@ajmalshahanpm938
@ajmalshahanpm938 2 ай бұрын
hey bro, please help me,
@praffulsinha4301
@praffulsinha4301 Жыл бұрын
sir, यह समझ मे आ गया लेकिन मेरा एक प्रश्न है nodejs worker threads क्या होता है क्या यह same है cluster और nodejs worker threads or cluster में क्या difference है और किस जगह किसका use होगा please इसके ऊपर video बना दीजिये request है
@creativegiant148
@creativegiant148 6 ай бұрын
if I have a mongodb connection inside my node app. can this create a producer consumer type problem? for example, different clusters could write to the DB simultaneously, could this happen, or MongoDB handles this?
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@ajayrathod7438
@ajayrathod7438 2 ай бұрын
How do we create so many servers on the same port? Fork one is in if section and server started in else section so if fork created 8 worker then how it move to else section?
@TheHimanshudon
@TheHimanshudon 2 күн бұрын
Same question!
@Deepz007
@Deepz007 8 ай бұрын
I understand that clusters are out-of-the-box feature of Node.js. But if it's just about scalability, we can't always scale out a.k.a horizontally scale our server. Isn't clustering same as scaling up a.k.a vertical scaling solution ?
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@RahulGupta-pl7jc
@RahulGupta-pl7jc 8 ай бұрын
Sir is it similar to worker thread module or its something else?
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@user-ym4kf9bl9y
@user-ym4kf9bl9y 4 ай бұрын
sir mere laptop me process.pid all different windows me same kyu hai
@pratyushpragyey7002
@pratyushpragyey7002 2 ай бұрын
don't use process.isPrimary instead use process.isMaster
@mma-dost
@mma-dost Жыл бұрын
Bhaiya ek docker pr bhi one video loa please request.
@piyushgargdev
@piyushgargdev Жыл бұрын
I already have a playlist on docker :)
@mma-dost
@mma-dost Жыл бұрын
@@piyushgargdev sorry should have check your channel first. But i want to say I searched on youtube a lot but your docker video is not there in youtube search results.
@computerscienceproject
@computerscienceproject 6 ай бұрын
can this really be used in live websites ? like if there is finance company like paytm which uses nodejs as backend ? so load can be managed through this ?
@arpitmehta779
@arpitmehta779 5 ай бұрын
have you completed this series up to now, and can u give me review abt it ?
@pritamkumar6454
@pritamkumar6454 3 ай бұрын
How we can create many servers on same port ?
@sad0n3
@sad0n3 23 күн бұрын
no
@pranupranav5563
@pranupranav5563 21 күн бұрын
​@@sad0n3 let a proxy server running on a port and handle requests based on the url forwarding to different services
@sad0n3
@sad0n3 20 күн бұрын
@@pranupranav5563 it can be. But with react and next js you have to configure build bundle according to express server or passing the frontend to express server
@aviii24x7
@aviii24x7 24 күн бұрын
Mine are coming same even in differnet browsers!!!!!!!1
@Bgnsart
@Bgnsart Жыл бұрын
bhaiya ye bta do ki node js ke project ko host kaise karte hai
@piyushgargdev
@piyushgargdev Жыл бұрын
Already made a video in this playlist
@yagneshacharya2461
@yagneshacharya2461 5 ай бұрын
damn this was mine interview quesstion , what is clusters in nodejs ?
@Ayush37262
@Ayush37262 5 ай бұрын
Then you told them the answer?? Or you didn't know about it during your interview??
@yagneshacharya2461
@yagneshacharya2461 5 ай бұрын
@@Ayush37262 I didn't know😭
@Ayush37262
@Ayush37262 5 ай бұрын
@@yagneshacharya2461 Sed :(
@bilalishtiaq7036
@bilalishtiaq7036 Жыл бұрын
bhai deployment with NGINX crash course banao please 🥺
@piyushgargdev
@piyushgargdev Жыл бұрын
Sure, Starting from today ✨
@bilalishtiaq7036
@bilalishtiaq7036 Жыл бұрын
@@piyushgargdev love you bro you're the greatest teacher on KZfaq god bless you and you'll achieve more success 💕
@AchwaqKhalid
@AchwaqKhalid 11 ай бұрын
Why put an English title on an Indian video 🤧
@mohitsaini9266
@mohitsaini9266 18 күн бұрын
Sir you are quite low efficient. Let me tell you why agr yese hi pdhna hota to hum chatgpt se bhi pdh lete code utha uthakr rkhna ye koi pdhana nhi hota smjhayega kon abhi mai puchna lgu cluster backend mai kaise os ko bta rha ki usko 4 cpu ka time milna chyaie I definitely apke pass uska jwb nhi hoga you are teaching in wrong qay
@kimkardashi-un9382
@kimkardashi-un9382 14 күн бұрын
Aap kyu nhi banake daal dete video
What is Nginx?
11:45
Piyush Garg
Рет қаралды 55 М.
JavaScript Coding Interview Question | @ApnaCollegeOfficial
0:53
Apna College
Рет қаралды 560 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 57 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 9 МЛН
WebSocket in NodeJS | Socket.IO - Real Time Messaging
32:27
Piyush Garg
Рет қаралды 146 М.
Scaling your Node.js app using the "cluster" module
13:44
Software Developer Diaries
Рет қаралды 38 М.
How to scale NodeJs applications using the cluster module.
13:37
Mafia Codes
Рет қаралды 50 М.
All you need to know about "child_process" in Node.js
12:38
Software Developer Diaries
Рет қаралды 4,8 М.
Concurrency vs Parallelism in Node.js
7:47
Mehul - Codedamn
Рет қаралды 41 М.
Why Is He Unhappy…?
00:26
Alan Chikin Chow
Рет қаралды 57 МЛН