fix: default rediss:// to standalone TLS, make cluster mode opt-in#1
Open
noamsuissa01 wants to merge 1 commit into
Open
fix: default rediss:// to standalone TLS, make cluster mode opt-in#1noamsuissa01 wants to merge 1 commit into
noamsuissa01 wants to merge 1 commit into
Conversation
BREAKING CHANGE: rediss:// URLs now default to standalone ioredis with TLS instead of forcing ioredis.Cluster. The previous behavior crashed the app on every non-clustered TLS provider (DO Managed Valkey, Redis Cloud Essentials, Upstash, ElastiCache non-cluster, Azure Basic/Standard) with ClusterAllFailedError: Failed to refresh slots cache. New config options: - sails.config.redis_cluster_mode (env: sails_redis_cluster_mode) Set to true to restore the old Cluster behavior for clustered deployments (e.g., Azure Premium with clustering enabled). - sails.config.redis_tls_reject_unauthorized TLS cert verification now defaults to true (was hardcoded false). Set to false for self-signed certs in development. Other improvements: - Extracted attachKueMethods() to eliminate code duplication - Split client creation into createStandaloneClient/createClusterClient - Added full config documentation to README with provider compatibility table Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
rediss://(TLS) URLs no longer forceioredis.Clustermode. The previous behavior crashed the app on every non-clustered TLS Redis/Valkey provider withClusterAllFailedError: Failed to refresh slots cache. Cluster mode is now opt-in viasails.config.redis_cluster_mode = true.Breaking Changes
rediss://is now standalone mode. Setsails.config.redis_cluster_mode = true(env:sails_redis_cluster_mode=true) to restore the old cluster behavior.true(was hardcodedfalse). Setsails.config.redis_tls_reject_unauthorized = falseif needed.Provider Compatibility
redis_cluster_mode: trueredis_cluster_mode: trueChanges
sails.config.redis_cluster_modeoption — opt-in for clustered deploymentssails.config.redis_tls_reject_unauthorizedoption — configurable TLS cert verificationattachKueMethods()helper — eliminates duplication between standalone and cluster pathscreateStandaloneClient()andcreateClusterClient()How to Test
Standalone TLS (new default)
Expect logs:
Kue Redis: using ioredis standalone with TLS→Kue Redis standalone connected→Kue Redis standalone readyCluster TLS (opt-in)
Expect logs:
Kue Redis: using ioredis Cluster with TLS→Kue Redis Cluster connected→Kue Redis Cluster readyPlain Redis (unchanged)
No change in behavior — URL passed directly to kue.
🤖 Generated with Claude Code