I'm running a Node.js backend with ioredis and Redis Sentinel on AWS EKS, deployed with the Bitnami Helm chart. The setup has one primary and two replicas, with Karpenter handling node provisioning.
The chart's default preStop hook uses CLIENT PAUSE during pod termination, which freezes the application for roughly 20 seconds and leads to many TimeoutErrors. I replaced that hook so it initiates SENTINEL FAILOVER immediately and then cleanly closes the TCP connections. On the application side, ioredis is configured with maxRetriesPerRequest: null and enableOfflineQueue: true.
During testing, when a node is drained, ioredis detects the dropped connection, buffers incoming commands in memory, discovers the new primary through Sentinel, and flushes the queued commands after reconnecting. Failover usually completes in about 2–5 seconds, so users generally experience a slower request rather than a failed one.
My concern is what happens under much heavier traffic or with a larger dataset. If failover takes 10–15 seconds, the in-memory command queue could grow enough to cause application OOMs or create a major latency spike when thousands of commands are released at once. Is failover duration actually affected by dataset size, or is the bigger concern replica lag and resynchronization? How do people control queue growth and reduce disruption at scale? Should a brief 5–10 second latency spike simply be accepted, or is a managed Redis service significantly better for this scenario?
4 Answers
Be careful with an unlimited offline queue. It hides short connection failures nicely, but during a prolonged outage it turns Redis commands into unbounded application memory usage. Put an explicit limit around queued work, add an outage deadline, and decide which operations can be dropped, rejected, or retried safely. Also use backpressure and bounded concurrency so reconnecting does not release thousands of commands simultaneously. For operations that are not safe to replay, retries can create duplicate side effects, so idempotency still matters.
A 5–10 second interruption or latency increase is fairly normal for Redis Sentinel failover, including with managed services. A managed offering may reduce the operational burden, but it does not guarantee an instant failover or eliminate client-side reconnect behavior. Getting 2–5 seconds from a self-managed Kubernetes setup is already a strong result.
The best improvement may be reducing how often failovers happen rather than trying to make them a fraction of a second faster. If Karpenter is causing primary pods to be disrupted, protect the primary with an appropriate PodDisruptionBudget and a do-not-disrupt setting, or place it in a small dedicated node pool that is not aggressively consolidated. Replicas can remain more flexible while the primary avoids unnecessary eviction.
Dataset size usually does not directly make Sentinel promote an existing replica more slowly. The important distinction is between the failover itself and what happens when a replica is behind. A promotion can remain quick, but heavy writes or resource pressure may increase replication lag and eventually require a full resynchronization. Monitor replication lag, the replication backlog, CPU, memory, and network saturation. Make sure the backlog is large enough to cover normal disruption windows so replicas can catch up without a full sync.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically