Traffic diagnosis

更新时间:
复制 MD 格式

When traffic is unevenly distributed across a cluster, some regions receive a disproportionate share of requests. This causes hot regions, hot keys, higher response times, and degraded cluster performance. In addition, if a large number of files are stored in a database, the database takes a long time to respond to a request. Use the traffic diagnosis feature in Lindorm Insight to identify hot shards and hot keys in real time and to detect tables with abnormal traffic patterns.

With traffic diagnosis, you can:

  • Query the top shards and keys ranked by traffic, response time, or data volume

  • Detect tables with abnormal traffic growth

  • Drill down from table-level summaries to individual shard details

Prerequisites

Before you begin, ensure that you have:

Query top shards in real time

  1. In the left-side navigation pane, choose Traffic Diagnosis > Topregion /key Real-time Query.

  2. Set the filtering conditions: sorting dimension, group name, node name, and table name. The following table describes the available sorting dimensions. In the Top field, enter the number of records to display. Turn on Table Aggregation to group results by table. Turn on Ascending to sort results in ascending order.

    Note To locate hot shards, start with Total Requests to find the most-accessed shards, then switch to Response Time for Read Requests or Response Time for Write Requests to assess latency impact.
    Dimension Unit Description
    Total Requests Requests/second Number of requests per second to access a shard
    Read Requests Requests/second Number of read requests per second to a shard
    Write Requests Requests/second Number of write requests per second to a shard
    Shard Size MB Size of a shard
    Response Time for Read Requests Millisecond Average response time for read requests to a shard
    Response Time for Write Requests Millisecond Average response time for write requests to a shard
    Memstore Size MB Amount of data held in memory
    Data Size for All Requests KB/second Total data generated by all requests per second to a shard
    Data Size for Read Requests KB/second Data generated by read requests per second to a shard
    Data Size for Write Requests KB/second Data generated by write requests per second to a shard
  3. Click Query. Example: To find the top 5 shards with the most read traffic, set the sorting dimension to Data Size for Read Requests, set Top to 5, and turn on both Ascending and Table Aggregation. The results show the top 5 shards ranked by read data volume, grouped by table, in ascending order.

Query hot keys in real time

  1. In the left-side navigation pane, choose Traffic Diagnosis > Topregion /key Real-time Query.

  2. Set the filtering conditions: sorting dimension, group name, node name, and table name. The following table describes the available sorting dimensions. In the Top field, enter the number of records to display. Turn on Ascending to sort results in ascending order.

    Dimension Unit Description
    Total Requests Requests/second Number of requests per second to access a hot key
    Data Size for All Requests KB/second Total data generated by all requests per second to a hot key
    Response Time Millisecond Average response time for requests to a hot key
  3. Click Query. Example: To find the top 10 hot keys with the highest response times, set the sorting dimension to Response Time, set Top to 10, and turn on Ascending. The results show the 10 hot keys with the longest average response times, sorted in ascending order.

Query tables with abnormal traffic

  1. In the left-side navigation pane, choose Traffic Diagnosis > Abnormal Traffic Detection.

  2. Select a group to view traffic anomaly details for tables and shards in that group.

    Note If the results you want are not visible, click the Filter icon in the upper-right corner to filter the results.

    The page is organized into four detection sections:

    Traffic Growth Detection

    View tables with abnormal traffic growth patterns.

    Column Unit Description
    Peak Requests Requests/second Maximum requests per second to access a table
    Valley Requests Requests/second Minimum requests per second to access a table
    Average Requests Requests/second Average requests per second to access a table
    Potential Anomaly Traffic status. Valid values: Normal and Abnormal
    Cause Reason why the traffic became abnormal

    Hot Shard Detection

    View tables that contain the top 10 shards by request count and the top 10 shards by data volume. Click the Show icon icon next to a table name to expand the shard-level details.

    Column Unit Description
    Total Requests Requests/second Requests per second to access the table containing a hot shard
    Read Requests Requests/second Read requests per second to the table containing a hot shard
    Write Requests Requests/second Write requests per second to the table containing a hot shard
    Data Size for Replication Write Requests KB Traffic used to replicate data from one zone to another
    Data Size for All Requests KB Total data generated by all requests per second to the table
    Data Size for Read Requests KB Data generated by read requests per second to the table
    Data Size for Write Requests KB Data generated by write requests per second to the table

    Hot Key Detection

    View tables that contain frequently queried hot keys. The Average Response Time column shows the average response time for all requests within a minute.

    Large Query Detection

    View tables that frequently match the sampling rule. The Estimated Requests column shows the estimated number of requests per second to the table containing a hot shard.