Recall & Review
beginner
What is RDB in Redis?
RDB (Redis Database) is a snapshotting method that saves the dataset to disk at specific intervals. It creates a point-in-time copy of the data.
Click to reveal answer
beginner
What does AOF stand for and what is its purpose in Redis?
AOF stands for Append Only File. It logs every write operation received by the server, allowing Redis to rebuild the dataset by replaying these commands.
Click to reveal answer
intermediate
Why combine RDB and AOF in Redis?
Combining RDB and AOF gives both fast recovery from snapshots (RDB) and a more complete, fine-grained log of changes (AOF), improving durability and performance.
Click to reveal answer
intermediate
How does Redis use RDB and AOF together during restart?
Redis loads the RDB snapshot first for a quick dataset load, then replays the AOF log to apply any changes made after the snapshot, ensuring data is up-to-date.
Click to reveal answer
advanced
What is a key advantage of using AOF with the 'every second' fsync policy?
It balances durability and performance by syncing the AOF file to disk every second, reducing data loss risk while keeping Redis fast.
Click to reveal answer
What does RDB do in Redis?
✗ Incorrect
RDB creates snapshots of the dataset at specific times to save data to disk.
What is the main benefit of AOF over RDB?
✗ Incorrect
AOF logs every write operation, allowing more complete recovery than periodic snapshots.
When Redis restarts using combined RDB + AOF, what happens first?
✗ Incorrect
Redis loads the RDB snapshot first for a quick start, then replays the AOF log.
Which fsync policy for AOF balances durability and performance?
✗ Incorrect
Fsync every second reduces data loss risk while keeping Redis fast.
Why might you use both RDB and AOF in Redis?
✗ Incorrect
Using both improves durability and speeds up recovery by combining snapshot and log methods.
Explain how Redis uses RDB and AOF together to ensure data durability and fast recovery.
Think about what happens during normal operation and after a restart.
You got /5 concepts.
Describe the advantages and disadvantages of using only RDB or only AOF for Redis persistence.
Consider data loss risk and recovery speed.
You got /5 concepts.