Interview › Databases & Caching
What is the difference between strong and eventual consistency, and where does caching sit?
Databases & Caching · Advanced level
Answer
Strong consistency means reads reflect the latest committed write; eventual consistency means replicas or caches can be temporarily stale. Caches usually introduce eventual consistency unless reads bypass or refresh after writes.
Technical explanation
Caches can serve older values until TTL expiry or invalidation.
Read-after-write paths often need primary reads or synchronous cache invalidation.
Different data has different consistency tolerance: product descriptions differ from balances.
Hands-on example
Profile update flow:
UPDATE users SET name = ... WHERE id = 123;
After commit: DEL user:v2:123.
Return updated profile directly from the write response or bypass cache briefly for that user.
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?