mongodb-operations-and-scaling
MongoDB Operations and Scaling
Purpose
MongoDB's replica-set and sharding architecture makes horizontal scaling and automatic failover a built-in capability rather than a bolted-on add-on, but that capability only holds up operationally if the shard key is chosen well, indexes match real query patterns, and the replica set's election and oplog settings match the workload's write volume and network reality. A bad shard key choice in particular is expensive to fix after the fact (it requires resharding or a full data migration in older versions), which makes it the single highest-leverage decision in this skill. This skill covers replica sets, sharding, index tuning, and day-2 maintenance; for validating a proposed replica-set or sharding config change before it reaches production, see mongodb-configuration-validation.