Skip to content

Add Redis Cluster support - #44

Closed
fatihergin wants to merge 2 commits into
hexcowboy:mainfrom
fatihergin:cluster_support
Closed

Add Redis Cluster support#44
fatihergin wants to merge 2 commits into
hexcowboy:mainfrom
fatihergin:cluster_support

Conversation

@fatihergin

@fatihergin fatihergin commented Nov 9, 2025

Copy link
Copy Markdown

Addresses #21.

Please review the Docker setup (tests) with extra care, as I'm new to Docker.

Changes

  • Add Redis Cluster support via:
    • LockManager::new_cluster(uris: Vec<Vec<T>>)
    • LockManager::from_cluster_clients(clients: Vec<ClusterClient>)
  • Add cluster integration tests (single_cluster, multi_cluster)
  • Add Docker Compose test environment with 3 Redis clusters
  • Update README with cluster usage and locking behavior

Testing

Test single-cluster (simple lock) and multi-cluster (Redlock) behavior:

# Executes both single and multi-cluster examples
docker compose -f examples/docker-compose-cluster.yml up --build

@hexcowboy

Copy link
Copy Markdown
Owner

Thanks @fatihergin for putting this together. We decided to proceed with a separate implementation which keeps cluster support opt-in and accepts a preconfigured ClusterClient for advanced configuration. We also scoped each manager to one logical Redis Cluster to avoid conflating cluster seed nodes with independent Redlock quorum members. We really appreciate your contribution -- it helped clarify the design tradeoffs.

@hexcowboy hexcowboy closed this Jul 30, 2026
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.

2 participants