Help Center/ Distributed Cache Service/ FAQs/ Redis Usage/ Why Is the Capacity or Performance of a Shard of a Redis Cluster Instance Overloaded When That of the Instance Is Still Below the Bottleneck?
Updated on 2022-09-15 GMT+08:00

Why Is the Capacity or Performance of a Shard of a Redis Cluster Instance Overloaded When That of the Instance Is Still Below the Bottleneck?

Redis Cluster uses a special data sharding method. Every key is part of a hash slot, which is held by a node in the cluster. To compute what is the hash slot of a given key:

  1. Take the CRC16 of the key modulo 16384.
  2. Based on the mapping between hash slots and shards, connections are redirected to the right node for data read and write operations.

Therefore, keys are not evenly distributed to each shard of an instance. If a shard contains a big key or a hot key, the capacity or performance of the shard 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.