Interview › Databases & Caching
How would you debug rising latency on a service that depends on Redis and RDS together?
Databases & Caching · Advanced level
Answer
To debug latency involving both Redis and RDS, I break the path into cache hit/miss, Redis latency, DB query time, connection wait, and app processing, then correlate hit ratio, Redis metrics, RDS DB load, and top SQL.
Technical explanation
First determine whether Redis is slow, cache misses increased, or RDS is slow independently.
Break request latency into cache time, hit/miss, DB time, connection wait, and app time.
Correlate deploy markers with cache hit ratio, Redis latency, RDS DB load, and top SQL.
Hands-on example
Triage graph:
service p95/p99 latency
Redis hit ratio and evictions
Redis command latency
RDS CPU, connections, DB load
Performance Insights top SQL
If hit ratio drops and RDS load rises, investigate TTL, invalidation, warmup, or eviction.
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
- How do you test a Redis or database failover without impacting users?
- What is the blast radius of a cache outage, and how do you make the app degrade gracefully?
- How do you handle cache warming after a restart or failover?
- How do you decide what to cache and what not to cache?
- How would you use Redis for distributed locking, and what are the caveats?
- How would you use Redis for rate limiting?
- What is the difference between Redis as a cache and Redis as a primary datastore?
- Why are some Redis commands (KEYS, FLUSHALL) dangerous in production?