Redis Microservice
Configuration reference for the service that refreshes the Redis cluster cache from Percona.
Redis Microservice#
Introduction#
The Redis microservice interfaces with a Percona database to periodically update a Redis cluster, refreshing its cache every five minutes. It checks for any changes in data or configurations within the Percona database at these intervals, ensuring that both master data and mini-configuration data for the HEAL account are correct. This approach avoids redundant network calls every five minutes. Consequently, all HEAL modules access data through the Redis cluster, bypassing direct queries to Percona.
The Redis cluster that this service updates, and its service/redis/* Consul keys, are described in Redis Cluster and Consul Keys.
Consul Keys#
The Redis module utilizes a set of consul keys designed to facilitate its configuration and operation. These keys are essential for the module to function correctly and efficiently.
The consul keys are as follows:
service/redismicroservice/threadpoolcoresize
service/redismicroservice/threadpoolmaxsize
service/redismicroservice/schedulerpoolmaxsize
service/redismicroservice/scheduler/rateofexecution
service/redismicroservice/scheduler/keyexpirationTimeoutMultiple
service/redismicroservice/redisloglevel
service/redismicroservice/rootloglevel
service/redismicroservice/txnkpiid
service/redismicroservice/maintainancewindowdaycount
service/redismicroservice/health/metrics/updateinterval/milliseconds
service/redismicroservice/management/endpoints/web/exposure/include
service/redismicroservice/management/endpoints/jmx/exposure/include
service/redismicroservice/management/endpoints/health/enabled
service/redismicroservice/redisloglevel
service/redismicroservice/rootloglevel
service/redismicroservice/logs/maxfilesize
service/redismicroservice/logs/totalsizecap
service/redismicroservice/logs/maxhistory
service/redismicroservice/auditlogs/maxfilesize
service/redismicroservice/auditlogs/totalsizecap
service/redismicroservice/auditlogs/maxhistory
service/pipeline/forensicbehaviourwindowsizeminute
If you change the log level through these Consul keys, restart the module. To change the log level without a restart, see Change a Service's Log Level at Runtime.
Health Metrics#
The health metrics of the Redis Microservice are critical indicators used to monitor and ensure the optimal performance and reliability of the system.
| Metric Name | Description |
|---|---|
| accountKeys | This is the number of account-related key-value pairs that Redis Microservice pushes into the Redis cluster. The initial value for this metric is 0. |
| agentKeys | This is the number of agent-related key-value pairs that Redis Microservice pushes into the Redis cluster. The initial value for this metric is 0. |
| applicationKeys | This is the number of application-related key-value pairs that Redis Microservice pushes into the Redis cluster. The initial value for this metric is 0. |
| categoryKeys | This is the number of category-related key-value pairs that Redis Microservice pushes into the Redis cluster. The initial value for this metric is 0. |
| componentKeys | This is the number of component-related key-value pairs that Redis Microservice pushes into the Redis cluster. The initial value for this metric is 0. |
| failureKeys | This is the number of failure related key-value pairs that Redis Microservice pushes into Redis cluster. The initial value for this metric is 0. |
| instanceKeys | This is the number of instance related key-value pairs that Redis Microservice pushes into Redis cluster. The initial value for this metric is 0. |
| schedulerActiveSize | Workers are within the scheduler. This is the total number of active schedulers. The initial value for this metric is 0. |
| schedulerPoolSize | This is the total number of schedulers in the pool. This is the maximum number of threads that can go in active state. The initial value for this metric is 0. |
| schedulerQueueSize | This is the total number of tasks present in the queue which are pending due to active schedulers count matching the pool size. The initial value for this metric is 0. |
| serviceKeys | This is the number of services related key-value pairs that Redis Microservice pushes into Redis cluster. The initial value for this metric is 0. |
| snapshots | Initial value for this metric is {}. Value of this metric resets periodically as per the value of 'service/redismicroservice/health/metrics/updateinterval/milliseconds' consul key. It stores the Redis keys that are not found in Redis cluster. |
| supervisorKeys | This is the number of Supervisor related key-value pairs that Redis Microservice pushes into Redis cluster. The initial value for this metric is 0. |
| totalKeys | This is the total number of key-value pairs that Redis Microservice pushes into Redis cluster from the start of the Redis Microservice till the current instance in time. The initial value for this metric is 0. |
| transactionKeys | This is the number of transactions related key-value pairs that Redis Microservice pushes into Redis cluster. The initial value for this metric is 0. |
| WorkerActiveSize | This is the total number of active threads. The initial value for this metric is 0. |
| WorkerPoolSize | This is the total number of threads in the pool. This is the maximum number of threads that can go in active state. The initial value for this metric is 0. |
| WorkerQueueSize | This is the total number of tasks present in the queue which are pending due to active threads count, matching the pool size. The initial value for this metric is 0. |
| unchangedKeys | This is the count of keys which did not change on each cache interval (from last minute to current time instance). The initial value for this metric is 0. |
Note: Health metrics with suffix as 'Keys' above, help in figuring out any issues with these keys.
For example: The supervisor keys metric may indicate errors for some keys, caused by an invalid supervisor.
You can view the KPIs of HEAL modules such as the Redis Microservice in Control Center, and set thresholds for them at service level and instance level. See Set KPI thresholds for a service.