Module Review
In this module, we covered how to make Redis durable and resilient:
- RDB Snapshotting: Creating point-in-time binary backups for fast recovery and disaster management.
- AOF (Append Only File): Recording every write command to provide maximum durability and prevent data loss.
- Sentinel: Building self-healing clusters that can automatically detect and recover from Master node failures.
1. Flash Quiz
1. What is the primary difference between RDB and AOF?
- RDB saves a snapshot of the data (state). AOF saves a log of all write commands (history).
2. Which persistence mode allows for the fastest Redis restart?
- RDB, because it is a direct binary representation of the memory.
3. What is the “Redis Rewrite” (AOF Rewrite) process?
- It’s a background process that creates a new, smaller AOF file by analyzing the current data in memory and writing the minimum set of commands needed to reconstruct it.
4. What is a “Quorum” in Redis Sentinel?
- The minimum number of Sentinels that must agree a Master is down before an automatic failover is initiated.
5. How does a Redis client know which node is the current Master after a failover?
- The client connects to the Sentinel instances, which provide the IP and Port of the current healthy Master.
2. What’s Next?
Durable data is great, but what if your dataset is too big for a single server? In the next module, we explore Redis Clustering, where we learn how to shard data across multiple nodes to achieve petabyte-scale memory storage.