Tair(Redis OSS-compatible) provides the observability that contains more dimensions, categories, and advanced features than Redis.
Background information
Observability is the ability to access monitoring data, analyze issues, and perform systematic diagnostics based on three pillars of data: metrics, logs, and traces.
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.
Tair(Redis OSS-compatible) integrates metrics, traces, and logs to provide data analytics. The following table compares the observability of Tair(Redis OSS-compatible) and 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 | Redis | Redis Open-Source Edition | Tair (Enterprise Edition) | |
Metrics | ✔️ | ✔️️️️ ️(fine-grained) | ✔️️️️ ️(fine-grained) | |
Logs | ✔️ | ✔️ | ✔️ | |
✔️ | ✔️ | ✔️ | ||
❌ | ✔️ | ✔️ | ||
❌ | ✔️ | ✔️ | ||
Traces | ➖ | ➖ | ➖ | ➖ |
Analytics | ❌ | ✔️ | ✔️ | |
❌ | ✔️ | ✔️ | ||
❌ | ✔️ | ✔️ | ||
❌ | ✔️ | ✔️ |
In most cases, trace analysis requires middleware or specific code modifications on your client.
Metrics
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. Tair(Redis OSS-compatible) provides more fine-grained metrics in addition to the metrics supported by 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 Tair(Redis OSS-compatible) also have the following benefits in implementing observability:
Real-time performance monitoring: displays performance metrics in real time.
Session management: displays sessions between a Redis instance and clients in real time.
Performance trends: displays performance trends over a specific period of time.
Logs
Tair(Redis OSS-compatible) allows you to query active logs, slow query logs, audit logs, and latency insights of instances.
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 console and choose Query active logs.
in the left-side navigation pane to view the active logs of the instance. For more information, seeSlow query logs
Slow query 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 query log statistics include execution timestamps, execution durations, command parameters, and client information. You can view slow query logs of an instance to identify commands that take longer than required to run, and then optimize these commands to prevent service congestion.
You can go to the details page of an instance in the console and choose Query slow logs.
in the left-side navigation pane to view the slow query logs of the instance. For more information, seeAudit logs
Tair(Redis OSS-compatible) 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 of sensitive operations related to the
FLUSHALL
,FLUSHDB
, andDEL
commands), slow query logs, and active logs, and export these logs.You can go to the details page of an instance in the console and choose Enable the audit log feature.
in the left-side navigation pane to view the audit logs of the instance. For more information, seeLatency insights
Tair(Redis OSS-compatible) provides the advanced latency insights feature. This feature can record up to 27 events and execution durations of all commands, and save all latency statistics within the last three days.
You can go to the details page of an instance in the console and choose Use the latency insights feature.
in the left-side navigation pane to view the latency information of the instance. For more information, see
Analytics
Tair(Redis OSS-compatible) integrates metrics, traces, and logs to provide data analytics, which is a critical feature of Tair (Redis OSS-compatible).
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 Tair(Redis OSS-compatible) 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 offers high accuracy 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 console and choose Use the real-time key statistics feature.
in the left-side navigation pane to view statistics about hotkeys and large keys of the instance. For more information, seeOffline 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 Tair (Redis OSS-compatible), and does not affect online services provided by Tair (Redis OSS-compatible). The Offline Key Analysis feature can process a combination of 10% large keys and 90% small keys four times faster than redis-rdb-tool, and a combination of medium keys and large keys 20 times faster than redis-rdb-tool. 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 console and choose Use the offline key analysis feature.
in the left-side navigation pane to view the offline key analysis results of the instance. For more information, seeInstance diagnostics
Tair(Redis OSS-compatible) integrates statistics such as performance metrics, slow query 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 query 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 console and choose Create a diagnostic report.
in the left-side navigation pane to perform diagnostics on the instance. For more information, see