Redis Cluster متعدد Redis nodes میں ڈیٹا کو sharding کے ذریعے افقی سکیلنگ کو ممکن بناتا ہے — dataset اور load کو تقسیم کرتے ہوئے تاکہ Redis ایک سرور کی میموری سے زیادہ ڈیٹا اور throughput سنبھال سکے۔ یہ ڈیٹا کو hash slots کے ذریعے تقسیم کرتا ہے اور 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.
