Repository navigation
feat: improve default connection resilience - #2160
Merged
PavelPashov merged 1 commit intoJul 31, 2026
Merged
Conversation
nkaradzhov
approved these changes
Jul 31, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Jul 31, 2026
# [6.0.0](v5.11.1...v6.0.0) (2026-07-31) * Add RESP3 ([#2127](#2127)) ([5d0862e](5d0862e)) ### Bug Fixes * clear stale socket timeout on reconnect ([#2148](#2148)) ([6455dbe](6455dbe)) * **cluster:** recreate stale connection on circular MOVED ([#2135](#2135)) ([08c8967](08c8967)) * **cluster:** validate MOVED slot to prevent Array.prototype pollution ([#2151](#2151)) ([9618206](9618206)), closes [#1267](#1267) * **command:** serialize large integer arguments in decimal notation ([#2136](#2136)) ([09b8d04](09b8d04)) * **redis:** keep reconnecting when connection closes during client setup ([#2099](#2099)) ([#2123](#2123)) ([f9a66bc](f9a66bc)) * **sentinel:** preserve zero preferred slave priority ([#2129](#2129)) ([a3f9f2d](a3f9f2d)) * **tracing:** redact values for GETSET and PSETEX ([#2134](#2134)) ([832765d](832765d)) * **types:** export ScanStreamOptions, RedisStatus and ClusterStatus ([#2158](#2158)) ([cf3bf71](cf3bf71)) ### Features * add LMOVEM and BLMOVEM command support ([#2144](#2144)) ([c26af46](c26af46)) * add Redis 8.10 set cardinality commands ([#2143](#2143)) ([301099b](301099b)) * himport managed fieldsets ([#2159](#2159)) ([729f174](729f174)) * improve default connection resilience ([#2160](#2160)) ([6d0716e](6d0716e)) * support MAXCOUNT and MAXSIZE for stream reads ([#2142](#2142)) ([ae5e41b](ae5e41b)) ### BREAKING CHANGES * ioredis now requires Node.js 20 or newer and uses RESP3 by default. Set `protocol: 2` to retain the v5 wire protocol.
|
🎉 This PR is included in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Medium Risk
Changing default reconnect delays and enabling 30s TCP keep-alive affects all connections that rely on library defaults, which can alter outage recovery timing and idle connection detection without an explicit opt-in.
Overview
Default reconnect and TCP keep-alive behavior is updated for clients that do not override options.
The built-in
retryStrategyswitches from linear backoff (50ms per attempt, 2s cap) to exponential backoff (50 × 2^(times−1), 5s cap) plus 0–199ms jitter, documented in the README andretryStrategyJSDoc.TCP
keepAlivedefault changes from0to 30000ms (initial delay before the first keep-alive probe); the option docs now describe that semantics instead of a generic enable/disable note.Unit tests lock in the new
retryStrategymath (with stubbedMath.random) and assertkeepAlivedefaults to 30000 while still honoring overrides.Reviewed by Cursor Bugbot for commit 2fda6af. Bugbot is set up for automated code reviews on this repo. Configure here.