Redis & Caching (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Bigkey and Hotkey Detection in Production.
senior LevelredisAdvanced Internals
In Simple Words:
- Bigkey: A single key containing megabytes of data (e.g. a Set with 1M items). Reading it blocks the single-threaded event loop! Detect with
redis-cli --bigkeys. - Hotkey: A single key receiving 50,000+ QPS, saturating a single CPU core. Detect with
redis-cli --hotkeys. - Mitigation: Enable Client-Side Caching (Tracking) via RESP3 to cache hot keys in application RAM.