What is Redis persistence and how does it work?

Updated Apr 23, 2026

Short answer

Redis persistence allows saving in-memory data to disk using RDB snapshots or AOF logs.

Deep explanation

Redis provides two persistence mechanisms: RDB (snapshotting) and AOF (append-only file). RDB saves the dataset at intervals, while AOF logs every write operation. RDB is faster but less durable, while AOF is more reliable but slower. They can be used together for better durability.

Real-world example

Financial systems use AOF to ensure no data loss.

Common mistakes

  • Not enabling persistence leading to data loss.

Follow-up questions

  • Which is more reliable RDB or AOF?

More Redis interview questions

View all →