Interview › Databases & Caching
How do you handle cache warming after a restart or failover?
Databases & Caching · Advanced level
Answer
Cache warming preloads hot keys after restart, failover, or new cluster creation so user traffic does not create a cold-cache miss storm. It must be throttled and monitored to avoid overloading the database.
Technical explanation
Cold caches can shift traffic to RDS and create a secondary outage.
Warm only known hot keys and throttle the job.
Stop warming if source DB or application SLOs degrade.
Hands-on example
Warmup job:
for key in $(cat top_keys.txt); do curl -s "https://product-service/internal/cache-warm?key=$key" >/dev/null; sleep 0.05; done
Stop if RDS CPU > 70% or app p95 exceeds SLO.
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?