MongoDB Questions and Answers – Replica Set Members

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Replica Set Members”.

1. How many types of members exist in replica set?
a) 1
b) 2
c) 3
d) 4
View Answer

Answer: b
Explanation: There are two members in replica set-primary and secondary.

2. Point out the wrong statement.
a) Replication provides scalability and increases data redundancy
b) A replica set in MongoDB is a group of mongod processes that provide redundancy and high availability
c) You can also maintain an arbiter as part of a replica set
d) None of the mentioned
View Answer

Answer: a
Explanation: Data redundancy is reduced by replicating the copies of data.

3. Which of the member receives all write operations?
a) center
b) secondary
c) primary
d) none of the mentioned
View Answer

Answer: c
Explanation: The primary accepts all write operations from clients.

4. _________ replicate operations from the primary to maintain an identical data set.
a) center
b) secondary
c) primary
d) none of the mentioned
View Answer

Answer: b
Explanation: Secondaries may have additional configurations for special usage profiles.

advertisement
advertisement

5. Point out the wrong statement.
a) The minimum requirements for a replica set are: A primary, a secondary, and an arbiter
b) The primary is the only member in the replica set that receives write operations
c) Most deployments, however, will keep three members that store data: A primary and two secondary members
d) None of the mentioned
View Answer

Answer: d
Explanation: Secondary members replicate this oplog and apply the operations to their data sets.

6. _________ play a role in the elections that select a primary if the current primary is unavailable.
a) Arbiters
b) Replicators
c) Loggers
d) None of the mentioned
View Answer

Answer: a
Explanation: Arbiters do not keep a copy of the data.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

7. A replica set can have up to ______ members but only 7 voting members.
a) 10
b) 30
c) 50
d) 70
View Answer

Answer: d
Explanation: In previous versions, replica sets can have up to 12 members.

8. Which of the following may be non-voting or priority 0?
a) center
b) secondary
c) primary
d) none of the mentioned
View Answer

Answer: b
Explanation: All members of the replica set can accept read operations.

advertisement

9. If the current primary becomes unavailable, the replica set holds an ______ to choose which of the secondaries becomes the new primary.
a) election
b) replication
c) clasification
d) none of the mentioned
View Answer

Answer: a
Explanation: A secondary can become a primary.

10. By default, an application directs its ____ operations to the primary member.
a) read
b) write
c) read write
d) all of the mentioned
View Answer

Answer: a
Explanation: A replica set can have one or more secondaries.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Books in MongoDB.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.