Sharding అనేది MongoDB యొక్క horizontal scaling పద్ధతి — డేటాను బహుళ సర్వర్లు (shards) అంతటా పంపిణీ చేయడం, తద్వారా డేటాబేస్ ఒకే సర్వర్ నిర్వహించగలిగిన డేటాసెట్లు మరియు థ్రూపుట్ కంటే ఎక్కువను నిర్వహించగలదు. ఇది shard key ద్వారా డేటాను విభజిస్తుంది, MongoDB నిర్దిష్ట shards కి నిర్దేశించటానికి queries ను నిర్దేశిస్తుంది.
Shard ఎందుకు చేయాలి: ఒక సర్వర్ దాటి స్కేల్ చేయండి
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
