A Study on Redis-Based Aided Caching Pattern for Relational Database Hotspot Data
Ziying Zhang, Xianglong Li, Qian Zhao, Xuehua Liao, Zhousen Zhu · 2024
Aiming at the problems of low hotspot data prediction accuracy, complex prediction model structure, and non-uniform data caching structure of existing caching technology, this paper proposes a lightweight relational database hotspot data caching model, which realizes the relational database hot table data migration storage to the Redis caching database by constructing the hotspot prediction model and the data migration storage model (including KV-TO, KV-PA, and KV-FC), solving the I/O read/write bottleneck problem of relational database and reducing the interaction frequency with disk. Compared with the traditional hotspot prediction scheme, the hot table prediction model in this paper adopts the idea of cache elimination algorithm, simplifies the data model, and improves the cache hit rate by 17.67% and 10.19% compared with the traditional log monitoring model and hotspot data prediction model, respectively. Meanwhile, all three data migration storage models can achieve fast migration of hotspot data to Redis, in which the migration time of the KV-TO model is shorter; the memory utilisation of the KV-FC model is higher. Engineering practice shows that the model not only has low cost and fast efficiency, but also improves the throughput capacity of the database in high concurrency scenarios and achieves efficient access to massive hotspot data.