Reputation: 405
In my opinion, with the development of keys, the 'hash conflict' will occurs more and more frequently. I have no idea if those keys on the same slot are stored in singly linked list, then read performance will be effected, especially the stale record?
Upvotes: 5
Views: 4421
Reputation: 17510
These "slots" are merely a unit of distribution across shards. You're not going to have of 16K shards servers in a cluster; but they are granular enough to allow some degree of weighted load distribution. (For example if you start with four shard on one type of hardware and choose to introduce two more of a more power profile, you could make the new servers targets for twice as many slots as the existing servers and thus achieve a more relatively even utilization of your capacity.
I'm just summarizing the gist of how they're used. For details read the Redis Cluster Specification.
Upvotes: 2
Reputation: 397
answer from antirez, the author of Redis, below.
The reason is:
So 16k was in the right range to ensure enough slots per master with a max of 1000 maters, but a small enough number to propagate the slot configuration as a raw bitmap easily. Note that in small clusters the bitmap would be hard to compress because when N is small the bitmap would have slots/N bits set that is a large percentage of bits set.
Upvotes: 4