In an ApsaraDB for Redis database, the keys that are frequently accessed are called hot keys. The improper management of hot keys may cause Redis processes to be blocked and result in service interruption. You can use the Audit Log feature to query the history of hot keys and analyze the history. This allows you to further optimize the database.
- Log on to the ApsaraDB for Redis console.
- On the top of the page, select the region where the instance is deployed.
- On the Instances page, click the Instance ID of the instance.
- The Instance Information page appears. In the left-side navigation pane, choose .
- On the Audit Log page, click Please Select in the upper-right corner of the page. In the Time pane, specify a time range that
you want to query. In this example, 1 Week is selected to query the history that was generated in the last week.
- Clear the Keyword field, enter type:7 in the field, and then press Enter.
- The Audit log detail section displays the history of hot keys that are returned.Note The Client ip column displays 127.0.0.1 to indicate the IP address of the local host of the ApsaraDB for Redis instance.
The Command column displays the details of the hot keys that are found. The following table describes the fields in each command.
Field Example Description
The database in which the hot key is located.
The type of data structure that the hot key uses.
The LFU value of the hot key.
The QPS of the hot key. The value is displayed as a range.
The hot key that is returned.