Which statement best describes horizontal scaling in a database system like MongoDB?
Think about spreading data and load across many machines instead of upgrading one.
Horizontal scaling means adding more servers to share the workload and data, improving capacity and fault tolerance.
In MongoDB horizontal scaling, what is the role of the config servers in a sharded cluster?
Think about which servers keep track of where data lives in the cluster.
Config servers store metadata about the cluster’s shards and chunk distribution, enabling routing of queries to correct shards.
Which horizontal scaling strategy best improves write throughput in a MongoDB cluster?
Consider how writes can be spread across multiple machines.
Sharding splits data and writes across multiple servers, increasing write throughput. Replica sets improve read scaling but not write capacity.
What is a key tradeoff when selecting a shard key for horizontal scaling in MongoDB?
Think about how data is spread across servers and what happens if it’s uneven.
A bad shard key causes some shards to hold much more data or traffic, creating bottlenecks and reducing scaling benefits.
You expect 1 million writes per minute and want to keep write latency low by horizontal scaling. If one shard can handle 100,000 writes per minute, how many shards do you need at minimum?
Divide total writes by writes per shard to find minimum shards needed.
1,000,000 writes / 100,000 writes per shard = 10 shards minimum to handle load without latency increase.