Question
RDB snapshots versus AOF: what differs, and when should each be used?
Answer
RDB captures point-in-time dataset images; AOF records write operations for replay. Use RDB for compact backups and faster large-dataset restarts; use AOF where a shorter acknowledged-write loss window is required. Applies to Redis and Valkey.