Redis latency spikes to hundreds of milliseconds and `SLOWLOG GET` shows `KEYS user:*`.

IntermediateTroubleshootingLatency
Answer

Likely causes → Redis is single-threaded for commands. KEYS, large SMEMBERS/HGETALL, or big DELs block every other client while they run.

Diagnose →

redis-cli SLOWLOG GET 10
redis-cli --bigkeys
redis-cli INFO commandstats | sort -t= -k3 -nr | head

Fix → Replace KEYS with SCAN and a cursor, use UNLINK instead of DEL for big keys, and split huge keys.

Prevent → Disable dangerous commands (rename-command KEYS "" or ACLs in Redis 6+), and alert on slowlog length and p99 command latency.

All Real-World Interview questions Roadmap: Interview readiness

More on Latency