Redisはレプリケーション(データのレプリカコピー)、Redis Sentinel(自動フェイルオーバー監視)、およびRedis Cluster(シャーディング + レプリケーション)を通じて高可用性を提供します。本番環境でRedisを確実に実行するには、これらを理解することが重要です。
プライマリとレプリカ — レプリケーション
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
