Font Size: a A A

Optimization And Realization Of Primary Redis Cluster

Posted on:2018-02-26Degree:MasterType:Thesis
Country:ChinaCandidate:K LiFull Text:PDF
GTID:2428330569975207Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Redis server is a K/V database which is very widely used.It has gradually replaced Memcache with the support of rich data structures,transactional capabilities,persistence capabilities,and subscription publishers.And these make it the preferred server for database caching.But with the development of mobile Internet,the network server load is growing.At the same time,the expansion of the amount of data and the vast number of Internet users on the service response speed requirements continue to increase.And stand-alone Redis server has been unable to meet the production needs,so Redis cluster has been widely used.However,the Redis cluster programs on the market there are various,and each has its own merits.The official Redis cluster program,which has been popular in the market,has also exposed some deficiencies.There are three major deficiencies: high client complexity,no consideration of CPU affinity,and no memory load balancing.Based on the research on several popular Redis cluster schemes,this paper analyzed the advantages and disadvantages of various schemes.We have studied of the principle of original Redis cluster program in-depth.We analyzed some shortcomings in the original Redis cluster.Then,the three-point optimization proposal of the original Redis cluster is put forward.Those are removing user's requests between nodes in the cluster,binding the Redis instance to the CPU core,and controlling the load balancing of memory utilization.Because Redis is an open source server program,this paper realizes the three optimization suggestions proposed by modifying the server source code and writing script.By increasing the request removing module,the receiving module and the proxy client we achieved the request removing function within the cluster.By writing the deployment script,we implemented the binding of the Redis instance and the CPU kernel.By increasing the load balancing control node,we achieved the balance of the memory usage of the physical machines in the cluster.And by using the standby server and heartbeat mechanism,we achieved a high availability of load balancing servers.Finally,we verified the effect of optimization by deploying and testing the optimized cluster in a lab environment.It is verified that the optimized cluster has a significant performance advantage when the number of requests on each connection is small and medium scale.At the same time,it verifies that the memory load control node plays the expected effect.
Keywords/Search Tags:Cluster, Database, Cache, Optimization, High availability, Load balancing
PDF Full Text Request
Related items