Interview Databases & Caching

How do you monitor Redis/ElastiCache (evictions, memory, latency, hit ratio)?

Databases & Caching · Advanced level

Answer

I monitor Redis or ElastiCache with hit ratio, latency, CPU, memory, evictions, fragmentation, connections, rejected connections, replication lag, slowlog, command stats, and application fallback rate.

Technical explanation

Global hit ratio can hide bad key patterns; monitor by endpoint or key prefix where possible.

Large keys and hot keys can overload a single Redis thread or shard even when total cluster capacity looks fine.

Use SCAN and UNLINK instead of KEYS and mass DEL; restrict dangerous commands through ACLs or operational policy.

Hands-on example

Operational commands:

INFO stats

INFO memory

INFO commandstats

SLOWLOG GET 10

LATENCY LATEST

redis-cli --bigkeys -h <host> -p 6379

Safe cleanup pattern:

redis-cli --scan --pattern "session:*" | while read key; do redis-cli UNLINK "$key"; done

Pipeline warmup in batches instead of one command per network round trip.

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