Redis replication (data की replica copies), Redis Sentinel (automatic failover monitoring), और Redis Cluster (sharding + replication) के माध्यम से high availability प्रदान करता है। इन्हें समझना production में Redis को reliably चलाने के लिए महत्वपूर्ण है।
Replication — primary और replicas
PRIMARY (master) → handles writes; asynchronously replicates data to replicas
REPLICAS (slaves) → copies of the primary's data; can serve READS (read scaling)
Write → Primary → async replication → Replicas (eventually consistent)
✓ Redundancy (replicas have copies) + read scaling (reads offloaded to replicas)
✗ Replication is ASYNC → a small lag; a failover could lose very recent writes
