What Are Big Keys and Hot Keys?

Term

Definition

Big key

There are two types of big keys:

  • Keys that have a large value, for example, a 10 MB String key, or a 100 MB Hash, List, or Set key (all elements combined). If the size of a single String key exceeds 10 KB, or if the size of all elements of a key combined exceeds 50 MB, the key is defined as a big key.
  • Keys that have a large number of elements, for example, a Hash key that has 10,000 elements. If the number of elements in a key exceeds 5000, the key is defined as a big key.

Hot key

A key is defined as a hot key if it is frequently requested or if it occupies a large number of resources. For example:

  • In a cluster instance, a shard processes 10,000 requests per second, among which 3000 are performed on the same key.
  • In a cluster instance, a shard uses a total of 100 Mbits/s inbound and outbound bandwidth, among which 80 Mbits/s is used by the HGETALL operation on a Hash key.