Why Redis uses 16K fixed hash slots instead of modulo sharding
Franc0Fernand0 · x · 2026-10-12
The author explains why Redis Cluster avoids naive hash(key) % shardcount sharding.
- The problem: modulo mapping breaks the moment you add a shard — nearly every key would need to move to a different shard.
- Redis's fix: a fixed logical layer of 16,384 hash slots between keys and shards. Keys always map to the same slot; slots are assigned to shards.
- Easy resharding: adding a shard just moves some slots over; key-to-slot mappings never change.
A clear primer on how a fixed hash space decouples key placement from shard topology.
More from Infra
- OpenAI chip head Richard Ho on Jalapeno: why Broadcom beat Nvidia and AMD as partner — richardjnieva · 2026-10-12
- SpaceX building $250M GigaBay at Starbase to build up to 1,000 Starships a year — DimaZeniuk · 2026-10-12
- Bittensor's TPN Labs ships first model TPN005, cutting base size ~40% with 32k context intact — const_reborn · 2026-10-12
- Lightning AI launches BYOC: run Studios on your own AWS, GCP, Azure or Slurm infra — LightningAI · 2026-10-12
- Microsoft to scale in-house Maia AI chips to multi-gigawatt inference by 2027 — The Decoder · 2026-10-12
- Microsoft plans huge deployment of its own AI chips to cut costs — pstAsiatech · 2026-10-12