摘要
为了解决Redis数据库复制性能差和扩展性差的问题,该文设计了一个Redis可扩展与高效复制方案,即基于文件共享的主从复制和基于一致性哈希的集群(RSCCH-Redis,Replication on Share and Clusters on Consistent Hash of Redis)方案.该方案在Redis应用中引入了一致性哈希以实现可扩展性及引入了基于文件共享的主从复制功能来提高复制性能;采用一致性哈希作为映射方式,并在其中引入了虚拟节点,这样不但保证了映射关系的单调性与分散性,还保证了映射的负载均衡性;采用文件共享的主从复制方式,可以避免初次复制时大量的数据传输,减轻网络压力,加快复制速度,从而减少故障恢复时间.实验数据表明,该文设计的Redis高可用方案RSCCH-Redis不但解决了Redis数据库复制性能差的问题,而且有着良好的可扩展性.
In order to solve the problem of replication and expand,a extendable and high efficiency replication Redis schema has been proposed in this paper,named RSCCH-Redis(Replication on Share and Clusters on Consistent Hash of Redis).The schema adopts consistent hash to implement the extendable Redis and adopts the master slave replication function based on shared files to deal with the single node faulty.With the consistent hash and the virtual node in it,the system not only makes sure that the mapping pattern is monotonous and decentralizes,but also makes that load balancing.With the master slave replication function,it can avoid transporting mass data and decrease the network pressure and improve the replication speed,thus decreasing the recovery time.The experiment result demonstrates that the high available Redis schema named RSCCH-Redis not only solve replication problem,but also extendable.
作者
李法平
王成良
LI Fa-ping;WANG Cheng-liang(Chongqing College of Electronic Engineering,Chongqing 401331,China;School of Soft Engineering,Chongqing University,Chongqing 401331,China)
出处
《西南师范大学学报(自然科学版)》
CAS
北大核心
2018年第3期83-90,共8页
Journal of Southwest China Normal University(Natural Science Edition)
基金
重庆市教委课题(KJ1729408)