Setup MongoDB for Production deployment - Replica Sets cluster
In this video you will learn how to setup #mongodb for #production. We will be creating a #cluster of mongodb using #replicaset, which is the recommended way to #deploy mongodb for production. Replica sets allow you to have #high-availability, #load-balancing and data is replicated in separate mongodb instances running on different machines.
--------------------------------------------------------------------------
More on MongoDB
--------------------------------------------------------------------------
MongoDB Tutorial: • Learn MongoDB in 50 mi...
MongoDB inside Docker: • MongoDB inside Docker ...
Installation on Windows: • Install MongoDB on Win...
Installation on Mac: • Install MongoDB on Ma...
--------------------------------------------------------------------------
🚀Deploy apps: zeet.co/r/yourstruly
(One FREE project forever 😘)
--------------------------------------------------------------------------
📦FREE $100 credit @Digital Ocean: m.do.co/c/3208f08b3324
Subscribe: kzread.info...
--------------------------------------------------------------------------
💵Support the channel:
Paypal: www.paypal.me/trulymittal
Patreon: / trulymittal
--------------------------------------------------------------------------
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. I've been using Kite for 6 months and I love it! www.kite.com/get-kite/?...
--------------------------------------------------------------------------
======================
✔ Other useful Playlists
======================
#RestAPI (#NodeJS and MongoDB): • REST API using NodeJS ...
#API Authentication using #JWT: • NodeJS API Authenticat...
#Firebase: • Firebase | Build a Not...
Docker: • Docker
MongoDB: • Learn MongoDB in 50 mi...
Html/Css/Js: • HTML / CSS / JS
Android: • Android
Challenges: • Challenges
#yoursTRULY #tutorial #howto #nodejs #android
Пікірлер: 105
Get this guy a medal!! You deserve it. One of the best explanations!
Properly explained. You are a lifesaver. Thank you.
The way u explained everything step by step is amazing. Finally I could understand how to make all this. Thanks a lot.
So underrated , gonna suggest this to all my friends , make more videos !!!
That's one seamless explanation. Bravo.
Best channel for actual learning for software engineers.
Thank you. It was truly amazing. I really appreciate the way you explain everything in details.
Awesome explanation! Thanks man. Looking forward to sharded cluster tutorial too :D
Great tutorial. Very well organized. Thanks for sharing.
Beautifully explained. Thanks
Excellent video! I learnt a lots from this.
Great quality, well explained.
Cool video, u explained everything I needed...
Thanks a lot for your explantation, You are the best. I'm a beginner in MongoDB , I understand
Fantastic videooo! You are the man!
wow! Good shit man, big thanks for this great explanation!
@Truly Mittal, well explained sir. The topics and the explanation were fully structured and systematic way. Thanks for sharing your enormous amount of knowledge with us and look forward to see more and more from you.
@mafiacodes
3 жыл бұрын
Glad it was helpful!
Very interesting topic. Thanks for posting
the best video on Mongodb. it helped me a lot.Thanks
@mafiacodes
2 жыл бұрын
Subscribe like share
Thanks so much. Well explained.
Well explained, thanks for posting. Liked, Shared, subscribed ✌️
Simply Excellent!
Perfect tutorial.
awesome video. Thank you.
super duper explanation
I just watched the best mongodb video.
@mafiacodes
Жыл бұрын
Thank you
Thank You !! 🙏🙏🙏
Magnifico!
Awesome. Thanks
@mafiacodes
2 жыл бұрын
Subscribe like share
Thank you. This made me understand how to setup a cluster in a very simplified way! Please also make videos on how to implement sharding
@mafiacodes
2 жыл бұрын
I’ll try
Context Api and Now this one. Both are awesome videos. i am stuck in Replica around 2 days. Now after this i complete Replica and now transactions are working perfectly. Thanks Mittal Sir
Add authentication in it as well. Things get messy when you need to add keyfile
Thanks for this. Be great to add the tls to enable encryption between the nodes
@mafiacodes
2 жыл бұрын
O,yes u can definitely add it is the instances are on different hosts
2:45 that is awesome.
Please continue this playlist
GREAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hates Off brother
a time ago, I was a big fan of MongoDB. but recently i heard about Apache Cassandra because of high scalability
Hey yourstruly!! Saw ur android playlist, it was just awesome!! Do add a tutorial on how to access file or file list from internal/external storage to the app..
@mafiacodes
3 жыл бұрын
Will do soon, Subscribe like share
@protocolkhan3501
3 жыл бұрын
@@mafiacodes Already did that!
Hey I have some doubts regarding concurrency in mongoDB. I saw there is a pool size settting while instantiating the client, is that is the way to do concurrent requests? Also mongoDB handles all the read / write operations between all these concurrent services automatically?
sen nasıl bir kralsın
You are really awesome man ☺️. I have a question man. Will the application we design that uses the DB know that it is having a failover setup or it will have zero knowledge on that. What I mean is which url should I specify to connect to the mongodb cluster so that it doesn't matter whichever instance goes down. It may be a noob question but please help with that if possible. Thank you.
@mafiacodes
Жыл бұрын
Better explained here in the video itself...watch to clarify the doubt kzread.info/dash/bejne/mXec3MihhqrXoJs.html
Please make a video on using Dockerode in node js and how can we use to build something like Remote Code Execution like online IDE. Thanks
great content. Can you please do one for postgresql? Thanks
@mafiacodes
2 жыл бұрын
Great suggestion!
This video is pure Gold!... I am so happy that I found this video, bro you are amazing thank you very much! 💙 and no I will never scream Chuck Norris' name during sex, This will never happen 😂
It works perfectly in local. What about if we work on mongoDB Atlas or server?
How do we set the read preferences? How do we verify the read preferences?
at 8:48, which shortcuts you use to exit the process ?
Hi sir can you make aws series with Android studio currently aws opened free trial everyone can use aws now it will make big difference
Please explain encryption also for production ready...
Thank you. But I have a question. If one node goes down, after sometimes it backs again....will it contain the same data as other nodes?
@mafiacodes
Жыл бұрын
Yes I guess so but I am not sure.
Which terminal are you using?
I have a situation where Primary and Secondary1 wen down so all I have is Secondary0, I deployed three new servers Primary,Secondary0 and Secondary1 how would I replicate data from old Secondary0 that is still available but didn't become primary ?
Thanks for making the video so comprehensive. but also let me know HOW TO MAKE SECONDARY NODE AS A PRIMARY NODE MANUALLY?
Can you please make this video with kubernetes with auth and external access
Do I need to install mongodb enterprise version for this? Or it can also work on the community version?
@mafiacodes
2 жыл бұрын
community, Subscribe Like Share
... I assume to have a shared setup with a cluster you will first be creating a 2 way or 3 way or x way shared setup and then as a 2nd step take each of the masters and add replicas for the ? do you have an example of such.
@mafiacodes
2 жыл бұрын
Isn’t it the same example as demonstrated here
@georgelza
2 жыл бұрын
@@mafiacodes I"m asking example for more detail around a shared cluster... with each shard having it's own replica sets
In windows also same process or not? Sir
Why you didnt create arb?
Which terminal do you to write the code ??
how to restore backup from a different server to newserver with data loaded to a specific folder
after that how to setup authentication on this process
How can i set authorization for mongo-query-router node in mongo cluser? Specially for mongos i want to restrict users to connect query-router
Sir, are mongodb replica set for ATLAS not available for free tier users? Because I am not able to find two replicas. Rather I was only able to find one. Please help and thanks for your time.
@mafiacodes
3 жыл бұрын
Need to go thru the docs of atlas
@be_b_50_ankitkumar_singh79
3 жыл бұрын
@@mafiacodes Yes , I have to upgrade atlas.
Which vscode theme are you using?
@mafiacodes
3 жыл бұрын
This was not in vscode but hyperterm
But what happens to the mongodb running at 27017? Whats is purpose now?
Cors origin error occour. While uploading a photo using multer in express post request. All other post request are working fine , I am using _____________ app.use(cors()); _____________ Any solution? thanks
Production without authentication?
Is it possible to have a localhost and atlas replicaset??
@mafiacodes
10 ай бұрын
Never tried that but may be possible if you can tunnel ur localhost
Can you please share knowledge on parallel mongo storage.
@mafiacodes
3 жыл бұрын
what is parallel mongo storage ?
@VedOnce
3 жыл бұрын
@@mafiacodes it's sharded cluster. if possible I want to combine, both sharded and replica as you told in this video,for large scale,
@mafiacodes
3 жыл бұрын
Better would be to use mongo atlas, since what u pay for individual machines would be more than atlas
@VedOnce
3 жыл бұрын
@@mafiacodes sorry to distrub what you told is right, but i have a different concept to test . It will enough for me to know sharded cluster.
terminal location pls?
product ready can not use "localhost"
How can you use database in production with credential? This shouldn't be titled production, but development.
How do you start multiple tabs on sigle machine
@mafiacodes
2 жыл бұрын
tabs of what?
@kingsite8328
2 жыл бұрын
@@mafiacodes nvm got it....I meant multiple instances
@mohit9783
2 жыл бұрын
@@kingsite8328 how did you do it?
I couldn't solve this issue "msg":"Failed to refresh key cache","attr":{"error":"NotYetInitialized: Cannot use non-local read concern until replica set is finished initializing.","nextWakeupMillis":4400}} this never goes away
I'm getting error like count failed
@mafiacodes
2 жыл бұрын
Exact error?
Setup for production deployment, but doesn't even mention security and authentication?
Doesn't Work !
abee tujhe hindi nhi aati kya ?
Thanks. It is very informative for me.