Interview Databases & Caching

What is the impact of a large key or hot key in Redis, and how do you handle it?

Databases & Caching · Advanced level

Answer

A large key increases memory, network, replication, and latency cost; a hot key concentrates too much traffic on one key or shard. I handle them by splitting keys, redesigning data structures, local caching, and request coalescing.

Technical explanation

Large keys increase memory, network, replication, and command latency cost.

Hot keys overload one shard or event loop even if total cluster capacity looks healthy.

Fixes include splitting keys, better data structures, local cache, key sharding, and request coalescing.

Hands-on example

Investigation:

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

SCAN 0 MATCH product:* COUNT 1000

MEMORY USAGE product:v2:123

Avoid KEYS in production.

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