Configure Non-Voting Replica Set Member¶
Non-voting members allow you to add additional members for read distribution beyond the maximum seven voting members.
To configure a member as non-voting, use the
replSetReconfig command or its
mongo shell helper
rs.reconfig() to set its
members[n].priority values to
0. Non-voting replica set members must have a
Starting in MongoDB 4.4, replica reconfiguration can add or remove no
more than one voting replica set member at a time. To modify the
votes of multiple members, issue a series of
rs.reconfig() operations to
modify one member at a time. See
Reconfiguration Can Add or Remove No More than One Voting Member at a Time for more information.
The following procedure converts configures a single secondary
replica set member to be non-voting. To convert the primary
member to be non-voting, you must first successfully step the primary
replSetStepDown or its shell helper
rs.stepDown() before performing this procedure.