Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1488

Need clarification for voting internals of replica sets

    XMLWordPrintableJSON

Details

    Description

      To avoid confusion we need additional clarification on how our voting system works [checked with 2.4.2]:

      In order for the node to be elected as PRIMARY in a replica set, it needs to collect just a majority of votes (not the votes from the majority of nodes).

      That being said, if you have 3-node replica set with votes

      {15,1,1}

      and eventually it becomes split:

      {15}

      |

      {1,1}

      - then the one with 15 votes will elect himself as PRIMARY, and both 1-vote members will be SECONDARIES.
      And if instead of 15 you give the same node only 2 votes - there will be NO PRIMARY after split, because no node can get the majority [of votes].

      So users can think of additional votes for the server like they are just another mongod arbiter processes who share the same hardware with that server and vote altogether.

      Also I think that we could benefit from adding these links (or at least some additional info from them) to the page:
      http://openmymind.net/2012/1/7/Does-My-Replica-Set-Need-An-Arbiter/
      http://www.kchodorow.com/blog/2012/01/04/replica-set-internals-bootcamp-part-i-elections/

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            alex.komyagin@mongodb.com Alexander Komyagin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 41 weeks, 1 day ago