MongoDB Questions and Answers Part-27

1. Which of the following storage engine is supported by default?
a) MMAPv1
b) WiredTiger
c) WirelessTiger
d) All of the mentioned

Answer: a
Explanation: MongoDB includes support for two storage engines: MMAPv1, the storage engine available in previous versions of MongoDB, and WiredTiger.

2. Point out the correct statement.
a) Replica set configuration is complex
b) MongoDB includes support for two storage engines
c) MongoDB includes support for more than three storage engines
d) All of the mentioned

Answer: b
Explanation: MMAPv1 provides collection-level locking.

3. All collections have a unique ________ lock that allows multiple clients to modify documents in different collections at the same time.
a) writer
b) readers-writer
c) readers
d) all of the mentioned

Answer: b
Explanation: Each database has a readers-writer lock that allows concurrent read access to a database, but gives exclusive access to a single write operation per database.

4. _________ supports concurrent access by readers and writers to the documents in a collection.
a) MMAPv1
b) WiredTiger
c) WirelessTiger
d) All of the mentioned

Answer: b
Explanation: Clients can read documents while write operations are in progress, and multiple threads can modify different documents in a collection at the same time.

5. MongoDB uses ________ logging to an on-disk journal.
a) write ahead
b) read ahead
c) write once
d) read only

Answer: a
Explanation: Leave journaling enabled in order to ensure that mongod will be able to recover its data files and keep the data files in a valid state following a crash.

6. _______ concern describes the guarantee that MongoDB provides when reporting on the success of a write operation.
a) Write
b) Read
c) Read only
d) SSD

Answer: a
Explanation: The strength of the write concerns determine the level of guarantee.

7. The ________ command returns information regarding the number of open connections.
a) connPoolStats
b) connStats
c) serverstats
d) none of the mentioned

Answer: a
Explanation: To avoid overloading the connection resources of a single mongod or mongos instance, ensure that clients maintain reasonable connection pool sizes.

8. ________ do not typically provide sufficient performance to support a MongoDB deployment.
a) RAID-5
b) RAID-10
c) RAID-7
d) None of the mentioned

Answer: a
Explanation: Most MongoDB deployments should use disks backed by RAID-10.

9. Which of the following should be avoided with MongoDB Deployments?
a) RAID-5
b) RAID-10
c) RAID-7
d) RAID-0

Answer: d
Explanation: While RAID-0 provides good write performance, it also provides limited availability and can lead to reduced performance on read operations, particularly when using Amazon’s EBS volumes.

10. With the WiredTiger storage engine, use of _______ is strongly recommended to avoid performance issues.
a) XFS
b) SSD
c) SST
d) All of the mentioned

Answer: a
Explanation: Some Linux distributions require different versions of the kernel to support using XFS.