हालाँकि Redis in-memory है, यह डेटा को disk पर persist कर सकता है ताकि डेटा restarts से बच जाए। यह दो तंत्र प्रदान करता है — RDB (point-in-time snapshots) और AOF (operations का append-only log) — जिनमें अलग-अलग durability/performance trade-offs हैं।
RDB — point-in-time snapshots
RDB takes SNAPSHOTS of the dataset at intervals, saving a compact binary file.
✓ Compact single-file backups; fast restarts (load the snapshot)
✓ Good for backups and disaster recovery; less impact on performance
✗ You can LOSE data since the last snapshot (e.g. last few minutes) if Redis crashes
→ Configure save points: e.g. "save after 900s if ≥1 change, 300s if ≥10 changes"
