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

  • @SatyamKumar-ts2jh
    @SatyamKumar-ts2jh3 жыл бұрын

    Get this guy a medal!! You deserve it. One of the best explanations!

  • @opemesonrale7598
    @opemesonrale75982 жыл бұрын

    Properly explained. You are a lifesaver. Thank you.

  • @edgaralainramosmesas5132
    @edgaralainramosmesas51323 жыл бұрын

    The way u explained everything step by step is amazing. Finally I could understand how to make all this. Thanks a lot.

  • @AkshatSinghania
    @AkshatSinghania3 жыл бұрын

    So underrated , gonna suggest this to all my friends , make more videos !!!

  • @diwa007
    @diwa0072 жыл бұрын

    That's one seamless explanation. Bravo.

  • @be_b_50_ankitkumar_singh79
    @be_b_50_ankitkumar_singh793 жыл бұрын

    Best channel for actual learning for software engineers.

  • @BaharKeshavarz
    @BaharKeshavarz10 ай бұрын

    Thank you. It was truly amazing. I really appreciate the way you explain everything in details.

  • @leamon9024
    @leamon90242 жыл бұрын

    Awesome explanation! Thanks man. Looking forward to sharded cluster tutorial too :D

  • @jeffreyhunter4115
    @jeffreyhunter41152 жыл бұрын

    Great tutorial. Very well organized. Thanks for sharing.

  • @dsowriraj9450
    @dsowriraj9450 Жыл бұрын

    Beautifully explained. Thanks

  • @vuhungnguyen4858
    @vuhungnguyen48583 жыл бұрын

    Excellent video! I learnt a lots from this.

  • @MursaleenMomin
    @MursaleenMomin2 жыл бұрын

    Great quality, well explained.

  • @angelangeli2089
    @angelangeli20893 жыл бұрын

    Cool video, u explained everything I needed...

  • @yannguigui3701
    @yannguigui37012 жыл бұрын

    Thanks a lot for your explantation, You are the best. I'm a beginner in MongoDB , I understand

  • @Telmosampaio
    @Telmosampaio2 жыл бұрын

    Fantastic videooo! You are the man!

  • @sebastiandahlstrom4971
    @sebastiandahlstrom4971 Жыл бұрын

    wow! Good shit man, big thanks for this great explanation!

  • @puneethpgowda8580
    @puneethpgowda85803 жыл бұрын

    @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

    @mafiacodes

    3 жыл бұрын

    Glad it was helpful!

  • @Mirzly
    @Mirzly3 жыл бұрын

    Very interesting topic. Thanks for posting

  • @DineshU
    @DineshU2 жыл бұрын

    the best video on Mongodb. it helped me a lot.Thanks

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    Subscribe like share

  • @rajeshaltavista6571
    @rajeshaltavista6571 Жыл бұрын

    Thanks so much. Well explained.

  • @NightcoreHindi
    @NightcoreHindi3 жыл бұрын

    Well explained, thanks for posting. Liked, Shared, subscribed ✌️

  • @rishiktiwari
    @rishiktiwari2 жыл бұрын

    Simply Excellent!

  • @megaklis.vasilakis
    @megaklis.vasilakis2 жыл бұрын

    Perfect tutorial.

  • @firojsiddiki2750
    @firojsiddiki27503 жыл бұрын

    awesome video. Thank you.

  • @donkb241
    @donkb241Ай бұрын

    super duper explanation

  • @josephuzuegbu7431
    @josephuzuegbu7431 Жыл бұрын

    I just watched the best mongodb video.

  • @mafiacodes

    @mafiacodes

    Жыл бұрын

    Thank you

  • @VK-fr5mc
    @VK-fr5mc2 жыл бұрын

    Thank You !! 🙏🙏🙏

  • @pxft475
    @pxft4752 жыл бұрын

    Magnifico!

  • @sanwalfarooque2747
    @sanwalfarooque27472 жыл бұрын

    Awesome. Thanks

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    Subscribe like share

  • @007antas
    @007antas2 жыл бұрын

    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

    @mafiacodes

    2 жыл бұрын

    I’ll try

  • @usmanqasim7948
    @usmanqasim79482 жыл бұрын

    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

  • @chandanchaudhari704
    @chandanchaudhari7047 ай бұрын

    Add authentication in it as well. Things get messy when you need to add keyfile

  • @potatosoup815
    @potatosoup8152 жыл бұрын

    Thanks for this. Be great to add the tls to enable encryption between the nodes

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    O,yes u can definitely add it is the instances are on different hosts

  • @MotionInMotion1975
    @MotionInMotion19752 жыл бұрын

    2:45 that is awesome.

  • @anuragprakash7256
    @anuragprakash725625 күн бұрын

    Please continue this playlist

  • @somyagupta7471
    @somyagupta74712 жыл бұрын

    GREAT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Hates Off brother

  • @neerajverma9226
    @neerajverma92263 жыл бұрын

    a time ago, I was a big fan of MongoDB. but recently i heard about Apache Cassandra because of high scalability

  • @protocolkhan3501
    @protocolkhan35013 жыл бұрын

    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

    @mafiacodes

    3 жыл бұрын

    Will do soon, Subscribe like share

  • @protocolkhan3501

    @protocolkhan3501

    3 жыл бұрын

    @@mafiacodes Already did that!

  • @riebeck1986
    @riebeck19862 жыл бұрын

    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?

  • @ibrahimyldz542
    @ibrahimyldz5423 жыл бұрын

    sen nasıl bir kralsın

  • @senkottuvelan
    @senkottuvelan Жыл бұрын

    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

    @mafiacodes

    Жыл бұрын

    Better explained here in the video itself...watch to clarify the doubt kzread.info/dash/bejne/mXec3MihhqrXoJs.html

  • @jerry_gamer4016
    @jerry_gamer40163 жыл бұрын

    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

  • @AhmedRakibImran
    @AhmedRakibImran2 жыл бұрын

    great content. Can you please do one for postgresql? Thanks

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    Great suggestion!

  • @naveedalirehmani4135
    @naveedalirehmani41352 жыл бұрын

    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 😂

  • @enesdogan1801
    @enesdogan18016 ай бұрын

    It works perfectly in local. What about if we work on mongoDB Atlas or server?

  • @tharun8164
    @tharun81642 жыл бұрын

    How do we set the read preferences? How do we verify the read preferences?

  • @yuhakez9066
    @yuhakez90662 жыл бұрын

    at 8:48, which shortcuts you use to exit the process ?

  • @MrCray678
    @MrCray6783 жыл бұрын

    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

  • @himanish2006
    @himanish20062 жыл бұрын

    Please explain encryption also for production ready...

  • @marzukzarir
    @marzukzarir Жыл бұрын

    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

    @mafiacodes

    Жыл бұрын

    Yes I guess so but I am not sure.

  • @matheusscheffer5463
    @matheusscheffer54632 жыл бұрын

    Which terminal are you using?

  • @KoljaMineralka
    @KoljaMineralka Жыл бұрын

    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 ?

  • @BabluKumar-jy8bn
    @BabluKumar-jy8bn2 жыл бұрын

    Thanks for making the video so comprehensive. but also let me know HOW TO MAKE SECONDARY NODE AS A PRIMARY NODE MANUALLY?

  • @ShourovRoy-pk5zm
    @ShourovRoy-pk5zm2 ай бұрын

    Can you please make this video with kubernetes with auth and external access

  • @abhishekjagtap1069
    @abhishekjagtap10692 жыл бұрын

    Do I need to install mongodb enterprise version for this? Or it can also work on the community version?

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    community, Subscribe Like Share

  • @georgelza
    @georgelza2 жыл бұрын

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

    @mafiacodes

    2 жыл бұрын

    Isn’t it the same example as demonstrated here

  • @georgelza

    @georgelza

    2 жыл бұрын

    @@mafiacodes I"m asking example for more detail around a shared cluster... with each shard having it's own replica sets

  • @saisatya3569
    @saisatya35698 ай бұрын

    In windows also same process or not? Sir

  • @dungva1505
    @dungva15052 жыл бұрын

    Why you didnt create arb?

  • @mrspecial3170
    @mrspecial31708 ай бұрын

    Which terminal do you to write the code ??

  • @venraviutube
    @venraviutube Жыл бұрын

    how to restore backup from a different server to newserver with data loaded to a specific folder

  • @somyagupta7471
    @somyagupta74712 жыл бұрын

    after that how to setup authentication on this process

  • @adelminayi
    @adelminayi2 жыл бұрын

    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

  • @be_b_50_ankitkumar_singh79
    @be_b_50_ankitkumar_singh793 жыл бұрын

    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

    @mafiacodes

    3 жыл бұрын

    Need to go thru the docs of atlas

  • @be_b_50_ankitkumar_singh79

    @be_b_50_ankitkumar_singh79

    3 жыл бұрын

    @@mafiacodes Yes , I have to upgrade atlas.

  • @parasarora7565
    @parasarora75653 жыл бұрын

    Which vscode theme are you using?

  • @mafiacodes

    @mafiacodes

    3 жыл бұрын

    This was not in vscode but hyperterm

  • @MayankMishra-oy5xe
    @MayankMishra-oy5xe7 ай бұрын

    But what happens to the mongodb running at 27017? Whats is purpose now?

  • @mdjahidulislam9205
    @mdjahidulislam92053 жыл бұрын

    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

  • @utubetvux5170
    @utubetvux517011 ай бұрын

    Production without authentication?

  • @alamjamal
    @alamjamal10 ай бұрын

    Is it possible to have a localhost and atlas replicaset??

  • @mafiacodes

    @mafiacodes

    10 ай бұрын

    Never tried that but may be possible if you can tunnel ur localhost

  • @VedOnce
    @VedOnce3 жыл бұрын

    Can you please share knowledge on parallel mongo storage.

  • @mafiacodes

    @mafiacodes

    3 жыл бұрын

    what is parallel mongo storage ?

  • @VedOnce

    @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

    @mafiacodes

    3 жыл бұрын

    Better would be to use mongo atlas, since what u pay for individual machines would be more than atlas

  • @VedOnce

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

  • @eejayta-a3158
    @eejayta-a31582 жыл бұрын

    terminal location pls?

  • @yeucongnghe-f8
    @yeucongnghe-f89 күн бұрын

    product ready can not use "localhost"

  • @AbiodunSam
    @AbiodunSam Жыл бұрын

    How can you use database in production with credential? This shouldn't be titled production, but development.

  • @kingsite8328
    @kingsite83282 жыл бұрын

    How do you start multiple tabs on sigle machine

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    tabs of what?

  • @kingsite8328

    @kingsite8328

    2 жыл бұрын

    @@mafiacodes nvm got it....I meant multiple instances

  • @mohit9783

    @mohit9783

    2 жыл бұрын

    @@kingsite8328 how did you do it?

  • @tareqmahmud3902
    @tareqmahmud39027 ай бұрын

    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

  • @saidinesh6733
    @saidinesh67332 жыл бұрын

    I'm getting error like count failed

  • @mafiacodes

    @mafiacodes

    2 жыл бұрын

    Exact error?

  • @haiffy
    @haiffyАй бұрын

    Setup for production deployment, but doesn't even mention security and authentication?

  • @spacecorp1669
    @spacecorp1669 Жыл бұрын

    Doesn't Work !

  • @amitnota5189
    @amitnota5189 Жыл бұрын

    abee tujhe hindi nhi aati kya ?

  • @sa123p
    @sa123p2 жыл бұрын

    Thanks. It is very informative for me.