0
0
Redisquery~20 mins

Why persistence matters in Redis - Challenge Your Understanding

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
Why is persistence important in Redis?

Redis is an in-memory database. What is the main reason to enable persistence in Redis?

ATo save data to disk so it is not lost if the server restarts or crashes
BTo speed up data retrieval by caching data in memory
CTo allow multiple clients to connect simultaneously
DTo encrypt data for security purposes
Attempts:
2 left
💡 Hint

Think about what happens if the server loses power suddenly.

query_result
intermediate
2:00remaining
What happens to data without persistence?

Assume Redis is running without any persistence enabled. You add a key-value pair user:1 -> 'Alice'. Then the server crashes and restarts. What will be the result of GET user:1 after restart?

AIt returns an empty string because the key exists but has no value
BIt returns null because data was lost after restart
CIt returns an error because the key is corrupted
DIt returns 'Alice' because data is stored in memory
Attempts:
2 left
💡 Hint

Consider what happens to in-memory data when the server restarts without saving it.

📝 Syntax
advanced
2:00remaining
Which Redis command enables snapshot persistence?

Which command configures Redis to save snapshots of the dataset to disk at regular intervals?

ASAVE
BPERSIST
CBGSAVE
DCONFIG SET save
Attempts:
2 left
💡 Hint

Think about how to configure automatic snapshot intervals.

optimization
advanced
2:00remaining
Choosing persistence for performance and durability

You want Redis to persist data but minimize performance impact. Which persistence method balances durability and speed best?

ARDB snapshots only
BNo persistence, rely on replication
CAOF with fsync every second
DAOF (Append Only File) with fsync always
Attempts:
2 left
💡 Hint

Consider how often data is written to disk and its effect on speed.

🔧 Debug
expert
2:00remaining
Why does Redis lose data despite persistence enabled?

You enabled both RDB snapshots and AOF persistence in Redis. However, after a server crash, some recent writes are missing. What is the most likely cause?

AAOF fsync policy is set to 'no' causing delayed writes to disk
BRDB snapshots overwrite AOF file causing data loss
CRedis does not support combining RDB and AOF persistence
DThe server crashed before Redis could start
Attempts:
2 left
💡 Hint

Check how often Redis flushes AOF data to disk.