MMOServerArchitectureDesign

From Seoushi Games

Jump to: navigation, search

This is now consider a legacy/ brainstorming document. The newer revised stuff will come from Here





Server Architecture

Gateway Server - Redirects all client traffic to the server they are looking for

Login Server - handles connection authentication and sets up the player session

Patch Server - handles patching the client up to the latest version required to play

World Server - handles a dynamic section of the game world ( npc's, objects, players )

Chat Server - allows creation of chat channels ( private, public, world ) and talking on them

Master World Server - manages world servers, telling where a player can be found and where players need to connect to switch between area. Also does load balancing, can recruit more world servers and resize the areas current ones control.

Database Server - holds player sessions, account/character information, items, skills, etc



Server Setup

The Gateway server is started first

World Master Servers are then started and tell the gateway server of their existence

World Servers are then started and tell the gateway server of their existence. The gateway server tells the World Master servers of their existence.

Patch Servers are started and tell the gateway server of their existence

Chat Servers are started and tell the gateway server of their existence

World Master servers talk to the World servers and see if there is one free. As load increases they ask for more world servers.




Typical Client session

Client connects to the gateway server and asks for the patch server

gateway server searches the patch server with the lowest load and returns it to the client

client connects to a patch server

client patches up game

client asks the gateway for a login server

gateway finds the best login server and returns the info

client authenticates with the login server

login server asks the master world servers for the right world server and returns the info to the client

client connects to the world server

client plays the game and eventually gets close to the world server boundry line, world server tells client to connect to another world server.

client is connected to both servers until they are safely over the boundry line





Alternative Connection Graph

In this configuration here are the roles of the servers


Client - A client is just another player, it knows the locations of the patch servers and gateway servers.

Gateways - A set of servers that know where the player servers are. A gateway can ask the botnet for more players servers if the current ones are full. The gateways are basically a router for new player traffic and load balance player servers. Gateways also know when a group of player servers can be combined into one so some can return to the botnet.

Chat - handles all game chat related functions

Patch Servers - Patch the client

Player Servers - Handle player connections between world simulators, basically are traffic routers for a set number of players to help with bandwidth. Player servers perform sanity checks on the players every so often and can lookup values such as items for the player. The last main function of the player servers are for login and character creation.

World Simulators - Keep track of one or more areas of the world. They also calculate npc behaviors. World Simulators can also ask the botnet for another server when it finds itself getting too bogged down. World servers are parented in the way that it knows who spawned it so when load decreases it asks it parent if it can handle it's current connections and return to the botnet.

Live & dirty databases - these are the most up to date versions of the database, they replicate between each other and also backup to the central databases.

Central Databases - these databases are what are used when spawning new "live and dirty databases" they also are the ones who basically are the backups incase of failure.

Botnet - this is just a group of idle servers that can turn into game servers when the load gets higher.


The main things I believe that are better about this approach are as follows:

1) The botnet means any server can perform pretty much any function (within reason, they can't be central DBs).

2) Having player servers mean that players won't have to connect to multiple servers during a session and the logins are localized to a server. They can also moderate players instead of it being a separate server or on the world server.

3) In this model while anything could fail, it doesn't mean it's the end of the world, failures are localized and the botnet can rush in and replace damaged servers.

4) live & dirty databases are a new I've picked up from researching, it just makes it safer and faster to update the central databases along with balancing load demand.