A complete, ready-to-run Redis Sentinel & Cluster playground with Docker Compose for
learning, testing, and deploying Redis in real-world scenarios.
This project provides a hands-on Redis lab that covers both Sentinel and Cluster modes:
- β‘ Redis Sentinel β High Availability & Automatic Failover
- π¦ Redis Cluster β Sharding + High Availability
π― Goal: Help developers, DevOps, and students experiment, validate, monitor, and integrate Redis into production-like environments.
- β Quick Bootstrap β Start Sentinel & Cluster in seconds with Docker Compose
- β Automation Scripts β Health checks, failover tests, rollback, backups, slot rebalancing, integrity, and security scan
- β CI/CD Ready β GitHub Actions/GitLab CI for automated testing & deployment
- β Configurable β Easily adjust number of nodes, replicas, memory limits, persistence
- β Comprehensive Docs β Setup guides, architecture explanations, usage examples
- β Realistic Workloads β Simulate traffic with redis-benchmark and custom scripts
- β Data Persistence β RDB/AOF configurations for durability testing
- β Backup & Restore β Automated backup scripts and restore procedures
- β Failover Testing β Simulate node failures and observe automatic recovery
- β Scaling β Add/remove nodes and reshard data with minimal downtime
- β Monitoring Stack - Redis-Commander, Redis-Exporter, Prometheus, Grafana for real-time insights
- π¨βπ» Backend Developers β Learn caching, pub/sub, queues, session storage
- π οΈ DevOps / SREs β Practice HA, failover recovery, monitoring, scaling
- π Students / Learners β Experiment with Redis concepts in a safe sandbox
- ποΈ System Architects β Validate Redis as a distributed system building block
flowchart TD
S1["π°οΈ Sentinel 1"]
S2["π°οΈ Sentinel 2"]
S3["π°οΈ Sentinel 3"]
M["π₯ Master (6379)"]
R1["π¦ Replica 1 (6380)"]
R2["π¦ Replica 2 (6381)"]
S1 --> M
S2 --> M
S3 --> M
M --> R1
M --> R2
flowchart LR
%% Before failover
subgraph Left["Before Failover"]
direction TB
Sentinel1(Sentinel) --> Master1
Sentinel2(Sentinel) --> Master1
Sentinel3(Sentinel) --> Master1
Master1([Master]) --> Slave1([Slave])
Master1 --> Slave2([Slave])
end
%% After failover
subgraph Right["After Failover"]
direction TB
Sentinel4(Sentinel) --> NewMaster
Sentinel5(Sentinel) --> NewMaster
Sentinel6(Sentinel) --> NewMaster
OldMaster([Master Down]) --> Slave2([Slave])
NewMaster([New Master]) --> Slave2
end
Left --> Right
flowchart LR
M1["π₯ Master #1 (Slots 0β5460)"] --> R1["π¦ Replica #1"]
M2["π₯ Master #2 (Slots 5461β10922)"] --> R2["π¦ Replica #2"]
M3["π₯ Master #3 (Slots 10923β16383)"] --> R3["π¦ Replica #3"]
We welcome you to contribute and help improve Reluster π
Fork β Hack β Test β PR. Here are a few ways you can get involved:
- π Reporting Bugs: If you come across any bugs or issues, please check out the reporting bugs guide to learn how to submit a bug report.
- β¨ Suggestions: Have ideas to enhance features? We'd love to hear them! Check out the contribution guide to share your suggestions.
- β Questions: If you have questions or need assistance, open discussions or join our to connect with other users and contributors.
Distributed under the Apache 2.0 license. Copyright (c) 2025 Thuong Truong.