డేటా పార్టీషనింగ్ (షార్డింగ్) డేటాను బహుళ సర్వర్లు/డేటాబేసులలో విభజిస్తుంది కాబట్టి ప్రతి ఒక్కటి ఒక సబ్సెట్ను కలిగి ఉంటుంది — ఎకేక సర్వర్కు మించిన డేటా మరియు లోడ్ల సమాంతర స్కేలింగ్ను ప్రారంభిస్తుంది. పార్టీషనింగ్ని ఎలా చేయాలో (పార్టీషన్ కీ మరియు వ్యూహం) ఎంచుకోవడం విమర్శనాత్మకమైనది.
పార్టీషనింగ్/షార్డింగ్ ఏమిటి
PARTITIONING / SHARDING → divide data into pieces (partitions/shards) across multiple
servers, each holding a SUBSET:
→ no single server holds (or is overwhelmed by) all the data
→ scales STORAGE and LOAD horizontally (each shard handles its portion)
→ enables handling data/throughput beyond one machine's capacity
పార్టీషనింగ్ వ్యూహాలు
HASH-based → hash the partition key → assign to a shard:
✓ EVEN distribution (avoids hotspots) ✗ range queries hard; resharding is tricky
RANGE-based → partition by value ranges (e.g. A-M, N-Z; date ranges):
✓ efficient range queries ✗ risk of HOTSPOTS (uneven load if data/access is skewed)
DIRECTORY/lookup → a lookup table maps keys to shards (flexible, but the lookup is overhead)
GEOGRAPHIC → partition by region (data locality)
