docs(cluster): document that rootNodes config is not inherited by node connections#3327
Open
nkaradzhov wants to merge 2 commits into
Open
docs(cluster): document that rootNodes config is not inherited by node connections#3327nkaradzhov wants to merge 2 commits into
nkaradzhov wants to merge 2 commits into
Conversation
TLS settings from a rediss:// URL or a root node only apply to the topology-discovery connection; connections to discovered cluster nodes are built from the defaults option. Without defaults.socket.tls, node connections are attempted in plaintext and hang against clusters that enforce in-transit encryption. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Generalize the clustering guide: rootNodes configuration is only used for topology discovery and is not inherited by node connections, which are built from defaults. Password and TLS become examples of that rule. Also state the rule in the JSDoc of RedisCluster.create, createCluster and the rootNodes/defaults options. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Description
When a
rediss://URL (or TLS socket options) is specified on a root node, TLS only applies to the connection used to discover the cluster topology. Connections to the discovered cluster nodes are built from thedefaultsoption, so withoutdefaults: { socket: { tls: true } }they are attempted in plaintext — against a cluster that enforces in-transit encryption (e.g. AWS ElastiCache) this hangs without an error.The same holds for every other setting in
rootNodes(credentials, timeouts, …), so this documents the general rule rather than just the TLS case:docs/clustering.md: new Root nodes vs. defaults section stating thatrootNodesis only used for topology discovery and that cluster-wide settings belong indefaults, with the existing password note and a new TLS example as subsections.RedisCluster.create, theredispackage'screateCluster, and therootNodes/defaultsoptions, so it shows up in IDE hovers.Fixes #3117
🤖 Generated with Claude Code