全部產品
Search
文件中心

:DescribeHotBigKeys - 即時擷取當前熱Key和大Key

更新時間:Jan 05, 2026

調用DescribeHotBigKeys介面,即時擷取當前記憶體中的熱Key和大Key。

介面說明

對資料結構為 List、Hash、Set、Zset 的 Key,按照 Key 中元素的數量排序並展示排名前 3 的 Key,記錄為大 Key;當某個 Key 的 QPS 大於 3,000 時會被記錄為熱點 Key。

  • 在使用阿里雲 SDK 時,需要保證 aliyun-sdk-core 的版本大於 4.3.3,建議使用最新版本。

  • 使用 DAS 的 SDK 的版本為 1.0.2 或以上。

  • 在使用 SDK 調用 DAS 服務時,需要將地區指定為 cn-shanghai。

  • 本介面只適用於如下 Redis 執行個體:
    • 執行個體為 Redis 開源版或 Tair(企業版)記憶體型。

    • 執行個體的小版本為最新。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

hdm:DescribeHotBigKeys

get

*全部資源

*

請求參數

名稱

類型

必填

描述

樣本值

ConsoleContext

string

備用參數。

None

InstanceId

string

Redis 執行個體 ID。

r-bp18ff4a195d****

NodeId

string

Redis 執行個體的資料分區 ID。

r-****-db-0

返回參數

名稱

類型

描述

樣本值

object

Message

string

請求返回訊息。

Successful

RequestId

string

請求 ID。

B6D17591-B48B-4D31-9CD6-9B9796B2****

Data

object

詳情資訊列表。

HotKeys

object

HotKey

array<object>

按 QPS 統計的熱 Key 列表。

object

按 QPS 統計的熱 Key 列表。

Key

string

具體的 Key。

abc:def:eng

Db

integer

Key 所在的 DB。

0

Hot

string

Key 的訪問頻次,即 Key 的每秒訪問數。

5500~6000

KeyType

string

Key 的類型。

zset

Lfu

integer

LFU 演算法的統計值。

253

NodeId

string

Redis 執行個體的資料分區 ID。

r-x****-db-0

Size

integer

元素的個數。

2

BigKeys

object

BigKey

array<object>

按子項目數量統計的大 Key 列表。

object

按子項目數量統計的大 Key 列表。

Db

integer

Key 所在的 DB。

0

Key

string

具體的 Key。

abc:def:eng

KeyType

string

Key 類型。

zset

Size

integer

元素的個數。

2

NodeId

string

Redis 執行個體的資料分區 ID。

r-x****-db-0

HotKeyMsg

string

擷取按 QPS 統計的熱 Key 失敗的原因。

current version doesn't support

BigKeyMsg

string

擷取按子項目數量統計的大 Key 失敗的原因。

current version doesn't support

HighTrafficKeyMsg

string

擷取按流量統計的熱 Key 失敗的原因。

current version doesn't support

HighTrafficKeys

object

HighTrafficKey

array<object>

按流量統計的熱 Key 列表。

object

按流量統計的熱 Key 列表。

Key

string

具體的 Key。

abc:def:eng

Db

integer

Key 所在的 DB。

0

Hot

string

Key 的訪問頻次,即 Key 的每秒訪問數。

1988

KeyType

string

Key 的類型。

string

NodeId

string

節點 ID。

r-x****-db-0

inBytes

integer

入流量,單位:Byte。

85767

outBytes

integer

出流量,單位:Byte。

1054684

Size

integer

元素的個數。

2

LargeKeys

object

LargeKey

array<object>

按記憶體佔用統計的大 Key 列表。

object

按記憶體佔用統計的大 Key 列表。

Db

string

Key 所在的 DB。

0

Key

string

具體的 Key。

abc:def:eng

KeyType

string

Key 的類型。

string

DataSize

string

Key 的記憶體佔用,單位:Byte。

33554439

NodeId

string

節點 ID。

r-x****-db-0

LargeKeyMsg

string

擷取按記憶體佔用統計的大 Key 失敗的原因。

current version doesn't support

Code

string

返回的狀態代碼。

200

Success

string

請求是否執行成功:

  • true:執行成功。

  • false:執行失敗。

true

樣本

正常返回樣本

JSON格式

{
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Data": {
    "HotKeys": {
      "HotKey": [
        {
          "Key": "abc:def:eng",
          "Db": 0,
          "Hot": "5500~6000",
          "KeyType": "zset",
          "Lfu": 253,
          "NodeId": "r-x****-db-0",
          "Size": 2
        }
      ]
    },
    "BigKeys": {
      "BigKey": [
        {
          "Db": 0,
          "Key": "abc:def:eng",
          "KeyType": "zset",
          "Size": 2,
          "NodeId": "r-x****-db-0"
        }
      ]
    },
    "HotKeyMsg": "current version doesn't support",
    "BigKeyMsg": "current version doesn't support",
    "HighTrafficKeyMsg": "current version doesn't support",
    "HighTrafficKeys": {
      "HighTrafficKey": [
        {
          "Key": "abc:def:eng",
          "Db": 0,
          "Hot": "1988",
          "KeyType": "string",
          "NodeId": "r-x****-db-0\n",
          "inBytes": 85767,
          "outBytes": 1054684,
          "Size": 2
        }
      ]
    },
    "LargeKeys": {
      "LargeKey": [
        {
          "Db": "0",
          "Key": "abc:def:eng",
          "KeyType": "string",
          "DataSize": "33554439",
          "NodeId": "r-x****-db-0"
        }
      ]
    },
    "LargeKeyMsg": "current version doesn't support"
  },
  "Code": "200",
  "Success": "true"
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 InvalidParams The request parameters are invalid. 請求參數錯誤
403 NoPermission You are not authorized to do this action. 沒有許可權執行該操作

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情