Redis high availability for rConfig
Redis holds rConfig’s job queue, cache, user sessions and locks. rConfig connects to a single Redis address, so the design is simple to state: the Redis technology handles replication and failover, and a virtual IP in front always points at the current primary. This page covers that design. On EL10, Valkey replaces Redis; see Valkey, which follows the same design.
What rConfig needs
- One address in
REDIS_HOSTthat always reaches the current primary. - One password on every Redis node, the same as rConfig’s
REDIS_PASSWORD. - No eviction. Redis must never drop keys to save memory; that silently drops queued jobs.
The design
| Part | What it does |
|---|---|
| Redis primary and replica (two or more nodes) | The primary takes writes; replicas copy it continuously |
| Sentinel (three instances) | Watches the primary, agrees by majority when it has failed, promotes a replica, and repoints the others to it |
| VIP | Always held by the node that is the current primary. rConfig’s REDIS_HOST is the VIP |

Three Sentinels are needed so they can agree by majority; run them on three separate hosts (the two Redis nodes and a third, small host is common).
The VIP follows the primary in one of two ways:
- keepalived with a role check on each Redis node. A check script asks the local Redis for its role; only the node reporting
role:masterholds the VIP. - Sentinel’s
client-reconfig-script, which runs when Sentinel promotes a replica and moves the VIP to the new primary.
#!/bin/bash# Exit 0 only when the local Redis is the primary. keepalived gives the VIP to that node.REDISCLI_AUTH="$(cat /etc/redis/rconfig.pass)" \ redis-cli -h 127.0.0.1 -p 6379 info replication 2>/dev/null | grep -q '^role:master'Settings that matter on every Redis node
requirepass <the shared password>masterauth <the shared password> # so replicas can authenticate to the primarymaxmemory 2gb # size for your queuemaxmemory-policy noevictionappendonly yes # persistence, so a restarted node keeps its dataSentinel needs the password too (sentinel auth-pass). Set the same password on rConfig’s nodes as described in Redis shared with other nodes: secure Redis once, then copy the password, never run the secure command on every node.
What a failover costs
- Queued jobs written to the old primary but not yet replicated are lost. Scheduled tasks come round again at their next interval; re-run any manual download that was in flight.
- User sessions live in Redis, so users may need to log in again.
- Horizon reconnects to the VIP and carries on with the jobs that survived.
For rConfig, that’s usually a short interruption, not data loss that matters: device configs are collected again on the next run.