0
0
Redisquery~20 mins

Redis persistence overview (RDB, AOF) - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Persistence Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Difference between RDB and AOF persistence
Which statement correctly describes the main difference between RDB and AOF persistence in Redis?
ARDB logs every write operation to a file, while AOF saves snapshots of the dataset at intervals.
BRDB saves snapshots of the dataset at intervals, while AOF logs every write operation to a file.
CBoth RDB and AOF save snapshots of the dataset at the same frequency.
DRDB and AOF are two names for the same persistence method in Redis.
Attempts:
2 left
💡 Hint
Think about how often data is saved and what is recorded.
query_result
intermediate
2:00remaining
Result of Redis restart with only RDB enabled
If Redis is configured to use only RDB persistence and it crashes before the next snapshot, what data will be available after restart?
ANo data will be available; Redis starts empty.
BAll data including the most recent writes before the crash.
COnly the data saved in the last snapshot before the crash.
DData will be partially corrupted and unusable.
Attempts:
2 left
💡 Hint
Consider when RDB saves data and what happens if Redis crashes unexpectedly.
📝 Syntax
advanced
2:00remaining
Correct Redis configuration for AOF persistence
Which Redis configuration snippet correctly enables AOF persistence with appendfsync set to 'everysec'?
Redis
appendonly yes
appendfsync everysec
A
appendonly yes
appendfsync everysec
B
appendonly no
appendfsync always
C
appendonly maybe
appendfsync everysec
D
appendonly yes
appendfsync no
Attempts:
2 left
💡 Hint
Check the valid values for appendonly and appendfsync.
optimization
advanced
2:00remaining
Choosing persistence for minimal data loss and performance
You want Redis to minimize data loss but also maintain good performance. Which persistence setup is best?
ADisable both RDB and AOF for best performance.
BEnable only RDB snapshots every hour.
CEnable AOF with appendfsync always and disable RDB.
DEnable AOF with appendfsync everysec and RDB snapshots as backup.
Attempts:
2 left
💡 Hint
Think about balancing data safety and speed.
🔧 Debug
expert
2:00remaining
Diagnosing Redis data loss after crash with AOF enabled
Redis is configured with AOF enabled and appendfsync set to 'everysec'. After a crash, some recent writes are missing. What is the most likely cause?
AThe crash happened less than one second after the last fsync, so recent writes were not yet flushed to disk.
BRDB snapshots overwrite AOF data causing loss.
CAOF was disabled, so no writes were logged.
Dappendfsync was set to 'always', causing data loss.
Attempts:
2 left
💡 Hint
Consider how appendfsync everysec works and timing of crashes.