Quick facts

Image
nexus.apps.sub.comptech-lab.com/redis-applier:0.1.1
Size
16.9 MB (distroless)
Replicas
3/3 Ready (per cluster)
Pattern
Kafka WAL → Redis (ADR-0018)
Readiness fix in v0.1.1
kgo.OnPartitionsAssigned flips /readyz on group-join, not on first message

What it is

End-to-end DR test passed 2026-05-05: a write to DC Redis appeared in DR Redis after the MM2 hop and a redis-applier re-apply on the DR side, validating ADR-0018.

Architecture

DC                                          DR
──                                          ──
App ──produce──▶ Kafka(redis-writes)        Kafka(redis-writes, mirrored)
                       │                           │
                       │ consumer-group            │ consumer-group
                       │ "redis-applier"           │ "redis-applier"
                       ▼                           ▼
                  redis-applier (3 pods)      redis-applier (3 pods)
                       │ partition-affined         │
                       ▼                           ▼
                  Redis (RedisFailover)       Redis (RedisFailover)

3-pod Deployment per cluster running the custom Go binary at nexus.apps.sub.comptech-lab.com/redis-applier:0.1.1 (distroless, ~16.9 MB). Each pod joins the redis-applier consumer group on the local Kafka broker; partitions are auto-balanced across the 3 pods. Each consumed message is decoded and applied to the local Sentinel-fronted Redis primary.

Cross-cluster durability is automatic: DC writes hit DC Kafka, MirrorMaker 2 mirrors them to DR Kafka, DR's redis-applier consumes and applies to DR Redis. Apps NEVER write directly to Redis — that bypasses the WAL.

Configuration

Source: clusters/<cluster>/manifests/redis/applier/ — Deployment + Service + KafkaUser (SCRAM-SHA-512 against the internal scram listener on port 9095). Auth secret is derived from the KafkaUser CR's generated Secret.

Image: nexus.apps.sub.comptech-lab.com/redis-applier:0.1.1. Build path: scripts/redis/redis-applier in the lab repo (Go 1.22+, podman build, ctr import on rke2 nodes; pushed to in-cluster Nexus).

v0.1.1 fix: kgo.OnPartitionsAssigned hook flips /readyz as soon as the consumer joins the group — v0.1.0 only flipped after the first consumed message, which made fresh deployments look perpetually NotReady.

Operations

Failover

End-to-end test PASSED 2026-05-05 11:21: a write produced to DC Kafka redis-writes appeared in DR Redis within seconds — Kafka MM2 lag + applier batch interval. ADR-0018's pattern validated.

If DC's redis-applier is down, DR Kafka still mirrors fine; DR's applier writes the latest state to DR Redis. When DC's applier returns, it catches up from its consumer-group offset.

References