ડેટા પાર્ટીશનિંગ (શાર્ડિંગ) ડેટાને બહુવિધ સર્વર્સ/ડેટાબેસ પર વિભાજિત કરે છે જેથી દરેક એક સબસેટ ધરાવે — આડી સ્કેલિંગ ડેટાના અને લોડના એક સર્વર તેમજ આગળ સક્ષમ બનાવે છે. પાર્ટીશનિંગ કેવી રીતે કરવું (પાર્ટીશન કી અને વ્યૂહ) તેનો પસંદગી નિર્ણાયક છે.
પાર્ટીશનિંગ/શાર્ડિંગ શું છે
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)
