We run Redis Sentinel on Kubernetes with one primary, two replicas and a Node.js backend using ioredis. After changing the termination hook to trigger failover and close connections, planned failovers take around 2 to 5 seconds in testing. The client queues commands until it reconnects.
What happens if a failover takes much longer under heavy traffic? I'm worried about the application running out of memory or overwhelming the new primary when the queue flushes. Is a managed Redis service likely to solve that?
balcony-level-headed:
It is worth checking the timeout settings at the proxy and caller too. A command that finishes after the caller has given up can complicate retries, especially for writes.