Sharding shi ne hanyar MongoDB don jijiya kai tsaye — rarraba data a gefen sawaye-sawaye (shards) don database ya iya jari datasets da throughput wanda server guda ba zai iya. Yana rarraba data ta wajan shard key, tare da MongoDB yana tunarar bugun zuwa shards daidai.
Me yasa a yi sharding: girma fiye da server guda
A single server has limits (storage, RAM, write throughput). When data/load exceeds
what one server (even a powerful one) can handle, SHARDING distributes it:
→ data is split across multiple SHARDS (each a replica set)
→ each shard holds a SUBSET of the data → combined capacity scales horizontally
→ handles huge datasets and high write throughput
