Computer Science ›› 2017, Vol. 44 ›› Issue (10): 165-170.doi: 10.11896/j.issn.1002-137X.2017.10.031

Previous Articles     Next Articles

Election Scheme Optimization of Redis Cluster Based on Bully Algorithm

WANG Fen, GU Nai-jie and HUANG Zeng-shi   

  • Online:2018-12-01 Published:2018-12-01

Abstract: With the rapid development of Internet,users obtain more and more information from the system,and the frequency of accessing to system also grows rapidly.While a large number of clients access to the system,the response time of the request greatly increases,the traditional relational database is unable to meet the demand of the user,but in-memory database guarantees the stability of system,improves the user experience,and obtains more and more application.As a kind of in-memory database of NoSQL,Redis supports many data types,and it is applicable to many cases of requirements in caching and storage.In this paper,we mainly introduced Redis cluster,which is a distributed implementation of the Redis,supports master-slave replication,has a certain degree of fault tolerance and linear scalability,and recently is used by Sina microblog,github and so on.Although it is widely used,current Redis cluster occasionally has the case that long recovery time is needed after node fails,which has something to do with election algorithm of current Redis cluster,that is the implementation of Raft algorithm.In this paper,we analyzed the reliability of Redis cluster,and optimized the election algorithm of cluster.The results in test show that the optimized cluster can successfully recover in 50 seconds while only one master node is offline,and it is 40% higher than that of the cluster of the community version.

Key words: Redis cluster,Election algorithm,Epoch,Node,Fail,Recovery

[1] CODD E F.Relational database:a practical foundation for productivity[J].Communications of the ACM,1982,25(2):109-117.
[2] SHASHANK T.Professional NoSQL.http://is.muni.cz/publication/1062829.
[3] HAN J,HAIHONG E,LE G,et al.Survey on NoSQL database[C]∥2011 6th International Conference on Pervasive Computing and Applications (ICPCA).IEEE,2011:363-366.
[4] Bradley Joseph Fitzpatrick.memcached.http://memcach-ed.org.
[5] HAN L,LI X.The Implementation of the Redis protocol based on NOSQL database storage.http://www.paper.edu.cn/html/releasepaper/2011/08/519.(in Chinese) 韩利,李昕.基于MySQL数据库存储的 Redis 协议实现.http://www.paper.edu.cn/html/releasepaper/2011/08/519.
[6] GARCIA-MOLINA H,SALEM K.Main memory database systems:An overview[J].IEEE Transactions on Knowledge and Data Engineering,1992,4(6):509-516.
[7] Salvatore Sanfilippo.Redis.http://redis.io.
[8] CATTELL R.Scalable SQL and NoSQL data stores[J].ACM SIGMOD Record,2011,39(4):12-27.
[9] WANG X Y.Memcached and Redis’s application in cache[J].Wireless Internet Technology,2012(9):8-9.(in Chinese) 王心妍.Memcached 和 Redis 在高速缓存方面的应用[J].无线互联科技,2012(9):8-9.
[10] DB-Engines ranking.http://db-engines.com/en.
[11] BEREZECKI M,FRACHTENBERG E,PALECZNY M,et al.Many-core key-value store[C]∥2011 International Green Computing Conference and Workshops (IGCC).IEEE,2011:1-8.
[12] ONGARO D,OUSTERHOUT J.In search of an understandable consensus algorithm[C]∥2014 USENIX Annual Technical Conference (USENIX ATC 14).2014:305-319.
[13] AGRAWAL P.Fault tolerance in multiprocessor systems wi-thout dedicated redundancy[J].IEEE transactions on compu-ters,1988,37(3):358-362.
[14] GARCIA-MOLINA H.Elections in a distributed computingsystem[J].IEEE Transactions on Computers,1982,100(1):48-59.
[15] KORDAFSHARI M S,GHOLIPOUR M,MOSAKHANI M,etal.Modified bully election algorithm in distributed systems[J].WSEAS Transactions on Information Science and Applications,2005,2(8):1189-1194.

No related articles found!
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!