Skip to content

hot key problem

Redis的热Key是指在短时间内被大量请求频繁访问的某个或某些Key,相比其他Key接收更多流量,造成(节点)负载分布不均

Impact of Hot Keys

Single-node bottleneck - One Redis node handles all requests

Increased latency - Queue buildup for hot key operations

Network saturation - Large values amplify bandwidth issues

Cluster imbalance - Hot key's slot receives disproportionate load

Cascading failures - Hot key node failure affects many requests

How to Solve the Hot Key Problem

Detection - Monitor access patterns to identify hot keys early

Local Caching - Reduce Redis load with client-side caching

Key Splitting - Distribute load across multiple physical keys

Read Replicas - Route hot key reads to replicas

Probabilistic Expiration - Prevent cache stampede with early refresh

Cluster Awareness - Distribute across slots in Redis Cluster


Comments