MongoDB Questions and Answers – Cluster Deployment

«
»

This set of MongoDB Multiple Choice Questions & Answers (MCQs) focuses on “Cluster Deployment”.

1. The ________ collection stores a document for each change to the metadata of a sharded collection.
a) version
b) changelog
c) settings
d) all of the mentioned
View Answer

Answer: b
Explanation: The config database is internal: applications and administrators should not modify or depend upon its content in the course of normal operation.

2. Point out the correct statement.
a) The local database supports sharded cluster operation
b) The config database is a dependable API, and users should not write data to the config database in the course of normal operation or maintenance
c) Modification of the config database on a functioning system may lead to instability or inconsistent data sets
d) All of the mentioned
View Answer

Answer: c
Explanation: If you must modify the config database, use mongodump to create a full backup of the config database.

advertisement

3. The _________ collection stores a document for each sharded collection in the cluster.
a) help
b) shards
c) collections
d) all of the mentioned
View Answer

Answer: c
Explanation: Shard keys are immutable and cannot be changed after insertion.

4. You can return a list of the collections, with the following helper ______________
a) show collects
b) show collection
c) show collections
d) all of the mentioned
View Answer

Answer: c
Explanation: To access the config database, connect to a mongos instance in a sharded cluster, and use the following helper: use config.

advertisement
advertisement

5. Point out the wrong statement.
a) Database servers store the metadata for a sharded cluster
b) Always back up the config database before doing any maintenance on the config server
c) The mongos instances cache metadata and use it to route read and write operations to shards
d) None of the mentioned
View Answer

Answer: a
Explanation: The metadata reflects state and organization of the sharded data sets and system.

6. ________ is a string that holds the address of the client, a mongos instance that initiates this change.
a) config.changelog.serverAddr
b) config.changelog.clientAddr
c) config.changelog.time
d) all of the mentioned
View Answer

Answer: b
Explanation: config.changelog.time is ISODate timestamp that reflects when the change occurred.

advertisement

7. The _______ collection keeps track of the active components in the sharded cluster.
a) deploys
b) lockpings
c) locks
d) all of the mentioned
View Answer

Answer: b
Explanation: The locks collection stores a distributed lock.

8. If the collection is empty then MongoDB will create the index as part of the ________
a) shardCollectionkey()
b) shardCollection()
c) keyCollection()
d) all of the mentioned
View Answer

Answer: b
Explanation: MongoDB provides no method to deactivate sharding for a collection after calling shardCollection.

advertisement

9. Changing the _______ option will change the port that mongod listens for incoming connections on.
a) –shardsrvkey
b) –shardsrv
c) –shard
d) All of the mentioned
View Answer

Answer: b
Explanation: The single-shard cluster is now a non-sharded replica set that will accept read and write operations on the data set.

10. The _____________ collection holds documents for each tagged shard key range in the cluster.
a) tags
b) databases
c) version
d) none of the mentioned
View Answer

Answer: a
Explanation: The version collection holds the current metadata version number.

advertisement

Sanfoundry Global Education & Learning Series – MongoDB.

Here’s the list of Best Reference Books in MongoDB.

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!
advertisement
advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn | Youtube | Instagram | Facebook | Twitter