Skip to content

feat: add opt-in Redis cluster mode (REDIS_CLUSTER) for the data store - #779

Draft
Macrofig wants to merge 1 commit into
launchdarkly:v8from
actblue:feat/redis-cluster-mode
Draft

feat: add opt-in Redis cluster mode (REDIS_CLUSTER) for the data store#779
Macrofig wants to merge 1 commit into
launchdarkly:v8from
actblue:feat/redis-cluster-mode

Conversation

@Macrofig

Copy link
Copy Markdown

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

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_CLUSTER so 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, ConfigureDataStore builds the persistent store with go-redis and ForceClusterMode(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.mod temporarily **replace**s the LaunchDarkly go-redis SDK integration with an actblue fork that supplies ForceClusterMode until upstream releases it.

Reviewed by Cursor Bugbot for commit 461d5eb. Bugbot is set up for automated code reviews on this repo. Configure here.

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>
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.

1 participant