计算机应用与软件2026,Vol.43Issue(4):10-18,27,10.DOI:10.3969/j.issn.1000-386x.2026.04.002
基于双缓存和消息队列模式的数据一致性策略研究
DATA CONSISTENCY STRATEGY BASED ON DOUBLE CACHE AND MESSAGE QUEUE PATTERN
摘要
Abstract
To address the problems of distributed clustering technology in maintaining strong data consistency with high cost and maintenance difficulties,we propose a data consistency strategy(Data Consistency-Double Redis Kafka,DC-R2K)based on double cache and message queue mode with low resource allocation,aiming to achieve the final consistency of data without user perception with the lowest latency.This paper analyzed the data storage methods of cached databases and relational databases,and constructed a Redis-based storage model to initialize hot data to a double-cached database with read and write separation.The paper used message queue to receive buffer for read requests in high concurrent requests and divert read and write requests.The paper completed asynchronous update of data through message queue to reduce the time consumption of data consistency as much as possible.The experimental results show that DC-R2K improves the application throughput by13.68%~26.96%and reduces the response time by 47.22%~86.75%compared with the traditional single cache,with lower resource consumption compared with the use of clustered servers,and the results have practical application value.关键词
双缓存/消息队列/数据一致性/高并发Key words
Double cache/Message queue/Data consistency/High concurrency分类
信息技术与安全科学引用本文复制引用
高佳宁,刘美,杨富钧,孙芊,廖雪花..基于双缓存和消息队列模式的数据一致性策略研究[J].计算机应用与软件,2026,43(4):10-18,27,10.基金项目
国家社会科学基金一般项目(20BMZ092). (20BMZ092)