Top key delivery

更新时间:
复制 MD 格式

The Top Key Delivery feature in the operations service delivers real-time metrics for hot keys and big keys from your Redis instances to Cloud Monitor. You can then configure alert rules based on these metrics to quickly identify and address potential performance issues.

Prerequisites

You must meet the following prerequisites to enable this feature:

  1. The DAS operations service must be enabled.

  2. The instance must be in one of the following supported regions: China (Beijing), China (Zhangjiakou), China (Shanghai), Germany (Frankfurt), Singapore, US (Virginia), or Japan (Tokyo).

Billing

  • Fees incurred for enabling the operations service for an instance.

  • Fees for data storage in Log Service (SLS).

Procedure

  1. Log on to the DAS console.

  2. In the left-side navigation pane, click Overview > Cloud Instances.

  3. Find the target instance and click the instance ID to open the instance details page.

  4. In the left-side navigation pane, click Top Key Statistics. On the Key Analysis page, click TOP KEY Delivery in the upper-right corner.

    Note

    If the operations service is not enabled for the instance, this feature is unavailable and the button is grayed out. You must first enable the operations service for the instance.

  5. In the Top Key Delivery dialog box, click Enable, and then click Confirm.

    After you enable this feature, charges will apply for using Cloud Monitor. The default delivery destination is Cloud Monitor. Top key metrics are delivered to Cloud Monitor in real time, enabling you to set alert rules.

  6. After you enable this feature, the system automatically delivers top key metrics to Log Service (SLS) in your account. The system also automatically creates a Project and a corresponding time series store based on the following naming rules:

    • Target Project:

      • Naming format: nosql-{your-alibaba-cloud-account-id}-{region}

      • Example: nosql-176498472******-cn-hangzhou

    • Target time series store:

      • Fixed name: redis_top_key_log

    Note

    By default, data in redis_top_key_log is stored for 30 days. You can change this period by modifying the Data Retention Period.

Metrics

The delivered monitoring data includes five core metrics and nine dimensions for filtering.

Metric name

Description

Example value

Metrics

hotKeyQpsLowerBound

Access frequency of the hot key.

5500

topKeyInBytes

Inbound traffic for the hot key, in bytes.

4260

topKeyOutBytes

Outbound traffic for the hot key, in bytes.

87989

bigKeyItemCnt

Number of elements in the big key.

1378950

bigKeySize

Memory used by the big key, in bytes.

1236629999

Dimensions

user_id

The account ID.

"17xxxxxxxxxxxxxx"

instance_id

The instance ID.

"r-2xxxxxxxxxxxx"

node_id

The node ID.

"r-2xxxxxxxxxxxx-db-1"

host_ins_id

The ID of the data shard node.

This ID is used to distinguish the primary node from read-only nodes in a read/write splitting instance that uses cloud disks. Example: "9847671".

dbid

The ID of the database where the key is stored.

"0"

key

The key name.

"key:000000000095"

key_type

The data type of the key.

"string"

topkey_type

The basic category of the top key.

• Hot key: "hotkey"
• Big key (by element count): "bigkey"
• Big key (by memory usage): "largekey"






















category

The detailed category of the top key.

• Hot key (by QPS): "qps"
• Hot key (by traffic): "traffic"