Challenge - 5 Problems
Redis Persistence Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Difference between RDB and AOF persistence
Which statement correctly describes the main difference between RDB and AOF persistence in Redis?
Attempts:
2 left
💡 Hint
Think about how often data is saved and what is recorded.
✗ Incorrect
RDB creates point-in-time snapshots of the dataset at specified intervals. AOF records every write operation received by the server, allowing more fine-grained recovery.
❓ query_result
intermediate2: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?
Attempts:
2 left
💡 Hint
Consider when RDB saves data and what happens if Redis crashes unexpectedly.
✗ Incorrect
RDB saves data only at snapshot times. If Redis crashes before the next snapshot, recent writes after the last snapshot are lost.
📝 Syntax
advanced2: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
Attempts:
2 left
💡 Hint
Check the valid values for appendonly and appendfsync.
✗ Incorrect
To enable AOF, appendonly must be set to 'yes'. The appendfsync option controls how often Redis fsyncs the AOF file; 'everysec' is a common safe setting.
❓ optimization
advanced2: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?
Attempts:
2 left
💡 Hint
Think about balancing data safety and speed.
✗ Incorrect
Using AOF with 'everysec' fsync reduces data loss risk while keeping performance reasonable. RDB snapshots provide a backup in case AOF is corrupted.
🔧 Debug
expert2: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?
Attempts:
2 left
💡 Hint
Consider how appendfsync everysec works and timing of crashes.
✗ Incorrect
With appendfsync everysec, Redis fsyncs the AOF file once per second. If a crash occurs just before fsync, recent writes in memory are lost.