feat: add opt-in Redis cluster mode (REDIS_CLUSTER) for the data store - #779
Draft
Macrofig wants to merge 1 commit into
Draft
feat: add opt-in Redis cluster mode (REDIS_CLUSTER) for the data store#779Macrofig wants to merge 1 commit into
Macrofig wants to merge 1 commit into
Conversation
The redigo-based Redis data store is not cluster-aware and its multi-key init
fails on a cluster (CROSSSLOT), so managed cluster stores like AWS MemoryDB and
ElastiCache (cluster mode enabled) couldn't be used. Add a REDIS_CLUSTER option
that routes the feature data store to the cluster-aware go-redis integration
with ForceClusterMode: it seeds a cluster client from the single configuration
endpoint and applies the {ld}. hash-tag prefix. Default off; the redigo path and
all existing single-node behavior are unchanged.
Scope: feature data store only. The Big Segments store stays on redigo and is
not cluster-aware; config validation warns when REDIS_CLUSTER is set. Docs and a
config-parsing test added.
NOTE: uses a local replace directive to a fork of go-server-sdk-redis-go-redis
that adds ForceClusterMode; remove once released upstream. Run `go mod tidy`.
Co-Authored-By: Claude Opus 4.8 (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.
Requirements
Related issues
Provide links to any issues in this repository or elsewhere relating to this pull request.
Describe the solution you've provided
Provide a clear and concise description of what you expect to happen.
Describe alternatives you've considered
Provide a clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context about the pull request here.
Note
Medium Risk
Changes how persistent feature data is written to Redis when cluster mode is enabled, including a temporary dependency fork; misconfiguration could affect flag durability, while Big Segments on Redis remain unsupported in cluster mode.
Overview
Adds
cluster/REDIS_CLUSTERso the Relay Proxy can use a cluster-aware Redis client for the feature flag data store, aimed at managed clusters (e.g. AWS MemoryDB / ElastiCache) reached via a single configuration endpoint.When cluster mode is on,
ConfigureDataStorebuilds the persistent store withgo-redisandForceClusterMode(true)instead of the existing redigo path, seeding from the configured host/URL with TLS and auth as today. Non-cluster Redis behavior is unchanged.Validation logs a warning that cluster mode applies only to the feature store—the Big Segments Redis backend is still not cluster-aware. Docs and valid-config tests cover the new flag.
go.modtemporarily **replace**s the LaunchDarkly go-redis SDK integration with an actblue fork that suppliesForceClusterModeuntil upstream releases it.Reviewed by Cursor Bugbot for commit 461d5eb. Bugbot is set up for automated code reviews on this repo. Configure here.