RDB and AOF Overview Interview Questions
What is Redis persistence? — spoken sample answer for Indian interviews.
- 5Questions with answers
- 3Difficulty levels
Questions (5)
Browse beginner, intermediate, and advanced questions with answers — hide them when you want to self-test.
What is Redis persistence?
Persistence means Redis writes RAM to disk so a restart is not a blank cache. RDB is a snapshot. AOF is an append-only log of operations. I can use both. For a cache I can turn persistence off and rebuild from the DB. For sessions or a queue I would enable AOF with fsync every second as a common balance — I might lose about a second of writes, not the whole day. Persistence is not high availability. Replicas are a different topic. I would say that out loud so they know I do not confuse the two.
RDB versus AOF in one breath?
RDB: compact snapshot, can lose minutes. AOF: write log, better durability if fsync is tight, larger. I often use both. Cache-only Redis may persist nothing.
Can persistence block the main thread?
Fork for RDB/AOF rewrite can pause and spike COW memory. Slow fsync stalls. Watch latest_fork_usec. Persistence is not free.
When to turn persistence off?
Pure cache rebuildable from DB, and product accepts empty cache on restart. Not for sessions I cannot rebuild. Document that restart is a flush.
How do you restore after a crash?
Restart loads RDB then AOF. Check dump age. Off-box backups. Rehearse restore in staging. A backup you never restored is a hope.
Practice with AI mock interviews
Run Redis mock interviews with AI follow-ups, instant feedback, and analytics on AiLx.
Free to start · No credit card required