डेटा पार्टिशनिङ (शार्डिङ) डेटालाई एक सिङ्गल सर्भरको बाहिर स्केल गर्न सक्षम बनाउन एकैका सर्भर/डाटाबेसहरूमा डेटा विभाजित गर्ता हरेकमा सबसेट राखी कार्यक्षम बनाउन सक्षम गर्दछ। पार्टिशनिङ कसरी गर्ने भन्ने निर्णय (पार्टिशन की र स्ट्र्याटेजी) अत्यन्त महत्वपूर्ण छ।
पार्टिशनिङ/शार्डिङ के हो
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)
