This topic describes how to view large keys in an ApsaraDB for Redis instance.
ApsaraDB for Redis provides complex data types such as lists, hash tables, and sorted sets. When you use the service, improper key design may result in large keys. When you obtain or delete a large key of an instance, your business may be affected due to the single-threading model of ApsaraDB for Redis. If your instance is a cluster one, the existence of large keys may even cause out-of-memory (OOM) errors for specific nodes.
You can use one of the following methods to view large keys of an instance:
View large keys of an instance in the ApsaraDB for Redis console. For more information, see Use the real-time key statistics feature. This method is recommended.
View historical large keys recorded in instance audit logs. For more information, see View audit logs.
View and handle large keys by using cache analysis. For more information, see Offline key analysis.
Obtain large keys by using API operations:
Queries the hotkeys and large keys in the memory in real time.
Queries the top 20 hotkeys over a specified period of time.
Queries the top 20 large keys over a specified period of time.
Queries the hotkeys of an ApsaraDB for Redis instance.