Redis Cluster uses a special data sharding method. Each key is distributed to only one specific shard node. A key is distributed as follows:
Using CRC16 to calculate the slots:
l Use the CRC16 algorithm to calculate the key value, and perform module operations of 16384 to obtain the slot value.
Mapping to a specific shard:
l Based on the mapping between slots and shards, connections are redirected to the right node for reads and writes.
Therefore, keys are not evenly distributed to each shard of an instance. If a shard contains a big key or a hot key, it will be overloaded, but the load on other shards is still low. As a result, the capacity or performance bottleneck of the entire instance is not reached. It is a shard design feature in clusters. You can optimize or adjust specific shards to solve performance bottlenecks.