Skip to content

docs(cluster): document that rootNodes config is not inherited by node connections#3327

Open
nkaradzhov wants to merge 2 commits into
redis:masterfrom
nkaradzhov:docs/cluster-tls-defaults
Open

docs(cluster): document that rootNodes config is not inherited by node connections#3327
nkaradzhov wants to merge 2 commits into
redis:masterfrom
nkaradzhov:docs/cluster-tls-defaults

Conversation

@nkaradzhov

@nkaradzhov nkaradzhov commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

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 the defaults option, so without defaults: { 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 that rootNodes is only used for topology discovery and that cluster-wide settings belong in defaults, with the existing password note and a new TLS example as subsections.
  • JSDoc: the same note on RedisCluster.create, the redis package's createCluster, and the rootNodes/defaults options, so it shows up in IDE hovers.

Fixes #3117


🤖 Generated with Claude Code

nkaradzhov and others added 2 commits July 9, 2026 11:38
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>
@nkaradzhov nkaradzhov changed the title docs(cluster): document enabling TLS for cluster connections via defaults docs(cluster): document that rootNodes config is not inherited by node connections Jul 9, 2026
@nkaradzhov nkaradzhov requested a review from PavelPashov July 9, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot connect to AWS Redis in cluster mode. (Using ioredis it works)

1 participant