Font Size: a A A

Based On The ZMQ And Raft Multiplexed Game Server Architecture Design

Posted on:2021-01-27Degree:MasterType:Thesis
Country:ChinaCandidate:Q W YeFull Text:PDF
GTID:2428330611965931Subject:Engineering
Abstract/Summary:PDF Full Text Request
Since the 21st century,the Internet has developed rapidly in my country.As of the end of 2019,the number of Internet users in my country has reached 850 million,and the Internet penetration rate is about 60%.At the same time,the scale of Chinese mobile Internet users has reached 450 million,accounting for 73% of the total scale.With the popularity of mobile phones and the convenience of 4G networks,the mobile game industry has developed rapidly,and the number of mobile game players is constantly increasing.With such a huge number of players,the old server framework can no longer meet the demand.At this time,an excellent game server architecture is urgently needed.This type of architecture needs to have good disaster tolerance,scalability,and scalability while satisfying players' good gaming experience.It is designed to help companies speed up the development of similar game projects,thereby saving project costs and increasing corporate profits.This article is aimed at mobile MMORPG type games in online games,with server distributed design technology as the core,high performance,high stability,high scalability and high portability as the design target architecture,designed for mobile game servers Research on key technical points in the process,design a distributed MMORPG game server architecture,and design and implement with some open source technologies such as ZMQ network library and Raft consensus algorithm.The main research contents are as follows:1)Analyze the current development status of the mobile terminal online game industry,understand the different stages of server technology development,and study the problems faced by the current online game server technology.2)Collect and compare related server development technologies to find reasonable and efficient technologies to provide a basis for server architecture design.Related technologies mainly include: ZMQ network library,Raft consensus algorithm,Redis,and coroutine technology.3)By studying the characteristics of MMORPG mobile games,the functional requirements and non-functional requirements of the mobile game server architecture are proposed,and the functional composition of each module of the server architecture is analyzed as a design goal,and the distributed strategy of the overall architecture is worked out.The distributed server mainly includes: gateway server,game server,scene server,public server,database server,battle server,and routing server.The above architecture can be divided into four layers through structural layering,namely the network layer,the communication layer,the application layer,and the data layer.At the network layer,the ROUTER—DEALER mode based on the ZMQ message queue technology is used to implement message communication between the nodes in the distributed architecture,ensuring high-speed forwarding of the node's communication messages;at the communication layer,the coroutine-based technology is used Synchronous RPC scheme,which makes the distributed call process easier,does not lose the semantic simplicity of local calls when providing powerful remote call capabilities,and proposes a more efficient way to speed up and speed up data serialization and deserialization The speed of synchronous RPC response;at the application layer,the public business module is implemented using the idea based on the Raft consensus algorithm.It specifies a public server for the load balancing distribution of public business logic,ensuring the consistency of the public business,and can The node recovers quickly after a failure.In the data layer,Redis Cluster technology is used to complete the data cache function,reducing redundant operations on the database,and effectively improving the ability to read and write data.4)In the end,this article implements the corresponding functions according to the overall design and detailed design,and performs functional stress testing on the system.The test results verify that the above design can improve the data communication speed between nodes and the high-speed read and write ability of data.
Keywords/Search Tags:ZMQ, distributed architecture, Raft
PDF Full Text Request
Related items