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 connect to 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 no features are involved.
Observability Open source Redis ApsaraDB for Redis ApsaraDB for Redis Enhanced Edition (Tair)
Metric View monitoring data ✔️ ✔️️(fine-grained) ️✔️(fine-grained)
Log Query active logs of an instance ✔️ ✔️ ✔️
View slow logs ✔️ ✔️ ✔️
View audit logs ✔️ ✔️
Latency insight ✔️
Trace
Analytics Use the real-time key statistics feature ✔️ ✔️
Use the real-time key statistics feature ✔️ ✔️
Offline key analysis ✔️ ✔️
Create a diagnostic report ✔️ ✔️

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 based on user experience. The fine-grained metrics include read queries per second (QPS) and write QPS. For more information about these metrics, see View 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 insight 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 time of a request does not include the amount of time that the request spends in queue or in transmission. Slow log statistics include execution timestamps, execution durations, command parameters, and clients. 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 ApsaraDB for Redis 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 View slow logs.

  • Audit logs

    ApsaraDB for Redis provides audit logs based on Log Service. For more information about Log Service, see What is 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 O&M 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 Log 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 insight

    The latency insight feature is an advanced feature provided by ApsaraDB for Redis that allows you to collect latency statistics. With latency insight, 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 Insight in the left-side navigation pane to view the latency insight information of the instance. For more information, see Latency insight.

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 for the key.

    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 of the instance. For more information, see Offline key analysis.

  • Instance diagnostics

    ApsaraDB for Redis integrates statistics such as performance metrics, slow logs, and key analysis to provide the diagnostic reports feature. This feature performs one-stop diagnostics to evaluate the health of instances based on multiple metrics (such as performance metrics, skewed request statistics, and slow logs) and puts forward suggestions. This feature improves the automatic Q&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.