Optimization of Redis Cluster Systems Based on Load Balancing Mechanism

Yimei Xu, Pengju He, Xiaohua Zhang, Chunli Su · 2025

In recent years, with the rapid development of network technology, data scale has grown exponentially. Redis, as a renowned high-performance in-memory database, features a flexible data model and high scalability, making it widely adopted in scenarios involving large-scale data and high concurrency, significantly enhancing the performance of data read and write operations. To address the issue of real-time load imbalance in Redis clusters caused by hot data, this paper proposes a hierarchical load balancing mechanism for Redis clusters based on a time-wheel structure and second-order differenced exponential smoothing (TSSDES). The mechanism achieves finer-grained hierarchical classification of hot keys. In this scheme, the timewheel mechanism categorizes keys of varying access frequencies into two levels. The first-level hot keys are cached in Caffeine to achieve off-cluster load balancing, while the second-level keys are monitored for their hash slot and node load conditions. The second-order differenced exponential smoothing method is employed to predict node overload, determining whether intracluster load balancing is necessary. If required, a greedy-based slot migration strategy is applied to exchange hash slots, thereby achieving intra-cluster load balancing. The experimental results demonstrate that this solution achieves a performance improvement of over approximately 10% compared to the native Redis Cluster when the number of requests reaches the millionlevel scale.

Read the paper · More papers on PaperTik