This topic describes how to view the traffic information about tables and the information about tables with abnormal traffic in the cluster management system.

Background information

If a large number of files are stored in a database, the database takes a long time to respond to a request. In addition, traffic that is generated for data in the database is not evenly distributed, which leads to high workloads on some nodes, hot shards, and hot keys. In this case, the response time of the database further increases and the database performance is degraded. You can use the traffic diagnosis feature in the cluster management system to identify hot shards and hot keys and view the information about the hot shards and hot keys.

Prerequisites

You are logged on to Lindorm Insight of your cluster. For more information, see Log on to Lindorm Insight.

Query the information about table shards in real time

  1. In the left-side navigation pane of the cluster management system, choose Traffic Diagnosis > Topregion /key Real-time Query.
  2. Configure filtering conditions, including the sorting dimension, group name, node name, and table name.
    The following table describes the dimensions based on which the queried information is sorted.
    Dimension Unit Description
    Total Requests Requests/second The number of requests sent per second to access a shard.
    Read Requests Requests/second The number of requests sent per second to read a shard.
    Write Requests Requests/second The number of requests sent per second to write a shard.
    Shard Size MB The size of a shard.
    Response Time for Read Requests Millisecond The average response time for requests sent to read a shard.
    Response Time for Write Requests Millisecond The average response time for requests sent to write a shard.
    Memstore Size MB The amount of data in the memory
    Data Size for All Requests KB/second The amount of data generated by all requests sent per second to access a shard.
    Data Size for Read Requests KB/second The amount of data generated by all read requests sent per second to read a shard.
    Data Size for Write Requests KB/second The amount of data generated by all read requests sent per second to write a shard.
    Note
    • In the Top field, enter the number of records that can be displayed.
    • If you turn on the Table Aggregation switch, the aggregated data is displayed.
    • If you turn on the Ascending switch, data is displayed in ascending order based on the selected dimensions.
  3. Click Query.
    In this example, Data Size for Read Requests is selected as the sorting dimension, TOP is set to 5, and the Ascending and Table Aggregation switches are turned on.

    In the preceding figure, the top five shards that have the largest amount of data generated by read requests are queried. Shards in the same table are aggregated. All shards are sorted in ascending order based on the amount of data that is generated by read requests sent to the shards.

Query hot keys in real time

  1. In the left-side navigation pane of the cluster management system, choose Traffic Diagnosis > Topregion /key Real-time Query.
  2. Configure filtering conditions, including the sorting dimension, group name, node name, and table name.
    The following table describes the dimensions based on which the queried information is sorted.
    Dimension Unit Description
    Total Requests Requests/second The number of requests sent per second to access a hot key.
    Data Size for All Requests KB/second The amount of data generated by all requests sent per second to access a hot key.
    Response Time Millisecond The average response time for requests sent to access a hot key.
    Note
    • In the Top field, enter the number of records that can be displayed.
    • If you turn on the Ascending switch, data is displayed in ascending order based on the selected dimensions.
  3. Click Query.

Query tables with abnormal traffic

  1. In the left-side navigation pane of the cluster management system, choose Traffic Diagnosis > Abnormal Traffic Detection.
  2. In the upper part of the page, select a group to view the detailed information about tables and shards with abnormal traffic in the group.
    Note If the detailed information that you want to view is not displayed, click the Filter icon in the upper-right corner of the page to filter the results.
    • In the Traffic Growth Detection section, view the detailed information about the tables.
      The following table describes the columns that are displayed in the detailed information.
      Column Unit Description
      Peak Requests Requests/second The maximum number of requests that are sent per second to access a table.
      Valley Requests Requests/second The minimum number of requests that are sent per second to access a table.
      Average Requests Requests/second The average number of requests that are sent per second to access a table.
      Potential Anomaly None The status of the traffic that are generated for accessing a table. Valid values: Normal and Abnormal.
      Cause None The reason why the traffic generated for accessing a table becomes abnormal.
    • In the Hot Shard Detection field, query the detailed information about the tables in which the top 10 shards are located. The top 10 shards include the top 10 shards that are accessed by the largest number of requests and the top 10 shards that have the largest amount of data generated by requests.
      The following table describes the columns that are displayed in the detailed information.
      Column Unit Description
      Total Requests Requests/second The number of requests sent per second to access the table in which a hot shard is located.
      Read Requests Requests/second The number of requests sent per second to read the table in which a hot shard is located.
      Write Requests Requests/second The number of requests sent per second to write the table in which a hot shard is located.
      Data Size for Replication Write Requests KB The amount of traffic that is used to replicate data in the table in which a hot shard is located from a zone to another.
      Data Size for All Requests KB The amount of data generated by all requests sent per second to access the table in which a hot shard is located.
      Data Size for Read Requests KB The amount of data generated by all requests sent per second to read the table in which a hot shard is located.
      Data Size for Write Requests KB The amount of data generated by all requests sent per second to write the table in which a hot shard is located.
      Note You can click the Show icon icon in front of the table name to view the detailed information about hot shards in the table.
    • In the Hot Key Detection section, view the detailed information about the table in which keys that are frequently queried are located.

      The Average Response Time column in the returned information indicates the average response time for all requests within a minute.

    • In the Large Query Detection section, view the detailed information about the table that frequently meets the sampling rule.

      The Estimated Requests column in the returned information indicates the estimated requests that are sent per second to access the table in which a hot shard is located.