CN102710615B - Method for equalizing dynamic load of network game - Google Patents

Method for equalizing dynamic load of network game Download PDF

Info

Publication number
CN102710615B
CN102710615B CN201210151017.8A CN201210151017A CN102710615B CN 102710615 B CN102710615 B CN 102710615B CN 201210151017 A CN201210151017 A CN 201210151017A CN 102710615 B CN102710615 B CN 102710615B
Authority
CN
China
Prior art keywords
server
load
list
underloading
server list
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201210151017.8A
Other languages
Chinese (zh)
Other versions
CN102710615A (en
Inventor
王洪彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Pixel Software Technology Co Ltd
Original Assignee
Beijing Pixel Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Pixel Software Technology Co Ltd filed Critical Beijing Pixel Software Technology Co Ltd
Priority to CN201210151017.8A priority Critical patent/CN102710615B/en
Publication of CN102710615A publication Critical patent/CN102710615A/en
Application granted granted Critical
Publication of CN102710615B publication Critical patent/CN102710615B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The inventive embodiment provides a method for equalizing dynamic load of network games. The method the steps of recording an overloaded server in a load server list when judging a server exceeds load, and recording servers adjacent to the overloaded server and load information of the adjacent servers in an underloaded server list; traversing the underloaded server list to find the overloaded server, and recording the servers adjacent to the found overloaded server and its load information in the underloaded server list; and executing load equalization between a server with the lightest load in the underloaded server list and a server with the heaviest load in the load server list, and updating the load server list and the underloaded server list. By dynamically finding the underloaded server, the load equalization efficiency is significantly improved, very high response speed can be provided for players, and the requirement of network games for high real-time property is satisfied.

Description

A kind of online game dynamic load balancing method
Technical field
Embodiment of the present invention relates to field of network game technology, more specifically, relates to a kind of online game dynamic load balancing method.
Background technology
Network (Online Game), claim again " game on line ", be called for short " network game ", finger be take the Internet as transmission medium, take game carrier server and subscriber computer is processing terminal, and the game client software of take is information interaction window is intended to realize amusement, leisure, exchange and obtain the individuality MMOG with sustainability just inventing.Online game difference and single-play game, refer to that player must connect to carry out multiplayer by the Internet.Refer generally to by computer network, under virtual environment, character and scene be operated to reach the game products set of amusement and interactional purpose according to certain rule by several players.
MMO online game is often that thousands of player is simultaneously online, in order to carry out real-time response to player's information, conventionally needs multiple servers to process the information from each player.Therefore, finding efficient load-balancing algorithm becomes and in online game, needs one of major issue solving.
In currently available technology, to the research of load-balancing technique in online game, be not also a lot, it is the strategy generally adopting in present online game that dynamic map distributes, and is divided into the local and overall situation two large classes.
In partial load balance policy, according to the distribution density segmentation map of virtual objects on map, when server overloads, in part, find underloading server and carry out equilibrium.The dynamic load leveling of this part is redistributed needed overhead and is much smaller than the overall situation.Yet when load maldistribution, some adjacent service devices are all when full load, the performance of partial load equilibrium can decline suddenly, so load-balancing efficiency is not high.
In GSLB strategy, during each server overload, all to re-start load balancing to all servers.This GSLB can distribute load more uniformly from overall angle.Yet along with increasing of player and server, the number of players of the expense of system and needs migration is by sharp increase, so the efficiency of load balancing is not high yet.
Summary of the invention
Embodiment of the present invention proposes a kind of online game dynamic load balancing method, improves load-balancing efficiency.
The concrete scheme of embodiment of the present invention is as follows:
A method for online game dynamic load leveling, comprising:
When determining server overloads, this overload server is logged into load server list, and the neighbor server of this overload server and load information thereof are logged into underloading server list;
Traversal underloading server list is to search overload server, wherein the overload server finding is deleted and be logged into load server list from underloading server list, and the neighbor server of the overload server that this is found and load information thereof are logged into underloading server list;
According to the load information in underloading server list, determine the load state of server in described underloading server list, and the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade described load server list and underloading server list.
The load information of described neighbor server comprises: the active role number of neighbor server and rest role number.
Described determining server overload is:
The load of judging this server is greater than T1; Wherein:
T1=0.90×MaxB;
MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
Described server maximum load value equals active role and counts * 25+ rest role number.
The server that logic neighbor server or the stochastic searching that described neighbor server is this overload server arrived.
The method further comprises:
In load server list the server of pack heaviest with underloading server list in the lightest server of load carry out after load balancing, further judge whether this server load in load server list is greater than load higher limit, if it is in continuation and underloading server list, load time the lightest server is carried out load balancing, otherwise from load server list, deletes this server.
Described load higher limit is T2, wherein T2=0.80 * MaxB;
MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
Described server maximum load value equals active role and counts * 25+ rest role number.
From technique scheme, can find out, in embodiment of the present invention, when determining server overloads, this overload server is logged into load server list, and the neighbor server of this overload server and load information thereof are logged into underloading server list; Then travel through underloading server list to search overload server, wherein the overload server finding is deleted and be logged into load server list from underloading server list, and the neighbor server of the overload server that this is found and load information thereof are logged into underloading server list; Then according to the load information in underloading server list, determine the load state of server in described underloading server list, and the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade load server list and underloading server list.
As can be seen here, after application embodiment of the present invention, by dynamically finding underloading server, no matter be on the ratio of overload player and mobile number of players, or in the cost of system, there is good performance, therefore significantly improved the efficiency of load balancing.Embodiment of the present invention has been taked efficient underloading server finding method, and the concurrent carrying number of players of server has improved 1 times, and game server can provide response speed very fast to player, has met the demand of online game high real-time.
And embodiment of the present invention has guaranteed that games system is stable, this for requiring to there is real-time, the network game server framework of autgmentability, flexibility is well suited for.
Accompanying drawing explanation
Fig. 1 is the online game dynamic load balancing method flow chart according to embodiment of the present invention;
Fig. 2 is the online game dynamic load balancing method exemplary flow chart according to embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, the present invention is described in further detail.
In embodiment of the present invention, a kind of dynamic underloading server finding method is proposed.The method has overcome local and overall drawback preferably, has reduced systematic cost, has improved response speed and the throughput of system, thereby improves load-balancing efficiency.
Fig. 1 is the online game dynamic load balancing method flow chart according to embodiment of the present invention.
As shown in Figure 1, the method comprises:
Step 101: when determining server overloads, this overload server is logged into load server list, and the neighbor server of this overload server and load information thereof are logged into underloading server list.
Here, load server list (such as, can called after OverList) be an array, it is in finding underloading server algorithm, is used for the list of memory load server.
Underloading server list (such as, can called after LightList) be an array, it is in finding underloading server algorithm, the list that is used for storing underloading server.
Here, the load information of neighbor server specifically can comprise: the active role number of neighbor server and rest role number, etc.And, the server that neighbor server can arrive for logic neighbor server or the stochastic searching of this server that overloads.Such as, neighbor server can be the approaching server in IP address or the identical or approaching server of logic groups, or the server that finds of completely random.
In one embodiment, when being greater than T1, the load of this server thinks that this server overloads, wherein the T1 lower limit of server load while merging that represents to overload.
Preferably, T1=0.90 * MaxB; And MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
For the ease of calculating, can suppose that the maximum load value MaxB that Servers-all can bear is all identical.
Preferably, server maximum load value MaxB can equal active role and counts * 25+ rest role number.
Illustrate, the maximum load value of supposing server A is MaxB, and server A present load has been greater than the i.e. 0.90 * MaxB of T1(), think that server A overloads.The neighbor server of supposing this server A is server B and server C.Now, server A is recorded in load server list (OverList), and the load information of the load information of server B and server B, server C and server C is recorded in underloading server list (LightList).
Although enumerated in detail above the concrete size of server overload value T1, it will be appreciated by those of skill in the art that this enumerating is only exemplary, be not intended to limit the present invention the protection range of execution mode.
Step 102: traversal underloading server list is to search overload server, wherein the overload server finding is deleted and be logged into load server list from underloading server list, and the neighbor server of the overload server that this is found and load information thereof are logged into underloading server list.
First travel through underloading server list to search new overload server here.
Lookup method is similar to step 101, when the load of server is greater than T1, thinks that this server overloads, wherein the T1 lower limit of server load while merging that represents to overload.Preferably, T1=0.90 * MaxB; MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
Follow example above, the present load of supposing server B is greater than T1, the present load of server C is less than T1, think that server B in fact overloads, and not overload of server C, now from underloading server list (LightList), delete server B, and server B is recorded to load server list (OverList), and continue server C to be retained in underloading server list (LightList).
This step is the traversal circulation step for underloading server list, therefore need to continue to search its neighbor server for server B, the neighbor server of supposing server B comprises server D and server E,, by server D and load information thereof, server E and load information thereof are all recorded in underloading server list (LightList).If continue to have overload server in underloading server list (LightList), should continue to find the neighbor server of this overload server.
Suppose server D and the equal non-overloading of server E, so far, load server list (OverList) comprises server A and server B, and underloading server list (LightList) comprises server C, server D and server E.
Step 103: the load state of determining server in underloading server list according to the load information in underloading server list, and the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade load server list and underloading server list.
, the server that load in the server of pack heaviest in load server list and underloading server list is the lightest is carried out to load balancing step here, then upgrade load server list and underloading server list.
In one embodiment, in load server list the server of pack heaviest with underloading server list in the lightest server of load carry out after load balancing, embodiment of the present invention further judges whether this server load in load server list is greater than load higher limit T2, if it is in continuation and underloading server list, load time the lightest server is carried out load balancing, otherwise from load server list, deletes this server
For fear of the phenomenon that occurs load jitter between server, a higher limit T2 who is used for each server load after restriction system load balancing can be set.Preferably, can get T2=0.80 * MaxB.
This step that circulates, until Servers-all load average value is less than or equal to T2 in load server list (OverList).
Although enumerated in detail above the concrete size of load higher limit T2, it will be appreciated by those of skill in the art that this enumerating is only exemplary, be not intended to limit the present invention the protection range of execution mode.
Based on above-mentioned labor, Fig. 2 is the online game dynamic load balancing method exemplary flow chart according to embodiment of the present invention.
As shown in Figure 2, the method comprises:
Step 201: if server overload and not selected, just as the initial server of load balancing, charge to load server list (OverList), then the load information of its neighbor server (load information comprises active role number and rest role number) is charged to underloading server list (LightList).
Wherein: OverList is the array of a list that is used for memory load server; LightList is an array that is used for storing the list of underloading server.MaxB represents the maximum load value of server in the situation that not affecting disposal ability and response time, supposes that the maximum load value that Servers-all can bear is all identical.
T1 represents to overload server while merging, the lower limit of load.Can suppose and get T1=0.90 * MaxB.
T2 is the threshold value of a setting, and it is used for the higher limit of each server load after restriction system load balancing, avoids occurring the phenomenon of load jitter between server, can suppose and get T2=0.80 * MaxB.
Step 202: Servers-all in traversal LightList, if presence server load value is more than or equal to the server of T1, as load server, add load server list (OverList) to, and the load information of its neighbor server is charged to underloading server list (LightList).Because newly increased server in LightList, so need to continue to find the server of load in LightList.
Step 203: select the lightest server of load in LightList, and upgrade OverList and LightList server list.
Specifically comprise: the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade load server list and underloading server list.
Such as: the principle of upgrading load server list can be: if in load server list server load on load balancing after be still greater than T1, be retained in load server list, prepare the load balancing of next round; If the loading on little after load balancing or equal T1 of server in load server list deleted it in load server list.The principle of upgrading underloading server list is: if in underloading server list server load on load balancing after be still less than or equal to T2, be retained in underloading server list, prepare the load balancing of next round; If in underloading server list server load on load balancing after be greater than T2, it is deleted in underloading server list.
Step 204: circulation is carried out, until Servers-all load average value is normal in OverList.Here, circulation is carried out, until Servers-all load average value is less than or equal to T2 in OverList.
In sum, in embodiment of the present invention, when determining server overloads, this overload server is logged into load server list, and the neighbor server of this overload server and load information thereof are logged into underloading server list; Then travel through underloading server list to search overload server, wherein the overload server finding is deleted and be logged into load server list from underloading server list, and the neighbor server of the overload server that this is found and load information thereof are logged into underloading server list; Then according to the load information in underloading server list, determine the load state of server in described underloading server list, and the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade described load server list and underloading server list.
As can be seen here, after application embodiment of the present invention, by dynamically finding underloading server, no matter be on the ratio of overload player and mobile number of players, or in the cost of system, there is good performance, therefore significantly improved the efficiency of load balancing.Embodiment of the present invention has been taked efficient underloading server finding method, and the concurrent carrying number of players of server has improved 1 times, and game server can provide response speed very fast to player, has met the demand of online game high real-time.
And embodiment of the present invention has guaranteed that games system is stable, this for requiring to there is real-time, the network game server framework of autgmentability, flexibility is well suited for.
The above, be only preferred embodiment of the present invention, is not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (8)

1. a method for online game dynamic load leveling, is characterized in that, comprising:
When determining server overloads, this overload server is logged into load server list, and the neighbor server of this overload server and load information thereof are logged into underloading server list;
Traversal underloading server list is to search overload server, wherein the overload server finding is deleted and be logged into load server list from underloading server list, and the neighbor server of the overload server that this is found and load information thereof are logged into underloading server list;
According to the load information in underloading server list, determine the load state of server in described underloading server list, and the server of pack heaviest in the lightest server of load in underloading server list and load server list is carried out to load balancing, and upgrade described load server list and underloading server list; The principle of wherein upgrading load server list is: if in load server list server load on load balancing after be still greater than T1, be retained in load server list, prepare the load balancing of next round; If the loading on little after load balancing or equal T1 of server in load server list deleted it in load server list; The principle of upgrading underloading server list is: if in underloading server list server load on load balancing after be still less than or equal to T2, be retained in underloading server list, prepare the load balancing of next round; If in underloading server list server load on load balancing after be greater than T2, it is deleted in underloading server list, wherein the T1 lower limit of server load while merging that represents to overload; T2 is the higher limit for each server load after restriction system load balancing.
2. the method for online game dynamic load leveling according to claim 1, the load information of described neighbor server comprises: the active role number of neighbor server and rest role number.
3. the method for online game dynamic load leveling according to claim 1, described determining server overload is:
The load of judging this server is greater than T1; Wherein:
T1=0.90×MaxB;
MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
4. the method for online game dynamic load leveling according to claim 3, described server maximum load value equals active role and counts * 25+ rest role number.
5. the method for online game dynamic load leveling according to claim 1, the server that logic neighbor server or the stochastic searching that described neighbor server is this overload server arrived.
6. the method for online game dynamic load leveling according to claim 1, is characterized in that, the method further comprises:
In load server list the server of pack heaviest with underloading server list in the lightest server of load carry out after load balancing, further judge whether this server load in load server list is greater than load higher limit, if it is in continuation and underloading server list, load time the lightest server is carried out load balancing, otherwise from load server list, deletes this server.
7. the method for online game dynamic load leveling according to claim 6, is characterized in that, described load higher limit is T2, wherein T2=0.80 * MaxB;
MaxB is not for affecting the server maximum load value in disposal ability and response time situation.
8. the method for online game dynamic load leveling according to claim 7, is characterized in that, described server maximum load value equals active role and counts * 25+ rest role number.
CN201210151017.8A 2012-05-15 2012-05-15 Method for equalizing dynamic load of network game Active CN102710615B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210151017.8A CN102710615B (en) 2012-05-15 2012-05-15 Method for equalizing dynamic load of network game

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210151017.8A CN102710615B (en) 2012-05-15 2012-05-15 Method for equalizing dynamic load of network game

Publications (2)

Publication Number Publication Date
CN102710615A CN102710615A (en) 2012-10-03
CN102710615B true CN102710615B (en) 2014-08-27

Family

ID=46903171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210151017.8A Active CN102710615B (en) 2012-05-15 2012-05-15 Method for equalizing dynamic load of network game

Country Status (1)

Country Link
CN (1) CN102710615B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103873457A (en) * 2012-12-17 2014-06-18 人人游戏网络科技发展(上海)有限公司 Method and equipment for balancing loads among game servers
CN108696554B (en) * 2017-04-10 2021-11-30 北京京东尚科信息技术有限公司 Load balancing method and device
CN107070716B (en) * 2017-04-14 2018-09-11 腾讯科技(深圳)有限公司 Game server state acquiring method, device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009648A (en) * 2006-12-27 2007-08-01 北京航空航天大学 Multi-server hierarchical alterative load balance method
CN101742565A (en) * 2009-12-11 2010-06-16 北京北方烽火科技有限公司 Method for balancing inter-cell load in LTE mobile communication network
CN102098728A (en) * 2011-01-05 2011-06-15 北京邮电大学 Mobile load balancing method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010144000A1 (en) * 2009-06-08 2010-12-16 Bwin Games Ab Multicasting in an online gaming system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009648A (en) * 2006-12-27 2007-08-01 北京航空航天大学 Multi-server hierarchical alterative load balance method
CN101742565A (en) * 2009-12-11 2010-06-16 北京北方烽火科技有限公司 Method for balancing inter-cell load in LTE mobile communication network
CN102098728A (en) * 2011-01-05 2011-06-15 北京邮电大学 Mobile load balancing method

Also Published As

Publication number Publication date
CN102710615A (en) 2012-10-03

Similar Documents

Publication Publication Date Title
US12015563B2 (en) Management of resource affinities in computing systems having multiple cores
CN108499100B (en) Cloud game error recovery method and system based on edge calculation
CN109548155B (en) Distributed unbalanced edge cloud network access and resource allocation method
CN102970379A (en) Method for realizing load balance among multiple servers
CN103401947A (en) Method and device for allocating tasks to multiple servers
CN103347068A (en) Method for accelerating network caching based on proxy cluster
CN102857548A (en) Mobile cloud computing resource optimal allocation method
CN110233866B (en) Load balancing method and load balancer
CN102710615B (en) Method for equalizing dynamic load of network game
CN107113323B (en) Data storage method, device and system
CN109548031A (en) A kind of non-equilibrium edge cloud network access and resource allocation mechanism
CN106998340B (en) Load balancing method and device for board resources
Fan et al. CTOM: Collaborative task offloading mechanism for mobile cloudlet networks
Patel et al. A survey on load balancing in cloud computing
CN108388471B (en) Management method based on double-threshold constraint virtual machine migration
CN104954477B (en) One kind is based on concurrent improved large-scale graph data streaming division methods and system
CN113713388A (en) Game data processing method, device, equipment and storage medium
CN108200185A (en) A kind of method and device for realizing load balancing
CN108259583B (en) Data dynamic migration method and device
CN109981696B (en) Load balancing method, device and equipment
CN113395183B (en) Virtual node scheduling method and system for network simulation platform VLAN interconnection
JP2017037445A (en) Server management device and server management method
CN115509749A (en) Task execution method and device, storage medium and electronic equipment
CN109542623B (en) Optimized deployment method of virtual system in server
CN102696257B (en) Method and device for implementing temperature balance among multiple physical servers

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant