This topic describes how to query large keys in a Tair (Redis OSS-compatible) instance.
Redis Open-Source Edition provides complex data structures such as List, Hash, and Zset. When you use Redis Open-Source Edition, 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 Redis Open-Source Edition. If your instance is a cluster instance, the existence of large keys may even cause out of memory (OOM) errors on specific nodes.
You can use one of the following methods to query large keys in a Tair (Redis OSS-compatible) instance:
View large keys of the instance in the console. This has minimal impact on performance. For more information, see Use the real-time key statistics feature. This method is recommended.
Analyze historical backup data to identify large keys and hotkeys. This does not affect online services. For more information, see Use the offline key analysis feature.
View historical large keys recorded in instance audit logs. For more information, see View audit logs.
Query large keys by using API operations.
DAS API operation
Description
Queries the hotkeys and large keys in the memory in real time.
Queries the top 20 hotkeys over a period of time.
Queries the top 20 large keys over a period of time.
Queries the hotkeys of an instance.