Interview Databases & Caching

What are the durability trade-offs between RDB snapshots and AOF?

Databases & Caching · Advanced level

Answer

RDB has lower overhead and faster compact backups but can lose changes after the last snapshot. AOF can reduce loss depending on fsync policy, but increases disk usage, write cost, and rewrite complexity.

Technical explanation

RDB has lower overhead but loses changes since the last snapshot.

AOF with everysec can limit loss but adds disk usage and rewrite overhead.

Neither protects against logical deletes by itself; backups and restore tests are still needed.

Hands-on example

Decision example:

Rate-limit counters: RDB or no persistence may be acceptable.

Shopping cart stored only in Redis: use replication, backups, and stronger persistence, or move source of truth to RDS.

Document the RPO and prove it with a crash test.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Databases & Caching interview questions

← All Databases & Caching questions