Why we need to use Odd number of nodes in MongoDB ReplicaSet
  • Reads 363
  • Votes 0
  • Parts 1
  • Time <5 mins
  • Reads 363
  • Votes 0
  • Parts 1
  • Time <5 mins
Ongoing, First published Oct 05, 2017
In MongoDB  ReplicaSet, the voting is done by a majority of voting members.

Imagine a Replica Set with three (voting) members. Let's say that Node A is primary, and nodes B+C are secondaries. Node A goes down, so nodes B+C go to election. They still do form a majority (two out of three). The election is first decided by priority. If both Nodes B & C have the same priority, then the one who is most up to date in respect to the failed primary (oplog) wins. Let's say it's Node B.
All Rights Reserved
Sign up to add Why we need to use Odd number of nodes in MongoDB ReplicaSet to your library and receive updates
or
#11mongodb
Content Guidelines
You may also like
Slide 1 of 1
Wendizzy's Writer Room cover

Wendizzy's Writer Room

2 parts Ongoing

In this book, you'll get a behind the scenes look at how your favorite characters were born, my creative process, and the dirty details never before revealed. Tex's Camp Q&A: Come sit by the fire and ask me whatever you'd like. We can roast marshmallows, tell scary stories, and hang out in the comments like a big, happy family. Gator's Backstage Pass: A place full of secrets. Learn the-sometimes embarrassing-details on how my wildest scenes came to life, facts about the characters, the process, and myself.