Redis Cluster कई Redis nodes में data sharding करके horizontal scaling को सक्षम बनाता है — dataset (और load) को distribute करता है ताकि Redis एक single server की memory से परे data और throughput संभाल सके। यह hash slots के माध्यम से data को partition करता है और built-in high availability प्रदान करता है।
hash slots के माध्यम से sharding
Redis Cluster divides the keyspace into 16384 HASH SLOTS.
→ each key maps to a slot: slot = CRC16(key) mod 16384
→ slots are distributed across the cluster's primary nodes
→ each node owns a subset of slots (and thus a subset of the data)
→ This spreads data and load across nodes → scales memory and throughput horizontally.
