Mongodb Certified Developer Associate C100dev · Free Practice Question Easy
Question 10
Which of the following is used by MongoDB to ensure high scalability?
-
A
write concern
-
B
sharding
-
C
replication
-
D
indexing
Reveal correct answer
Correct answer: B
A.
Write concern in MongoDB describes the level of acknowledgement requested from MongoDB for write operations to a standalone mongod or to replica sets or to sharded clusters. In other words, it's about how you balance speed and safety in your writes. It doesn't inherently ensure high scalability.
B.
Sharding is a method for distributing data across multiple machines. It is used by MongoDB to meet the demands of data growth and horizontal scaling by partitioning data across many servers, thus enhancing the capacity of MongoDB to manage large datasets and high throughput operations. Sharding is a key element in enabling MongoDB to scale out.
C.
Replication provides redundancy and increases data availability by keeping multiple copies of data on different database servers. It protects against data loss during a server failure. However, while replication can improve read scalability by allowing you to distribute reads across multiple nodes, it's not primarily about overall system scalability. It's more about data durability and availability.
D.
Indexing supports the efficient execution of queries in MongoDB. Without indexing, MongoDB must perform a collection scan, i.e., scan every document in a collection, to select those documents that match the query statement. With indexing, MongoDB can often limit its search to a smaller subset of the data, thereby increasing query performance. However, while indexes are crucial for performance, they do not in themselves provide high scalability.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
