03 / 04

In Redis Cluster, explain how keys are distributed and what happens during a resharding.

Redis Cluster uses 16384 hash slots (CRC16(key) % 16384). Each master owns a slot range. During resharding, slots are migrated one key at a time using CLUSTER SETSLOT, MIGRATE, and CLUSTER COUNTKEYSINSLOT. Clients receive MOVED (permanent redirect) or ASK (migration in progress) redirects.

Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.