Why Redis Cluster Uses Exactly 16,384 Hash Slots, Not 65,536
Redis Cluster distributes all data across a fixed total of 16,384 hash slots, regardless of how many nodes are in the cluster. This specific number was chosen by Redis creator Salvatore Sanfilippo, also known as antirez, as a deliberate engineering trade-off rooted in memory efficiency and network performance. Unlike simple modulo hashing, where adding a new node forces the majority of keys to remap — causing massive data reshuffling — a fixed slot system allows only the affected slots to migrate between nodes. The choice of 16,384 over the more common 65,536 boundary keeps the cluster's slot-mapping bitmap small enough to fit efficiently in gossip protocol heartbeat messages exchanged between nodes. Understanding this design requires examining the interplay between hashing algorithms, memory structures, and the physical constraints of distributed network communication.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in