Interview › Databases & Caching
What is the difference between Redis as a cache and Redis as a primary datastore?
Databases & Caching · Advanced level
Answer
Redis as a cache is rebuildable from another source of truth. Redis as a primary datastore is authoritative, so persistence, backup, failover, no unsafe eviction, and recovery testing become mandatory.
Technical explanation
Cache data should be safely rebuildable from a durable source.
Primary-store data needs persistence, backups, no unsafe eviction, HA, and restore testing.
Financial records and durable ledgers should usually live in a transactional database, not only Redis.
Hands-on example
Classification:
Product details copied from RDS: cache.
User sessions: needs datastore-level HA policy.
Billing counters: needs durable queue, DB write, or reconciliation.
Set eviction to noeviction if data must not disappear.
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
- What is Amazon RDS, and what does it manage for you versus self-managed databases?
- What database engines does RDS support?
- What is the difference between RDS and Aurora?
- What is Multi-AZ in RDS, and how does automatic failover work?
- How long does an RDS Multi-AZ failover typically take, and what triggers it?
- What is the difference between Multi-AZ and a read replica?
- When would you use a read replica, and can it become a standalone database?
- Can a read replica be in a different region, and why would you do that?