All Products
Search
Document Center

ApsaraDB for Redis:Observability

Last Updated:May 22, 2024

ApsaraDB for Redis provides the observability that contains more dimensions, categories, and advanced features than open source Redis.

Background information

Observability is the ability to access monitoring data, analyze issues, and perform systematic diagnostics based on three pillars of data: metrics, traces, and logs.

  • Metrics: A metric is a numeric value of a dimension that is measured over a period of time to display specific states and trends of a system.

  • Logs: A log is a record of discrete events that happened during the runtime of an application.

  • Traces: A trace records the end-to-end lifecycle of a request.

ApsaraDB for Redis integrates metrics, traces, and logs to provide data analytics. The following table compares the observability of ApsaraDB for Redis and open source Redis. The following list describes the symbols that are used in the table.

  • The ️✔️ symbol indicates that the feature is supported.

  • The ❌ symbol indicates that the feature is not supported.

  • The ➖ symbol indicates that the feature is not involved.

Observability

Open source Redis

ApsaraDB for Redis Community Edition

ApsaraDB for Redis Enhanced Edition (Tair)

Metrics

Performance metrics

✔️

️️️ ✔️ (fine-grained)

️️️ ✔️ (fine-grained)

Logs

Active logs

✔️

✔️

✔️

Slow logs

✔️

✔️

✔️

Audit logs

✔️

✔️

Latency insights

✔️

✔️

Traces

Analytics

Real-time analysis of hotkeys

✔️

✔️

Real-time analysis of large keys

✔️

✔️

Offline key analysis

✔️

✔️

Instance diagnostics

✔️

✔️

Note

In most cases, trace analysis requires a middleware or specific code modifications on your client.

Metrics

Open source Redis provides a variety of metrics, including memory-related metrics (such as memory distribution, memory usage, and memory fragmentation ratio), statistics-related metrics (such as the number of connections and commands, network traffic, and synchronization status), CPU utilization, and keyspace information. ApsaraDB for Redis provides more fine-grained metrics in addition to the metrics supported by open source Redis to enhance user experience. The fine-grained metrics include read queries per second (QPS) and write QPS. For more information about these metrics, see View performance monitoring data.

The fine-grained metrics provided by ApsaraDB for Redis also have the following benefits in implementing observability:

Logs

ApsaraDB for Redis allows you to view active logs, slow logs, audit logs, and latency insights of an ApsaraDB for Redis instance.

  • Active logs

    Active logs of an instance record in rows the persistence, synchronous replication, and debugging operations that take place and error messages that appear when the instance is running.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose Logs > Active Logs in the left-side navigation pane to view the active logs of the instance. For more information, see View active logs.

  • Slow logs

    Slow logs record requests that take longer than specific thresholds to execute. The execution duration of a request does not include the amount of time that the request spends in queuing or in transmission. Slow log statistics include execution timestamps, execution durations, command parameters, and client information. You can view slow logs of an instance, identify commands in the instance that take longer than required to run, and optimize these commands to prevent service congestion.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose Logs > Slow Logs in the left-side navigation pane to view the slow logs of the instance. For more information, see Query slow logs.

  • Audit logs

    ApsaraDB for Redis provides audit logs based on Simple Log Service. Audit logs include statistics such as log types, execution durations, database numbers, client IP addresses, account names, command details, and extension information. Audit logs allow you to search and analyze online operation logs (including logs about sensitive operations related to the FLUSHALL, FLUSHDB, and DEL commands), slow logs, and active logs, and export these logs.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose Logs > Audit Logs in the left-side navigation pane to view the audit logs of the instance. For more information, see Enable the new audit log feature.

  • Latency insights

    The latency insights feature is an advanced feature provided by ApsaraDB for Redis that allows you to collect latency statistics. With latency insights, up to 27 events and execution durations of all commands can be recorded, and all latency statistics within the last three days can be saved.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose CloudDBA > Latency Insights in the left-side navigation pane to view the latency information of the instance. For more information, see Latency insights.

Analytics

ApsaraDB for Redis integrates metrics, traces, and logs to provide data analytics, which is a critical feature of ApsaraDB for Redis.

  • Hotkey and large key analysis

    If a key receives significantly more requests than other keys, the key is considered a hotkey. If a hotkey is not timely handled, skewed requests or even cache breakdowns may occur. If a key contains a large number of members or occupies a large amount of memory, the key is considered a large key. If a large key is not timely handled, commands that involve the key take longer to run and an out-of-memory (OOM) error may occur.

    You can use the Real-time Key Statistics feature of ApsaraDB for Redis to identify hotkeys and large keys. The Real-time Key Statistics feature displays hotkeys and large keys in real time and allows you to view the hotkeys and large keys that were generated within the last four days. The Real-time Key Statistics feature is high in precision and has minimal impact on performance. This feature allows you to view the amount of memory occupied by a key and the frequency at which a key is requested and troubleshoot hotkeys and large keys to optimize instances.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose CloudDBA > Real-time Key Statistics in the left-side navigation pane to view statistics about hotkeys and large keys of the instance. For more information, see Use the real-time key statistics feature.

  • Offline key analysis

    The Offline Key Analysis feature supports the processing of offline Redis Database (RDB) files of all data structures and from all instance architectures and Redis versions supported by ApsaraDB for Redis, and does not affect online services provided by ApsaraDB for Redis. The Offline Key Analysis feature can process a combination of 10% large keys and 90% small keys four times faster than redis-rdb-tools, and a combination of medium keys and large keys 20 times faster than redis-rdb-tools. During the process, memory usage is kept within 1 GB to prevent OOM errors that may occur due to large key processing. The Offline Key Analysis feature also allows you to search for the longest subelement to troubleshoot issues.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose CloudDBA > Offline Key Analysis in the left-side navigation pane to view the offline key analysis results of the instance. For more information, see Use the offline key analysis feature.

  • Instance diagnostics

    ApsaraDB for Redis integrates statistics such as performance metrics, slow logs, and key analysis to provide the diagnostic report feature. This feature performs one-stop diagnostics to evaluate the health of instances based on statistics such as performance level, skewed request distribution, and slow logs, and provides suggestions. This feature improves the automatic O&M capabilities of instances and reduces instance usage costs.

    You can go to the details page of an instance in the ApsaraDB for Redis console and choose CloudDBA > Diagnostic Reports in the left-side navigation pane to perform diagnostics on the instance. For more information, see Create a diagnostic report.