Beyond Compatibility: Debugging Tail Latency in a Production Valkey Migration
summary
Migration replaces on‑prem Redis with Amazon ElastiCache for Valkey using Jedis then Lettuce 6.6.0 with 60s topology refresh and latency‑aware reads, finds server read P99 ~20–30 μs while application P99 balloons to 50 ms at 50% traffic and spikes to ~100 ms. Moving reads to replicas cuts cache‑read p99 50→3 ms; GraphQL p99 800→610 ms. Adding jitter and extra cache rechecks reduces lock‑acquisition p99 320→100 ms, restoring end‑to‑end latency near baseline.
AI-written summary · about
