Server Development NOTE 1: Server Architecture exploration and server architecture
Background
In Netease's first project, "don't be a devil", it is almost over now and a new project is coming soon.
Before starting the next project, we plan to create a test project. Because the HTML5 game under the project is very popular, the next project needs to support HTML5.
Currently domestic can choose cocos2d-js and egret, this test project colleagues have these two engines development, compare the two engines to see which one is more suitable.
I have been working on the front-end. The next project is intended to be switched to the back-end. below is the server architecture used in this test project.
Two gate servers
The gate server has two structures that are acceptable.
1. No partition: After logon authentication is completed, a connecter server is returned through the route;
2 partition: return all connector servers and their online users to the front end. Select different zones for the front end.
The client then disconnects the connection to the connector server.
Tri-er Server
Maintain the connection between the client and the server.
Messages between the intermediate client and the server.
For the partition structure, logon authentication is also required.
4. auth Server
The login server has the following functions:
1 Registration
2 login verification
Five logic servers
1 logic Server
The logical server is the interface for logical processing in the game, a group of servers.
Generally, there are scene servers, chat servers, Team servers, ranking servers, and so on.
2 domain
Processing Server-related logic operations
Six data servers
1 entity
Game data loaded into the memory.
If the data in the entity changes, it will be synchronized to the client and database.
2 data Server
Synchronize data in entities and databases.
Netease's open-source server engine pomelo is used. For more information, see.
----------------------------------------------
Updated on January 1, April 29, 2015
----------------------------------------------
Later I found that the partition method mentioned in the second and third methods is not very reasonable.
In this structure, all data is in the same database. You need to add a zone field for each player to mark the selected server.
For operations on the specified server, it is too inefficient to retrieve all players based on the zone field.
Currently, the feasible method is to set up a server that provides a server list and implement partitions through different gate servers.