<section>
 <h1 class="contains-headerlink leafygreen-ui-41fr9s" weight="medium">
  Self-Managed Replica Set Configuration
  <a class="headerlink leafygreen-ui-1kepx47" href="#self-managed-replica-set-configuration" title="Permalink to this heading">
   <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
    <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
    </path>
    <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
    </path>
   </svg>
   <div class="css-1btu0w3 evvkmar0" id="self-managed-replica-set-configuration">
   </div>
  </a>
 </h1>
 <div class="leafygreen-ui-a5yxub">
  <p class="css-1cmx2d4 ef7gu8j0">
   On this page
  </p>
  <ul class="css-1qb0mst ef7gu8j1">
   <li class="leafygreen-ui-1e7a0ei">
    <a class="lg-ui-0001 leafygreen-ui-e98ikf" href="#replica-set-configuration-document-example" target="_self">
     <span>
      Replica Set Configuration Document Example
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#replica-set-configuration-fields" target="_self">
     <span>
      Replica Set Configuration Fields
     </span>
    </a>
   </li>
  </ul>
 </div>
 <p class="leafygreen-ui-1kp3ins">
  You can access the configuration of a
  <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-replica-set">
   replica set
  </a>
  using the
  <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.conf/#mongodb-method-rs.conf">
   <code class="leafygreen-ui-1l06pbn">
    rs.conf()
   </code>
  </a>
  method or the
  <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetConfig/#mongodb-dbcommand-dbcmd.replSetGetConfig">
   <code class="leafygreen-ui-1l06pbn">
    replSetGetConfig
   </code>
  </a>
  command.
 </p>
 <p class="leafygreen-ui-1kp3ins">
  To modify the configuration for a replica set, use the
  <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
   <code class="leafygreen-ui-1l06pbn">
    rs.reconfig()
   </code>
  </a>
  method, passing a configuration document to the
method. See
  <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
   <code class="leafygreen-ui-1l06pbn">
    rs.reconfig()
   </code>
  </a>
  for more information.
 </p>
 <div class="leafygreen-ui-1sjx7ru" role="note">
  <h2 class="leafygreen-ui-29m78u">
   Warning
  </h2>
  <div class="leafygreen-ui-9mycqc">
   <p class="leafygreen-ui-1kp3ins">
    Avoid reconfiguring replica sets that contain members of different
MongoDB versions as validation rules may differ across MongoDB versions.
   </p>
  </div>
 </div>
 <span class="leafygreen-ui-1qnjd6d" id="std-label-replica-set-configuration-settings">
 </span>
 <span class="leafygreen-ui-1qnjd6d" id="std-label-replica-set-configuration-document">
 </span>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Replica Set Configuration Document Example
   <a class="headerlink leafygreen-ui-1kepx47" href="#replica-set-configuration-document-example" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="replica-set-configuration-document-example">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   The following document provides a representation of a replica set
configuration document. The configuration of your replica set may
include only a subset of these settings:
  </p>
  <script class="structured_data" type="application/ld+json">
   {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{\n  _id: &lt;string&gt;,\n  version: &lt;int&gt;,\n  term: &lt;int&gt;,\n  protocolVersion: &lt;number&gt;,\n  writeConcernMajorityJournalDefault: &lt;boolean&gt;,\n  configsvr: &lt;boolean&gt;,\n  members: [\n    {\n      _id: &lt;int&gt;,\n      host: &lt;string&gt;,\n      arbiterOnly: &lt;boolean&gt;,\n      buildIndexes: &lt;boolean&gt;,\n      hidden: &lt;boolean&gt;,\n      priority: &lt;number&gt;,\n      tags: &lt;document&gt;,\n      secondaryDelaySecs: &lt;int&gt;,\n      votes: &lt;number&gt;\n    },\n    ...\n  ],\n  settings: {\n    chainingAllowed : &lt;boolean&gt;,\n    heartbeatIntervalMillis : &lt;int&gt;,\n    heartbeatTimeoutSecs: &lt;int&gt;,\n    electionTimeoutMillis : &lt;int&gt;,\n    catchUpTimeoutMillis : &lt;int&gt;,\n    getLastErrorModes : &lt;document&gt;,\n    getLastErrorDefaults : &lt;document&gt;,\n    replicaSetId: &lt;objectid&gt;\n  }\n}"}
  </script>
  <div class="css-16lmvu9">
   <div class="leafygreen-ui-196mwvg">
    <div class="leafygreen-ui-yzcs8i">
     <pre class="leafygreen-ui-11itue3" tabindex="-1"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  _id: &lt;string&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  version: &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  term: &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  protocolVersion: &lt;number&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  writeConcernMajorityJournalDefault: &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  configsvr: &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  members: [</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    {</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      _id: &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      host: &lt;string&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      arbiterOnly: &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      buildIndexes: &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      hidden: &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      priority: &lt;number&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      tags: &lt;document&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      secondaryDelaySecs: &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      votes: &lt;number&gt;</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    },</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    ...</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  ],</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  settings: {</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    chainingAllowed : &lt;boolean&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    heartbeatIntervalMillis : &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    heartbeatTimeoutSecs: &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    electionTimeoutMillis : &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    catchUpTimeoutMillis : &lt;int&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    getLastErrorModes : &lt;document&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    getLastErrorDefaults : &lt;document&gt;,</td></tr><tr class=""><td class="leafygreen-ui-7razhx">    replicaSetId: &lt;ObjectId&gt;</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  }</td></tr><tr class=""><td class="leafygreen-ui-7razhx">}</td></tr></tbody></table></code></pre>
     <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
      <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
       <div class="leafygreen-ui-xhlipt">
        <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
         <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
         </path>
        </svg>
       </div>
      </button>
     </div>
    </div>
   </div>
  </div>
  <span class="leafygreen-ui-1qnjd6d" id="std-label-replSetGetConfig-output">
  </span>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Replica Set Configuration Fields
   <a class="headerlink leafygreen-ui-1kepx47" href="#replica-set-configuration-fields" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="replica-set-configuration-fields">
    </div>
   </a>
  </h2>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     _id
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf._id" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf._id">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : string
    </p>
    <p class="leafygreen-ui-1kp3ins">
     The name of the replica set.
    </p>
    <p class="leafygreen-ui-1kp3ins">
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf._id" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        _id
       </code>
      </span>
     </a>
     <em>
      must
     </em>
     be identical to the
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-replication.replSetName">
      <code class="leafygreen-ui-1l06pbn">
       replication.replSetName
      </code>
     </a>
     or the value of
     <code class="leafygreen-ui-1l06pbn">
      --replSet
     </code>
     specified to
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
      <code class="leafygreen-ui-1l06pbn">
       mongod
      </code>
     </a>
     on the command line.
    </p>
    <div class="leafygreen-ui-13vw3ie" role="note">
     <h2 class="leafygreen-ui-1fn4p2b">
      Tip
     </h2>
     <h3 class="leafygreen-ui-144d5kf">
      <strong>
       See:
      </strong>
     </h3>
     <div class="leafygreen-ui-9mycqc">
      <p class="leafygreen-ui-1kp3ins">
       <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-replication.replSetName">
        <code class="leafygreen-ui-1l06pbn">
         replSetName
        </code>
       </a>
       or
       <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--replSet">
        <code class="leafygreen-ui-1l06pbn">
         --replSet
        </code>
       </a>
       for information on setting the replica set name.
      </p>
     </div>
    </div>
   </dd>
  </dl>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     version
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.version" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.version">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : int
    </p>
    <p class="leafygreen-ui-1kp3ins">
     An incrementing number used to distinguish revisions of the replica
set configuration document from previous iterations of the
configuration.
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Replica set members use
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     and
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.version" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        version
       </code>
      </span>
     </a>
     to
achieve consensus on the "newest" replica configuration. When
members compare replica configuration documents, the configuration
document with a larger
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     is considered the "newest".
If
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     is the same or absent, the configuration
document with the larger
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.version" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        version
       </code>
      </span>
     </a>
     is considered "newest".
    </p>
   </dd>
  </dl>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     term
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.term" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.term">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : int
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Only available with
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setFeatureCompatibilityVersion/#std-label-view-fcv">
      featureCompatibilityVersion (fCV) "4.4"
     </a>
     or later.
    </p>
    <p class="leafygreen-ui-1kp3ins">
     An incrementing number used to distinguish revisions of the replica
set configuration document from previous iterations of the
configuration. The
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     of a configuration document matches
the term of the replica set
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
      primary
     </a>
     which performed the
reconfiguration. The
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
      primary
     </a>
     increments its term each time it
steps up after winning an election. The primary ignores the
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     field if set explicitly in the
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetReconfig/#mongodb-dbcommand-dbcmd.replSetReconfig">
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </a>
     operation.
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Issuing a
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetReconfig/#std-label-replSetReconfig-cmd-force">
      force
     </a>
     reconfiguration
removes the
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     field. When the primary next issues
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetReconfig/#mongodb-dbcommand-dbcmd.replSetReconfig">
      <code class="leafygreen-ui-1l06pbn">
       replSetReconfig
      </code>
     </a>
     <em>
      without
     </em>
     force, it sets the
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     to its own term.
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Replica set members use
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     and
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.version" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        version
       </code>
      </span>
     </a>
     to
achieve consensus on the "newest" replica configuration. When members
compare replica configuration documents, the configuration document
with a larger
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     is considered the "newest". If
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.term" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        term
       </code>
      </span>
     </a>
     is the same or absent, the configuration document with
the larger
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.version" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        version
       </code>
      </span>
     </a>
     is considered "newest".
    </p>
   </dd>
  </dl>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     configsvr
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.configsvr" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.configsvr">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : boolean
    </p>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Default
     </em>
     : false
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Indicates whether the replica set is used for a sharded cluster's
config servers. Set to
     <code class="leafygreen-ui-1l06pbn">
      true
     </code>
     if the replica set is for a sharded
cluster's config servers.
    </p>
   </dd>
  </dl>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     protocolVersion
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.protocolVersion" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.protocolVersion">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : number
    </p>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Default
     </em>
     : 1
    </p>
    <p class="leafygreen-ui-1kp3ins">
     MongoDB only supports
     <code class="leafygreen-ui-1l06pbn">
      protocolVersion: 1
     </code>
     and no longer supports
     <code class="leafygreen-ui-1l06pbn">
      protocolVersion: 0
     </code>
     .
    </p>
    <div class="leafygreen-ui-13vw3ie" role="note">
     <h2 class="leafygreen-ui-1fn4p2b">
      Tip
     </h2>
     <h3 class="leafygreen-ui-144d5kf">
      <strong>
       See also:
      </strong>
     </h3>
     <div class="leafygreen-ui-9mycqc">
      <p class="leafygreen-ui-1kp3ins">
       <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-set-protocol-versions/">
        Self-Managed Replica Set Protocol Version
       </a>
      </p>
     </div>
    </div>
   </dd>
  </dl>
  <dl class="rsconf">
   <dt>
    <code class="leafygreen-ui-1l06pbn">
     writeConcernMajorityJournalDefault
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" title="Permalink to this definition">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault">
     </div>
    </a>
   </dt>
   <dd>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Type
     </em>
     : boolean
    </p>
    <p class="leafygreen-ui-1kp3ins">
     <em>
      Default
     </em>
     : true
    </p>
    <p class="leafygreen-ui-1kp3ins">
     Determines the behavior of
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
      <code class="leafygreen-ui-1l06pbn">
       { w: "majority" }
      </code>
     </a>
     write concern if the write concern does not explicitly
specify the journal option
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-wc-j">
      j
      <!-- -->
      .
     </a>
    </p>
    <p class="leafygreen-ui-1kp3ins">
     The following table lists the
     <code class="leafygreen-ui-1l06pbn">
      writeConcernMajorityJournalDefault
     </code>
     values and the associated
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
      <code class="leafygreen-ui-1l06pbn">
       { w: "majority" }
      </code>
     </a>
     behavior:
    </p>
    <div class="leafygreen-ui-skkc39" tabindex="0">
     <table class="leafygreen-ui-hr8lsv">
      <colgroup>
       <col style="width:15%"/>
       <col style="width:85%"/>
      </colgroup>
      <thead class="leafygreen-ui-a9ho40">
       <tr data-testid="leafygreen-ui-header-row">
        <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           Value
          </div>
         </div>
        </th>
        <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
         <div class="leafygreen-ui-ui0te9">
          <div>
           <code class="leafygreen-ui-1l06pbn">
            { w: "majority" }
           </code>
           Behavior
          </div>
         </div>
        </th>
       </tr>
      </thead>
      <tbody>
       <tr class="">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           true
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <p class="leafygreen-ui-1kp3ins">
            MongoDB acknowledges the write operation after a majority of
the voting members have written to the on-disk journal.
           </p>
           <p class="leafygreen-ui-1kp3ins">
            <strong class="css-rws738">
             IMPORTANT:
            </strong>
            All voting members of the replica set must
run with journaling when
            <code class="leafygreen-ui-1l06pbn">
             writeConcernMajorityJournalDefault
            </code>
            is
            <code class="leafygreen-ui-1l06pbn">
             true
            </code>
            .
           </p>
           <p class="leafygreen-ui-1kp3ins">
            If any voting member of a replica set uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory
storage engine
            </a>
            , you must set
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            to
            <code class="leafygreen-ui-1l06pbn">
             false
            </code>
            .
           </p>
           <p class="leafygreen-ui-1kp3ins">
            If any voting member of a replica set uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory
storage engine
            </a>
            and
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            is
            <code class="leafygreen-ui-1l06pbn">
             true
            </code>
            ,
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
             <code class="leafygreen-ui-1l06pbn">
              "majority"
             </code>
            </a>
            write operations may fail. These include
operations that inherently use
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
             <code class="leafygreen-ui-1l06pbn">
              "majority"
             </code>
            </a>
            write
concern, such as the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetStepDown/#mongodb-dbcommand-dbcmd.replSetStepDown">
             <code class="leafygreen-ui-1l06pbn">
              replSetStepDown
             </code>
            </a>
            command, or
various
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               mongosh
              </code>
             </span>
            </a>
            methods that by default use
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
             <code class="leafygreen-ui-1l06pbn">
              "majority"
             </code>
            </a>
            write concern, such as
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/js-user-management/">
             user
management methods
            </a>
            and
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/js-role-management/">
             role management methods
             <!-- -->
             .
            </a>
           </p>
           <p class="leafygreen-ui-1kp3ins">
            Starting in version 4.2 (and 4.0.13 and 3.6.14 ), if a replica set
member uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory storage engine
            </a>
            (voting or non-voting) but the replica set has
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            set to true, the
replica set member logs a startup warning.
           </p>
          </div>
         </div>
        </td>
       </tr>
       <tr class="">
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           false
          </div>
         </div>
        </td>
        <td class="leafygreen-ui-1drjk7h">
         <div class="leafygreen-ui-1n4j8xf">
          <div>
           <p class="leafygreen-ui-1kp3ins">
            MongoDB acknowledges the write operation after a majority of
the voting members have applied the operation in
memory.
           </p>
           <p class="leafygreen-ui-1kp3ins">
            <strong class="css-4dei7l">
             WARNING:
            </strong>
           </p>
           <p class="leafygreen-ui-1kp3ins">
            If any voting member of a replica set uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory
storage engine
            </a>
            , you must set
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            to
            <code class="leafygreen-ui-1l06pbn">
             false
            </code>
            .
           </p>
           <p class="leafygreen-ui-1kp3ins">
            Starting in version 4.2 (and 4.0.13 and 3.6.14 ), if a replica set
member uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory storage engine
            </a>
            (voting or non-voting) but the replica set has
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            set to true, the
replica set member logs a startup warning.
           </p>
           <p class="leafygreen-ui-1kp3ins">
            You cannot run transactions on a sharded cluster that has a shard
with
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.writeConcernMajorityJournalDefault" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               writeConcernMajorityJournalDefault
              </code>
             </span>
            </a>
            set to
            <code class="leafygreen-ui-1l06pbn">
             false
            </code>
            (such as a shard with a voting member that uses the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/inmemory/#std-label-storage-inmemory">
             in-memory
storage engine
            </a>
            ).
           </p>
          </div>
         </div>
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <div class="leafygreen-ui-13vw3ie" role="note">
     <h2 class="leafygreen-ui-1fn4p2b">
      Tip
     </h2>
     <h3 class="leafygreen-ui-144d5kf">
      <strong>
       See also:
      </strong>
     </h3>
     <div class="leafygreen-ui-9mycqc">
      <ul class="leafygreen-ui-rioki0">
       <li class="leafygreen-ui-d7p7b6">
        <p class="leafygreen-ui-1kp3ins">
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-wc-ack-behavior">
          Acknowledgment Behavior
         </a>
        </p>
       </li>
       <li class="leafygreen-ui-d7p7b6">
        <p class="leafygreen-ui-1kp3ins">
         <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-set-protocol-versions/">
          Self-Managed Replica Set Protocol Version
         </a>
        </p>
       </li>
      </ul>
     </div>
    </div>
   </dd>
  </dl>
  <span class="leafygreen-ui-1qnjd6d" id="std-label-replica-set-configuration-buildIndexes">
  </span>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    <code class="leafygreen-ui-1l06pbn">
     members
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#members" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="members">
     </div>
    </a>
   </h3>
   <dl class="rsconf">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      members
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Type
      </em>
      : array
     </p>
     <p class="leafygreen-ui-1kp3ins">
      An array of member configuration documents, one for each member
of the replica set. The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         members
        </code>
       </span>
      </a>
      array
is a zero-indexed array.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Each member-specific configuration document can contain the following
fields:
     </p>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n]._id
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-._id" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-._id">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : integer
       </p>
       <p class="leafygreen-ui-1kp3ins">
        An integer identifier for the member in the replica set, unique
among all members.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Starting in MongoDB 5.0, values may be any integer value greater
than or equal to
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        . Previously, this value was limited to an
integer between
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        and
        <code class="leafygreen-ui-1l06pbn">
         255
        </code>
        inclusive.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Each replica set member must have a unique
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-._id" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           _id
          </code>
         </span>
        </a>
        . Avoid re-using
        <code class="leafygreen-ui-1l06pbn">
         _id
        </code>
        values
        <em>
         even if
        </em>
        no
        <code class="leafygreen-ui-1l06pbn">
         members[n]
        </code>
        entry is using that
        <code class="leafygreen-ui-1l06pbn">
         _id
        </code>
        in
the current configuration.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Once set, you cannot change the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-._id" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           _id
          </code>
         </span>
        </a>
        of a member.
       </p>
       <div class="leafygreen-ui-15mdk4" role="note">
        <h2 class="leafygreen-ui-6n7b7d">
         Note
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          When updating the replica configuration object, access the replica set
members in the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members
            </code>
           </span>
          </a>
          array with the
          <strong>
           array index
          </strong>
          . The array index begins with
          <code class="leafygreen-ui-1l06pbn">
           0
          </code>
          . Do
          <strong>
           not
          </strong>
          confuse
this index value with the value of the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-._id" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n]._id
            </code>
           </span>
          </a>
          field in each document in
the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members
            </code>
           </span>
          </a>
          array.
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].host
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.host" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.host">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : string
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The hostname and, if specified, the port number, of the set
member.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The hostname name must be resolvable for every host in the
replica set.
       </p>
       <div class="leafygreen-ui-1sjx7ru" role="note">
        <h2 class="leafygreen-ui-29m78u">
         Warning
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.host" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].host
            </code>
           </span>
          </a>
          cannot hold a
value that resolves to
          <code class="leafygreen-ui-1l06pbn">
           localhost
          </code>
          or the local interface
unless
          <em>
           all
          </em>
          members of the set are on hosts that resolve to
          <code class="leafygreen-ui-1l06pbn">
           localhost
          </code>
          .
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].arbiterOnly
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.arbiterOnly" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.arbiterOnly">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : boolean
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : false
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A boolean that identifies an arbiter. A value of
        <code class="leafygreen-ui-1l06pbn">
         true
        </code>
        indicates that the member is an arbiter.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        When using the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.addArb/#mongodb-method-rs.addArb">
         <code class="leafygreen-ui-1l06pbn">
          rs.addArb()
         </code>
        </a>
        method to add an arbiter,
the method automatically sets
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.arbiterOnly" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           members[n].arbiterOnly
          </code>
         </span>
        </a>
        to
        <code class="leafygreen-ui-1l06pbn">
         true
        </code>
        for the added member.
       </p>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].buildIndexes
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.buildIndexes" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.buildIndexes">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : boolean
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : true
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A boolean that indicates whether the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
         <code class="leafygreen-ui-1l06pbn">
          mongod
         </code>
        </a>
        builds
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-index">
         indexes
        </a>
        on this member. You can only set this
value when adding a member to a replica set. You cannot change
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.buildIndexes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           members[n].buildIndexes
          </code>
         </span>
        </a>
        field after
the member has been added to the set. To add a member, see
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.add/#mongodb-method-rs.add">
         <code class="leafygreen-ui-1l06pbn">
          rs.add()
         </code>
        </a>
        and
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.reconfig/#mongodb-method-rs.reconfig">
         <code class="leafygreen-ui-1l06pbn">
          rs.reconfig()
         </code>
         .
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Do not set to
        <code class="leafygreen-ui-1l06pbn">
         false
        </code>
        for
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
         <code class="leafygreen-ui-1l06pbn">
          mongod
         </code>
        </a>
        instances that receive
queries from clients.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Setting
        <code class="leafygreen-ui-1l06pbn">
         buildIndexes
        </code>
        to
        <code class="leafygreen-ui-1l06pbn">
         false
        </code>
        may be useful if
        <strong>
         all
        </strong>
        the following conditions are true:
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          you are only using this instance to perform backups using
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/database-tools/mongodump/#mongodb-binary-bin.mongodump" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             mongodump
            </code>
           </span>
          </a>
          ,
          <em>
           and
          </em>
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          this member will receive no queries,
          <em>
           and
          </em>
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          index creation and maintenance overburdens the host
system.
         </p>
        </li>
       </ul>
       <p class="leafygreen-ui-1kp3ins">
        Even if set to
        <code class="leafygreen-ui-1l06pbn">
         false
        </code>
        , secondaries
        <em>
         will
        </em>
        build indexes on the
        <code class="leafygreen-ui-1l06pbn">
         _id
        </code>
        field in order to facilitate operations required for
replication.
       </p>
       <div class="leafygreen-ui-1sjx7ru" role="note">
        <h2 class="leafygreen-ui-29m78u">
         Warning
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          If you set
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.buildIndexes" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].buildIndexes
            </code>
           </span>
          </a>
          to
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          , you must also set
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.priority" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].priority
            </code>
           </span>
          </a>
          to
          <code class="leafygreen-ui-1l06pbn">
           0
          </code>
          . If
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.priority" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].priority
            </code>
           </span>
          </a>
          is not
          <code class="leafygreen-ui-1l06pbn">
           0
          </code>
          , MongoDB will return an error when attempting to add a
member with
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.buildIndexes" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].buildIndexes
            </code>
           </span>
          </a>
          equal to
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          .
         </p>
         <p class="leafygreen-ui-1kp3ins">
          To ensure the member receives no queries, you should make all
instances that do not build indexes hidden.
         </p>
         <p class="leafygreen-ui-1kp3ins">
          Other secondaries cannot replicate from a member where
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.buildIndexes" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             members[n].buildIndexes
            </code>
           </span>
          </a>
          is
false.
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].hidden
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.hidden" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.hidden">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : boolean
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : false
       </p>
       <p class="leafygreen-ui-1kp3ins">
        When this value is
        <code class="leafygreen-ui-1l06pbn">
         true
        </code>
        , the replica set hides this instance
and does not include the member in the output of
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/db.hello/#mongodb-method-db.hello">
         <code class="leafygreen-ui-1l06pbn">
          db.hello()
         </code>
        </a>
        or
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/hello/#mongodb-dbcommand-dbcmd.hello">
         <code class="leafygreen-ui-1l06pbn">
          hello
         </code>
        </a>
        . This prevents
read operations (i.e. queries) from ever reaching this host by
way of secondary
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-read-preference">
         read preference
         <!-- -->
         .
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Hidden members can acknowledge write operations
issued with
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-write-concern">
         Write Concern
        </a>
        . For write operations issued
with
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
         <code class="leafygreen-ui-1l06pbn">
          "majority"
         </code>
        </a>
        write concern, the member must
also be a voting member (i.e.
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           votes
          </code>
         </span>
        </a>
        is
greater than
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        ).
       </p>
       <div class="leafygreen-ui-13vw3ie" role="note">
        <h2 class="leafygreen-ui-1fn4p2b">
         Tip
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          See also:
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-hidden-member/#std-label-replica-set-hidden-members">
           Hidden Replica Set Members
          </a>
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].priority
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.priority" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.priority">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : Number between 0 and 1000 for primary/secondary; 0 or 1 for arbiters.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 1.0 for primary/secondary; 0 for arbiters.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A number that indicates the relative likelihood of a replica set
member to become the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
         primary
         <!-- -->
         .
        </a>
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          To increase the likelihood that a member becomes the primary,
specify a higher
          <code class="leafygreen-ui-1l06pbn">
           priority
          </code>
          value for that member.
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          To decrease the likelihood that a member becomes the primary,
specify a lower
          <code class="leafygreen-ui-1l06pbn">
           priority
          </code>
          value for that member.
         </p>
        </li>
       </ul>
       <p class="leafygreen-ui-1kp3ins">
        Changing a member's priority triggers one or more elections. The
election algorithm makes a best-effort attempt to elect the
highest-priority member the primary. However, a lower-priority
member may become the primary even if a higher-priority secondary
is available.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        If a lower-priority member becomes the primary, the server
continues to periodically call elections until the
highest-priority replica set member is the primary. The frequency
at which the elections occur depends on the difference in priority
between the elected member and the highest-priority member.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A member with a priority of
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        cannot become the primary.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Non-voting members (meaning members that have
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           votes
          </code>
         </span>
        </a>
        set to
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        ) must have a priority of
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        .
       </p>
       <div class="leafygreen-ui-13vw3ie" role="note">
        <h2 class="leafygreen-ui-1fn4p2b">
         Tip
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          See also:
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
         <ul class="leafygreen-ui-rioki0">
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-replica-set-elections">
             Replica Set Elections
            </a>
           </p>
          </li>
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-rs-election-priority">
             Member Priority
            </a>
           </p>
          </li>
         </ul>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].tags
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.tags" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.tags">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : document
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : none
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A
        <code class="leafygreen-ui-1l06pbn">
         tags
        </code>
        document contains user-defined tag field and value pairs for
the replica set member.
       </p>
       <script class="structured_data" type="application/ld+json">
        {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{ \"&lt;tag1&gt;\": \"&lt;string1&gt;\", \"&lt;tag2&gt;\": \"&lt;string2&gt;\",... }","programmingLanguage":"JavaScript"}
       </script>
       <div class="css-1lju8ps">
        <div class="leafygreen-ui-196mwvg">
         <div class="leafygreen-ui-1jheeh3">
          <pre class="leafygreen-ui-1agdxuk" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{ <span class="lg-highlight-string">"&lt;tag1&gt;"</span>: <span class="lg-highlight-string">"&lt;string1&gt;"</span>, <span class="lg-highlight-string">"&lt;tag2&gt;"</span>: <span class="lg-highlight-string">"&lt;string2&gt;"</span>,<!-- -->...<!-- --> }</td></tr></tbody></table></code></pre>
         </div>
        </div>
       </div>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          For read operations, you can specify a tag set in the
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/read-preference-tags/#std-label-replica-set-read-preference-tag-sets">
           read
preference
          </a>
          to direct the
operations to replica set member(s) with the specified tag(s).
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          For write operations, you can create a customize
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/">
           write concern
          </a>
          using
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.getLastErrorModes" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             settings.getLastErrorModes
            </code>
           </span>
          </a>
          and
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.getLastErrorDefaults" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             settings.getLastErrorDefaults
            </code>
            .
           </span>
          </a>
         </p>
        </li>
       </ul>
       <p class="leafygreen-ui-1kp3ins">
        For more information, see
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-replica-set-tag-sets/">
         Configure Replica Set Tag Sets
         <!-- -->
         .
        </a>
       </p>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].secondaryDelaySecs
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.secondaryDelaySecs" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.secondaryDelaySecs">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : integer
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 0
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The number of seconds "behind" the primary that this
replica set member should "lag".
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Use this option to create
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-delayed-member/#std-label-replica-set-delayed-members">
         delayed members
        </a>
        . Delayed members maintain a copy
of the data that reflects the state of the data at some time in
the past.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Delayed members can contribute to acknowledging write
operations issued with
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-write-concern">
         Write Concern
        </a>
        . However,
they return write acknowledgment no earlier than the configured
delay value. For write operations issued with
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
         <code class="leafygreen-ui-1l06pbn">
          "majority"
         </code>
        </a>
        write concern, the member must also be
a voting member (i.e.
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           votes
          </code>
         </span>
        </a>
        is greater than
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        ).
       </p>
       <div class="leafygreen-ui-13vw3ie" role="note">
        <h2 class="leafygreen-ui-1fn4p2b">
         Tip
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          See also:
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-delayed-member/">
           Delayed Replica Set Members
          </a>
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        members[n].votes
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.members-n-.votes" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.members-n-.votes">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : integer
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 1
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The number of votes a server will cast in a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/#std-label-replica-set-elections">
         replica set
election
        </a>
        . The number of votes each
member has is either
        <code class="leafygreen-ui-1l06pbn">
         1
        </code>
        or
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        , and
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-members/#std-label-replica-set-arbiters">
         arbiters
        </a>
        always have exactly
        <code class="leafygreen-ui-1l06pbn">
         1
        </code>
        vote.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Members with
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.priority" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           priority
          </code>
         </span>
        </a>
        greater than 0 cannot have
0
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           votes
          </code>
          .
         </span>
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A replica set can have up to
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/limits/#mongodb-limit-Number-of-Members-of-a-Replica-Set">
         50 members
        </a>
        but only 7 voting members.
If you need more than 7 members in one replica set, set
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           members[n].votes
          </code>
         </span>
        </a>
        to
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        for the
additional non-voting members.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Non-voting (i.e.
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.votes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           votes
          </code>
         </span>
        </a>
        is
        <code class="leafygreen-ui-1l06pbn">
         0
        </code>
        ) members must have
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.priority" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           priority
          </code>
         </span>
        </a>
        of 0.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Starting in MongoDB 5.0, a newly added secondary does not count as
a voting member and cannot be elected until it has reached
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/replica-states/#mongodb-replstate-replstate.SECONDARY">
         <code class="leafygreen-ui-1l06pbn">
          SECONDARY
         </code>
        </a>
        state.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Non-voting members cannot acknowledge write operations
issued with a
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#mongodb-writeconcern-writeconcern.-majority-">
         <code class="leafygreen-ui-1l06pbn">
          "majority"
         </code>
        </a>
        write concern.
       </p>
       <div class="leafygreen-ui-13vw3ie" role="note">
        <h2 class="leafygreen-ui-1fn4p2b">
         Tip
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          See also:
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
         <ul class="leafygreen-ui-rioki0">
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetStatus/#mongodb-data-replSetGetStatus.votingMembersCount">
             <code class="leafygreen-ui-1l06pbn">
              replSetGetStatus.votingMembersCount
             </code>
            </a>
           </p>
          </li>
          <li class="leafygreen-ui-d7p7b6">
           <p class="leafygreen-ui-1kp3ins">
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetGetStatus/#mongodb-data-replSetGetStatus.writableVotingMembersCount">
             <code class="leafygreen-ui-1l06pbn">
              replSetGetStatus.writableVotingMembersCount
             </code>
            </a>
           </p>
          </li>
         </ul>
        </div>
       </div>
      </dd>
     </dl>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    <code class="leafygreen-ui-1l06pbn">
     settings
    </code>
    <a class="headerlink leafygreen-ui-1kepx47" href="#settings" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="settings">
     </div>
    </a>
   </h3>
   <dl class="rsconf">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      settings
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Optional
      </em>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Type
      </em>
      : document
     </p>
     <p class="leafygreen-ui-1kp3ins">
      A document that contains configuration options that apply to the
whole replica set.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         settings
        </code>
       </span>
      </a>
      document contain the
following fields:
     </p>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.chainingAllowed
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.chainingAllowed" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.chainingAllowed">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : boolean
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : true
       </p>
       <p class="leafygreen-ui-1kp3ins">
        In MongoDB 5.0.1 and earlier, if
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.chainingAllowed" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           settings.chainingAllowed
          </code>
         </span>
        </a>
        is:
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          <code class="leafygreen-ui-1l06pbn">
           true
          </code>
          , replica set
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-secondary">
           secondary
          </a>
          members can
replicate data from other secondary members.
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          , secondary members can replicate data only from the
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
           primary
           <!-- -->
           .
          </a>
         </p>
        </li>
       </ul>
       <p class="leafygreen-ui-1kp3ins">
        Starting in MongoDB 5.0.2:
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          Replica set
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-secondary">
           secondary
          </a>
          members can
replicate data from other secondary members even if
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.chainingAllowed" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             settings.chainingAllowed
            </code>
           </span>
          </a>
          is
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          .
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          To override
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.chainingAllowed" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             settings.chainingAllowed
            </code>
           </span>
          </a>
          , set the
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.enableOverrideClusterChainingSetting">
           <code class="leafygreen-ui-1l06pbn">
            enableOverrideClusterChainingSetting
           </code>
          </a>
          server
parameter to
          <code class="leafygreen-ui-1l06pbn">
           true
          </code>
          .
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          The default for
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.enableOverrideClusterChainingSetting">
           <code class="leafygreen-ui-1l06pbn">
            enableOverrideClusterChainingSetting
           </code>
          </a>
          is
          <code class="leafygreen-ui-1l06pbn">
           false
          </code>
          .
         </p>
        </li>
       </ul>
       <div class="leafygreen-ui-13vw3ie" role="note">
        <h2 class="leafygreen-ui-1fn4p2b">
         Tip
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          See also:
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/manage-chained-replication/">
           Self-Managed Chained Replication
          </a>
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.getLastErrorDefaults
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.getLastErrorDefaults" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.getLastErrorDefaults">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : document
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Unavailable starting in MongoDB 5.0.
       </p>
       <div class="leafygreen-ui-85da11" role="note">
        <h2 class="leafygreen-ui-1ac4g5h">
         Important
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          Starting in MongoDB 5.0, you cannot specify a default write concern with
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.getLastErrorDefaults" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             settings.getLastErrorDefaults
            </code>
           </span>
          </a>
          other than the default of
          <code class="leafygreen-ui-1l06pbn">
           { w: 1, wtimeout: 0 }
          </code>
          . Instead, use the
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setDefaultRWConcern/#mongodb-dbcommand-dbcmd.setDefaultRWConcern">
           <code class="leafygreen-ui-1l06pbn">
            setDefaultRWConcern
           </code>
          </a>
          command to set the default read or
write concern configuration for a replica set or sharded cluster.
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.getLastErrorModes
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.getLastErrorModes" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.getLastErrorModes">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : document
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A document used to define a custom
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-write-concern">
         write concern
        </a>
        through the use of
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.members-n-.tags" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           members[n].tags
          </code>
         </span>
        </a>
        .
The custom write concern can provide
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-data-center-awareness">
         data-center awareness
         <!-- -->
         .
        </a>
       </p>
       <script class="structured_data" type="application/ld+json">
        {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{ getLastErrorModes: {\n   &lt;name&gt; : { &lt;tag1&gt;: &lt;number&gt;, .... },\n   ...\n} }"}
       </script>
       <div class="css-16lmvu9">
        <div class="leafygreen-ui-196mwvg">
         <div class="leafygreen-ui-1b1bvay">
          <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{ getLastErrorModes: {</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   &lt;name of write concern&gt; : { &lt;tag1&gt;: &lt;number&gt;, .... },</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   ...</td></tr><tr class=""><td class="leafygreen-ui-7razhx">} }</td></tr></tbody></table></code></pre>
          <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
           <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
            <div class="leafygreen-ui-xhlipt">
             <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
              <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
              </path>
             </svg>
            </div>
           </button>
          </div>
         </div>
        </div>
       </div>
       <p class="leafygreen-ui-1kp3ins">
        The
        <code class="leafygreen-ui-1l06pbn">
         &lt;number&gt;
        </code>
        refers to the number of different tag values
required to satisfy the write concern. For example, the following
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.getLastErrorModes" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           settings.getLastErrorModes
          </code>
         </span>
        </a>
        defines a write concern
named
        <code class="leafygreen-ui-1l06pbn">
         datacenter
        </code>
        that requires the write to propagate to two
members whose
        <code class="leafygreen-ui-1l06pbn">
         dc
        </code>
        tag values differ.
       </p>
       <script class="structured_data" type="application/ld+json">
        {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{ getLastErrorModes: { datacenter: { \"dc\": 2 } } }"}
       </script>
       <div class="css-16lmvu9">
        <div class="leafygreen-ui-196mwvg">
         <div class="leafygreen-ui-yzcs8i">
          <pre class="leafygreen-ui-1q4bxgx" tabindex="-1"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{ getLastErrorModes: { datacenter: { "dc": 2 } } }</td></tr></tbody></table></code></pre>
          <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
           <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
            <div class="leafygreen-ui-xhlipt">
             <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
              <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
              </path>
             </svg>
            </div>
           </button>
          </div>
         </div>
        </div>
       </div>
       <p class="leafygreen-ui-1kp3ins">
        To use the custom write concern, pass in the write concern name
to the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/write-concern/#std-label-wc-w">
         <code class="leafygreen-ui-1l06pbn">
          w
         </code>
         Option
        </a>
        , e.g.
       </p>
       <script class="structured_data" type="application/ld+json">
        {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{ w: \"datacenter\" }"}
       </script>
       <div class="css-16lmvu9">
        <div class="leafygreen-ui-196mwvg">
         <div class="leafygreen-ui-yzcs8i">
          <pre class="leafygreen-ui-1q4bxgx" tabindex="-1"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{ w: "datacenter" }</td></tr></tbody></table></code></pre>
          <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
           <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
            <div class="leafygreen-ui-xhlipt">
             <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
              <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
              </path>
             </svg>
            </div>
           </button>
          </div>
         </div>
        </div>
       </div>
       <p class="leafygreen-ui-1kp3ins">
        See
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-replica-set-tag-sets/">
         Configure Replica Set Tag Sets
        </a>
        for more
information and example.
       </p>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.heartbeatTimeoutSecs
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.heartbeatTimeoutSecs" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.heartbeatTimeoutSecs">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : int
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 10
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Number of seconds that the replica set members wait for a
successful heartbeat from each other. If a member does not
respond in time, other members mark the delinquent member as
inaccessible.
       </p>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.electionTimeoutMillis
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.electionTimeoutMillis" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.electionTimeoutMillis">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : int
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 10000 (10 seconds)
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The time limit in milliseconds for detecting when a replica set's
primary is unreachable. This setting controls failover sensitivity
when using
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.protocolVersion" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           protocolVersion: 1
          </code>
         </span>
        </a>
        . You can
expect the failover timeout to not exceed the value of
        <code class="leafygreen-ui-1l06pbn">
         electionTimeoutMillis
        </code>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Consider the following when selecting a value:
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          Higher values result in slower failovers but decreased
sensitivity to primary node or network slowness or spottiness.
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          Lower values result in faster failover but increased
sensitivity to primary node or network slowness or spottiness.
         </p>
        </li>
       </ul>
       <p class="leafygreen-ui-1kp3ins">
        The setting only applies when using
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.protocolVersion" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           protocolVersion: 1
          </code>
          .
         </span>
        </a>
       </p>
       <div class="leafygreen-ui-15mdk4" role="note">
        <h2 class="leafygreen-ui-6n7b7d">
         Note
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          When you step down a primary using
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.stepDown/#mongodb-method-rs.stepDown">
           <code class="leafygreen-ui-1l06pbn">
            rs.stepDown()
           </code>
          </a>
          or
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetStepDown/#mongodb-dbcommand-dbcmd.replSetStepDown">
           <code class="leafygreen-ui-1l06pbn">
            replSetStepDown
           </code>
          </a>
          without setting the
          <code class="leafygreen-ui-1l06pbn">
           force
          </code>
          field to
          <code class="leafygreen-ui-1l06pbn">
           true
          </code>
          , the stepped-down primary nominates an eligible secondary
to call an election immediately.
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.catchUpTimeoutMillis
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.catchUpTimeoutMillis" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.catchUpTimeoutMillis">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : int
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : -1, infinite catchup time.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Time limit in milliseconds for a newly elected primary to sync
(catch up) with the other replica set members that may have more
recent writes. Infinite or high time limits may reduce the
amount of data that the other members would need to roll back
after an election but may increase the failover time.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The newly elected primary ends the catchup period early once it
is fully caught up with other members of the set. During the
catchup period, the newly elected primary is unavailable for
writes from clients. Use
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetAbortPrimaryCatchUp/#mongodb-dbcommand-dbcmd.replSetAbortPrimaryCatchUp">
         <code class="leafygreen-ui-1l06pbn">
          replSetAbortPrimaryCatchUp
         </code>
        </a>
        to abort the catchup then complete the transition to primary.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The setting only applies when using
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.protocolVersion" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           protocolVersion: 1
          </code>
          .
         </span>
        </a>
       </p>
      </dd>
     </dl>
     <span class="leafygreen-ui-1qnjd6d" id="std-label-repl-conf-catchup-takeover-delay">
     </span>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.catchUpTakeoverDelayMillis
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.catchUpTakeoverDelayMillis" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.catchUpTakeoverDelayMillis">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Optional
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : int
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Default
        </em>
        : 30000 (30 seconds)
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Time in milliseconds a node waits to initiate a
        <em>
         catchup takeover
        </em>
        after determining it is ahead of the current
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
         primary
        </a>
        . During a catchup takeover, the node ahead of the
current primary initiates an
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-election">
         election
        </a>
        to become the new
primary of the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-replica-set">
         replica set
         <!-- -->
         .
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        After the node initiating the takeover determines that it is
ahead of the current
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-primary">
         primary
        </a>
        , it waits the specified
number of milliseconds and then verifies the following:
       </p>
       <ol class="leafygreen-ui-rioki0" type="1">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          It is still ahead of the current primary,
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          It is the most up-to-date node among all available nodes,
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          The current primary is currently catching up to it.
         </p>
        </li>
       </ol>
       <p class="leafygreen-ui-1kp3ins">
        Once determining that all of these conditions are met, the node
initiating the takeover immediately runs for election.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        For more information on Replica
Set Elections, see
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/replica-set-elections/">
         Replica Set Elections
         <!-- -->
         .
        </a>
       </p>
       <div class="leafygreen-ui-15mdk4" role="note">
        <h2 class="leafygreen-ui-6n7b7d">
         Note
        </h2>
        <div class="leafygreen-ui-9mycqc">
         <p class="leafygreen-ui-1kp3ins">
          Setting
          <code class="leafygreen-ui-1l06pbn">
           catchUpTakeoverDelayMillis
          </code>
          to
          <code class="leafygreen-ui-1l06pbn">
           -1
          </code>
          disables
catchup takeover. Setting
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.catchUpTimeoutMillis" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             catchUpTimeoutMillis
            </code>
           </span>
          </a>
          to
          <code class="leafygreen-ui-1l06pbn">
           0
          </code>
          disables
          <em>
           primary catchup
          </em>
          and consequently also catchup
takeover.
         </p>
        </div>
       </div>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.heartbeatIntervalMillis
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.heartbeatIntervalMillis" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.heartbeatIntervalMillis">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Internal use only
        </em>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The frequency in milliseconds of the heartbeats.
       </p>
      </dd>
     </dl>
     <dl class="rsconf">
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        settings.replicaSetId
       </code>
       <a class="headerlink leafygreen-ui-1kepx47" href="#mongodb-rsconf-rsconf.settings.replicaSetId" title="Permalink to this definition">
        <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
         <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
         </path>
         <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
         </path>
        </svg>
        <div class="css-1btu0w3 evvkmar0" id="mongodb-rsconf-rsconf.settings.replicaSetId">
        </div>
       </a>
      </dt>
      <dd>
       <p class="leafygreen-ui-1kp3ins">
        <em>
         Type
        </em>
        : ObjectId
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The ObjectId associated with the replica set and automatically
created during
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/rs.initiate/#mongodb-method-rs.initiate">
         <code class="leafygreen-ui-1l06pbn">
          rs.initiate()
         </code>
        </a>
        or
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/replSetInitiate/#mongodb-dbcommand-dbcmd.replSetInitiate">
         <code class="leafygreen-ui-1l06pbn">
          replSetInitiate
         </code>
        </a>
        . You cannot change the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-rsconf-rsconf.settings.replicaSetId" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           replicaSetId
          </code>
          .
         </span>
        </a>
       </p>
      </dd>
     </dl>
    </dd>
   </dl>
  </section>
 </section>
</section>
