Redis Cluster abilita lo scaling orizzontale distribuendo i dati tramite sharding su più nodi Redis — distribuendo il dataset (e il carico) in modo che Redis possa gestire dati e throughput oltre la memoria di un singolo server. Partiziona i dati tramite hash slots e fornisce alta disponibilità integrata.
Sharding via hash slots
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.
