Excerpt from: Multiplayer Online game server architecture
Http://wenku.baidu.com/view/aac987eae009581b6bd9eb8a.html
MMORPG load Balancing mechanism
1. Static distribution of players to the server
The average player is assigned to each server so that each server has the same number of players. The advantage of this approach is that the algorithm is simple, but the player moves on the map, so over time, at worst, there may be a lot of network traffic between the servers, because when the player completes an action, all the servers must obtain another server's player data, And the players in the vicinity are on different servers, so dependent, each player's one action needs to send messages to different servers, will cause a great burden of communication.
2. Static allocation of map fragments to the server
Use space cut to cut the virtual world into the same number of map fragments as the server, then assign the map fragments to each server, and then have a Dispacher server responsible for assigning each player to the corresponding server. But because the player will move on the map, so the time is long, in the worst case, the player may be on the same server map fragment, so the original load balance is completely destroyed.
3. Dynamically allocating map fragments to servers
Static allocation of map fragments to each server can reduce the bandwidth and load of the network between servers, but the player must be placed on the correct distribution map, the player's position is operated by the player, so there will be unpredictable problems, in order to overcome such problems, the map into smaller fragments, Then the dynamic allocation of map fragments to the server is required. However, this method to be efficient, the key is how to cut the map fragments, what to cut into the geometry of the shape, how many fragments cut. Most traditional methods are cut into square squares, the number of cutting according to the actual situation or simulated after the appropriate treatment.