Font Size: a A A

The Design And Implementation Of A Cache System:zRedis

Posted on:2020-06-28Degree:MasterType:Thesis
Country:ChinaCandidate:H M HuangFull Text:PDF
GTID:2428330611954934Subject:Computer technology
Abstract/Summary:PDF Full Text Request
With the rapid development of computer network information technology,more and more computer applications are now concentrated on the network server.Early simple websites were no longer able to satisfy existing large-scale user access requests.The Web 2.0 era has arrived due to the surge in user traffic.Cache technology is a very practical technology that greatly optimizes the user experience.In the Web 2.0 related technology,caching technology is an important part of it.This thesis takes the development of a distributed cache system as the subject,fully studies the various existing cache systems,designs and implements a distributed cache system based on the difficult problems in engineering practice.The main contents of this thesis are as follows:1.It designed the overall architecture of the zRedis cache system,including three different components: the meta data server(zRedis MetaServer),the client agent(zRedis Proxy),and the actual data storage server(zRedis Server),which can reasonably allocate data to multiple nodes and implement Fast reading and writing.2.It Implemented a distributed and multi-threaded data storage server,which used the Reactor pattern to achieve a high-performance network service programs: quickly establishing multiple network connections,receiving and processing network request;using Google's Protobuf lib to solve the problem of TCP sticky packets;expanding the original single-threaded Redis into a multi-threaded network service program;solving the data sharing and data competition problem between multiple threads;the processing flow when the ordinary read/write request received by the storage server is also given;the flow of executing the data elimination algorithm between nodes is discussed too.3.The Raft algorithm is used to solve the distributed consistency problem of the system.At the same time,the processing mechanism of the Raft algorithm in the event of a Leader node crash,a Follower node crash,or a network partition occurs in various stages of the write operation.By expanding the stand-alone Redis into a distributed cache system,this system achieves a linear relationship between storage performance and hardware growth,improving the efficiency of computer hardware and reducing the operation and maintenance costs of the enterprise.
Keywords/Search Tags:Cache, Redis, Distributed System, Multithreading
PDF Full Text Request
Related items