Grokking MongoDB
0% completed
Replica Set Members
Why would a replica set include a server that stores no data and can never answer a query? The answer depends on how a set chooses its primary, so that is where we begin. We will use a three-member set named rs0, as in the previous lesson, and then change its members one at a time.
How Members Get Their Roles
You do not assign the primary role yourself. You list the members, and the members elect one of them. The previous lesson added members one at a time with rs.add(). On newly started servers, you can also name them all in one rs.initiate() call:
rs.initiate({
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%