CN102724105B - A kind of load-balancing method and device - Google Patents

A kind of load-balancing method and device Download PDF

Info

Publication number
CN102724105B
CN102724105B CN201110078347.4A CN201110078347A CN102724105B CN 102724105 B CN102724105 B CN 102724105B CN 201110078347 A CN201110078347 A CN 201110078347A CN 102724105 B CN102724105 B CN 102724105B
Authority
CN
China
Prior art keywords
server
querying server
querying
described
service inquiry
Prior art date
Application number
CN201110078347.4A
Other languages
Chinese (zh)
Other versions
CN102724105A (en
Inventor
孙炜
刘松
苏国立
冯庆磊
Original Assignee
腾讯科技(深圳)有限公司
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 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to CN201110078347.4A priority Critical patent/CN102724105B/en
Publication of CN102724105A publication Critical patent/CN102724105A/en
Application granted granted Critical
Publication of CN102724105B publication Critical patent/CN102724105B/en

Links

Abstract

The invention discloses a kind of load-balancing method and device, the method comprises: service inquiry machine receives the inquiry request from client, determines alternative server farm; Described service inquiry machine is according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server in described server farm, determine the available quotas of each querying server respectively, described available amount is for characterizing the rest processing capacity of querying server; Described service inquiry machine selects querying server according to the available quotas of each querying server from described server farm, and sends inquiry request to the querying server selected.The application of the invention, can realize load balancing accurately and rapidly.

Description

A kind of load-balancing method and device

Technical field

The present invention relates to communication technical field, particularly relate to a kind of load-balancing method and device.

Background technology

Along with the quick growth of the raising of network traffic, visit capacity and data traffic, disposal ability and the calculating strength of each core of existing network also correspondingly increase, and single server apparatus cannot be born.For adapting to above scene, load (task) can be balanced, share on multiple operating unit by load-balancing technique, thus task of jointly finishing the work.Load-balancing technique is based upon on existing network infrastructure, can extended network equipment and server bandwidth, increase throughput, Strengthens network data-handling capacity, the flexibility improving network and availability.

Algorithm conventional in load-balancing technique comprises polling dispatching algorithm and WLC(WeightedLeast-Connection, weighting Smallest connection) dispatching algorithm, polling dispatching algorithm is the scheduling of a kind of stateless, can according to the sum from 1 to n(server) order, each server is distributed in the request of user in turn, and re-start wheel flow assignment after distribution one time.Algorithm is very succinct, without the need to recording the state of the current connection of server.

In actual applications, because the configuration of every station server is different, its disposal ability also can be different, therefore, WLC dispatching algorithm, according to the disposal ability of each server, is the corresponding weights of server-assignment, when scheduling newly connects, the service request newly received is sent to the server that weighting linking number is minimum or the response time is the shortest, makes the linking number set up of server and its weights proportional as much as possible.

Particularly, suppose at server group s={s i, i=1,2 ..., in n}, the weights of every station server are w i, the linking number set up is l i, the summation M=∑ l of the linking number set up of server group i, as server s jmeet (l i/ M)/w j=min{(l i/ M)/w jcondition time, current new connection request will be sent to server s j.

Realizing in process of the present invention, inventor finds prior art, and at least there are the following problems:

The handling property of the Servers-all in polling dispatching algorithm hypothesis server group is all identical, be indifferent to current linking number and the response speed of every station server, the Servers-all be only suitable in server group has identical software and hardware configuration and the situation of the service request relative equilibrium received, when changing greatly the interval time of the service request received, easily cause the laod unbalance between server.WLC dispatching algorithm only considers the linking number that server is current, does not consider the server system resources needed for each connection request and service time, if the service request newly received within a period of time is many, can destroy the load balancing of group system; In addition, WLC dispatching algorithm needs the load state information of frequent collector node, can increase system resource overhead.

Summary of the invention

The object of the present invention is to provide a kind of load-balancing method and device, to realize load balancing accurately and rapidly, for this reason, the present invention adopts following technical scheme:

A kind of load-balancing method, comprising:

Service inquiry machine receives the inquiry request from client, determines alternative server farm;

Described service inquiry machine is according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server in described server farm, determine the available quotas of each querying server respectively, described available amount is for characterizing the rest processing capacity of querying server;

Described service inquiry machine selects querying server according to the available quotas of each querying server from described server farm, and sends inquiry request to the querying server selected.

A kind of load balancing apparatus, comprising:

Receiver module, for receiving the inquiry request from client;

Group determination module, for determining alternative server farm;

Quota determination module, for according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server described server farm, determine the available quotas of each querying server respectively, described available amount is for characterizing the rest processing capacity of querying server;

Select module, from described server farm, select querying server for the available quotas according to each querying server;

Sending module, for sending inquiry request to the querying server selected.

Embodiments of the invention comprise following advantage, because according to the packet amount adding up to receive from each querying server and to the difference between this querying server adds up the packet amount that sends, determine the available quotas of each querying server, and from server farm, the querying server of access is selected according to the available quotas of each querying server, the state of querying server can be determined directly, quickly and accurately, and then realize load balancing; Owing to not needing the load information collecting querying server, effectively system resource overhead can be reduced.Certainly, the arbitrary product implementing embodiments of the invention might not need to reach above-described all advantages simultaneously.

Accompanying drawing explanation

Fig. 1 is the SiteServer LBS Organization Chart in the embodiment of the present invention;

Fig. 2 is the load-balancing method flow chart in the embodiment of the present invention;

Fig. 3 is the attenuation curve schematic diagram of the available quotas in the embodiment of the present invention;

Fig. 4 is renewal in the embodiment of the present invention adds up the packet amount received method flow diagram from querying server;

Fig. 5 is the structural representation of the load balancing apparatus in the embodiment of the present invention.

Embodiment

Below in conjunction with the accompanying drawing in the present invention, carry out clear, complete description to the technical scheme in the present invention, obviously, described embodiment is a part of embodiment of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under the prerequisite not making creative work, all belongs to the scope of protection of the invention.

As shown in Figure 1, be the SiteServer LBS Organization Chart in the embodiment of the present invention, comprise configuration server, service inquiry machine, querying server and database.Wherein, service inquiry machine comprises load balancing API (ApplicationProgrammingInterface, application programming interface), load balancing query interface is provided to each business with the form of API, alternative server farm is obtained from configuration server, and in the dispatching algorithm that the balanced API of local working load provides, from above-mentioned server farm, select querying server, send inquiry request to the querying server selected.The inquiry request that querying server sends for receiving service inquiry machine, obtains corresponding data query according to this inquiry request, and data query is returned to service inquiry machine from database.

Configuration server is used for providing available server farm to service inquiry machine, and server farm comprises multiple queries server.Particularly, configuration server can by querying server s iweights be designated as w(s i), querying server is divided into following five types by the condition such as region, operator according to querying server place, and distributes different weights respectively:

A1: be positioned at the querying server of consolidated network machine room with service inquiry machine, weight w (A1)=100;

A2: use same IDC(InternetDataCenter with service inquiry machine, Internet data center) querying server, weight w (A2)=95;

A3: with service inquiry machine with city and with the querying server of operator, weight w (A3)=50;

A4: with the querying server of service inquiry machine with city, weight w (A4)=20;

A5: the querying server of other types, weight w (A5)=5.

Service inquiry machine can every Preset Time (such as, 10 minutes) obtain current server farm from configuration server, particularly, service inquiry machine can travel through the querying server of each type above-mentioned, and chooses querying server according to the requirement of the querying server of every type.If the quantity of required type servers is inadequate, can supply the querying server of other type of random selecting.Such as, when server farm comprises 10 querying servers, can the querying server of the querying server of random selecting 3 A1 types, the querying server of 3 A2 types, the querying server of 2 A3 types, the querying server of 1 A4 type and 1 A5 type as current server farm.

Based on said system framework, the load-balancing method flow chart in the embodiment of the present invention, as shown in Figure 2, comprises the following steps:

Step 201, service inquiry machine receives the inquiry request from client.

Step 202, service inquiry machine judges whether before the deadline current server farm, if not, then perform step 203; Otherwise, perform step 204.

Wherein, current server farm can for being pre-configured in the server farm on service inquiry machine, the server list also can selecting to use during querying server for service inquiry machine is last.When the changing of the condition such as region, operator at querying server place, the type of this querying server also can change, and the configuration server in server list is chosen according to type and is obtained, therefore, configuration server needs the term of validity corresponding to server farm setting, and this term of validity is for judging that whether server farm is effective.

Step 203, service inquiry machine obtains the server farm after upgrading from configuration server.

Particularly, service inquiry machine can send server farm to configuration server and obtain request, and receives the server farm after the renewal that configuration server returns.

Step 204, the available quotas of each querying server in service inquiry machine determination server farm, and determine that the quota that each querying server is corresponding is interval according to available quotas.

Particularly, the disposal ability of querying server can be quantified as quota, querying server s iavailable quotas q left(s i) for characterizing querying server s irest processing capacity, its initial value is the maximum quota q preset max(s i), q max(s i) can according to querying server s iconfiguration and performance set in advance.Such as, suppose the configuration of the querying server in server farm and performance all basically identical, the maximum quota q of every platform querying server can be set max(s i)=10000.

Service inquiry machine can according to from querying server s ithe accumulative packet amount rcnt (s received i) and to this querying server s ithe accumulative packet amount scnt (s sent i) between difference △ cnt=scnt (s i)-rcnt (s i), adjust this querying server s iavailable quotas, as shown in formula [1]:

…[1]

Wherein, q left(s i) be querying server s iavailable quotas, △ cnt is that described service inquiry machine is from querying server s ithe accumulative packet amount that receives and described service inquiry machine are to this querying server s idifference between the accumulative packet amount sent, q max(s i) be querying server s imaximum quota.

When △ cnt is very little, querying server s can be determined ibe in normal operating conditions, q left(s i) carry out less decay along with the increase of △ cnt; Along with the increase of △ cnt, querying server s can be determined inormal service can not be provided, q left(s i) the rate of decay accelerate, until reduce to 1, as shown in Figure 3.

If querying server s iresume service after a failure, because △ cnt may be much larger than , for making this querying server s ireenter SiteServer LBS, service inquiry machine can to from this querying server s ithe accumulative packet amount rcnt (s received i) reset.Particularly, for preventing SiteServer LBS from producing violent fluctuation, service inquiry machine does not reset rcnt (s at once i), but from this querying server s iafter receiving predetermined number (such as, 20) packet continuously, confirm this querying server s iresume service, resets rcnt (s i)=scnt (s i)-ε, wherein, ε can get .At replacement rcnt (s i) after, service inquiry machine is often from querying server s ireceive a packet, then to rcnt (s i) cumulative one be greater than 1 numeral, such as, make rcnt (s i)=rcnt (s i)+2, until rcnt (s i) equal scnt (s i).

After the available quotas determining each querying server in server farm, querying server s can be determined icorresponding quota is interval , wherein, s jfor the querying server in server cohort, q left(s j) be querying server s javailable quotas, w (s j) be querying server s jweights.

Step 205, service inquiry machine is according to the random number generated, and the quota of searching this random number place is interval, if found, then performs step 206; If search less than, then perform step 207.

Wherein, the random number r that service inquiry machine generates meets: 0≤r≤q sum, q sumfor the total quota of system, for reflecting disposed of in its entirety ability and the loading condition of current system, its value is the summation of the available quotas of all querying servers in server farm and the product of weights, that is:

……………………[2]

Interval according to the quota that each querying server in random number r and server farm is corresponding, can determine that the quota at random number r place is interval.Because random number r is stochastic generation, querying server s iavailable quotas q left(s i) larger, then random number r drops on this querying server s ithe possibility of the probability in corresponding quota interval is larger.

Step 206, service inquiry machine sends inquiry request to the querying server corresponding to the quota interval found.

Step 207, service inquiry machine sends inquiry request to the arbitrary querying server in server farm.

It should be noted that, in other execution modes of the present invention, service inquiry machine also can adopt other mode to select querying server from server farm, such as, selects the querying server that the product of available quotas and weights is maximum; Also the weights of querying server can not be configured, only according to the available quotas determination querying server s of querying server icorresponding quota is interval , correspondingly, the total quota of system , service inquiry machine can according to the quota interval selection querying server at random number place, the querying server also can available quotas being selected from server farm maximum.Above execution mode can realize goal of the invention of the present invention equally.

In addition, above-mentioned steps 202 and step 203 are the preferred steps of the embodiment of the present invention, by judging whether before the deadline current server farm, can improve validity and the reasonability of server farm.In other execution modes of the present invention, also can not perform step 202 and step 203, service inquiry machine selects querying server from the server farm preset, and can realize goal of the invention of the present invention equally.

In addition, above-mentioned steps 207 is also the preferred steps of the embodiment of the present invention, when searching the quota less than random number place and being interval, by sending inquiry request to the arbitrary querying server in server farm, can improve and connect into power between service inquiry machine and querying server.In other execution modes of the present invention, also can not perform step 207, service inquiry machine, when searching the quota interval less than random number place, does not send inquiry request to the querying server in server farm, can realize goal of the invention of the present invention equally.

In embodiments of the present invention, service inquiry machine can according to querying server s ithe packet (such as, inquiry request) sent, upgrades to querying server s ithe accumulative packet amount scnt (s sent i), that is, often to querying server s isend a packet, then to scnt (s i) add 1.

Service inquiry machine can also according to the packet that receives from querying server, and upgrade and add up from this querying server the packet amount that receives, idiographic flow as shown in Figure 4, comprises the following steps:

Step 401, service inquiry machine receives querying server s ithe packet sent.

Step 402, service inquiry machine judges whether △ cnt is greater than the first thresholding, if be greater than, then performs step 403; Otherwise, perform step 407.

Step 403, service inquiry machine judges certainly in querying server s ifrom this querying server s after Resume service iwhether the accumulative packet amount cnt received is more than or equal to the second thresholding, when judged result is for being, then performs step 405; Otherwise, perform step 404.

Step 404, service inquiry machine adds 1 to cnt, adds 1 to rcnt (si).

It should be noted that, after execution step 404, can process ends.

Step 405, service inquiry machine is to rcnt (s i) reset, by the set of fast quick-recovery variable.

Wherein, fast quick-recovery variable bReset, for representing whether querying server enters quick Restoration stage, can be global variable, can be reset mode time initial, represents that querying server does not enter quick Restoration stage; When bReset is SM set mode, represent that querying server enters quick Restoration stage.Such as, the initial value of bReset is false, and the value after set is true.

Step 406, whether service inquiry machine judges fast quick-recovery variable bReset set, if set, then performs step 407; Otherwise, perform step 410.

Step 407, service inquiry machine judges rcnt (s i) whether be less than scnt (s i)-1, if be less than, then perform step 408; Otherwise, perform step 409.

Step 408, service inquiry machine is to rcnt (s i) carry out fast quick-recovery.

Particularly, service inquiry machine is often from querying server s ireceive a packet, can to rcnt (s i) cumulative one be greater than 1 numeral, such as, rcnt (s i)=rcnt (s i)+2.

It should be noted that, after execution step 408, can process ends.

Step 409, bReset resets by service inquiry machine, and cnt is set to 0, to rcnt (s i) add 1.

It should be noted that, after execution step 409, can process ends.

Step 410, service inquiry machine is to rcnt (s i) add 1.

The technical scheme of the embodiment of the present invention can be applied to URL(Uniform/UniversalResourceLocator, URL(uniform resource locator)) inquiry system, by choosing the actual queries amount of service inquiry machine to each querying server, and actual queries amount and theoretical queries are contrasted, Performance Evaluation can be carried out to the technical scheme of the embodiment of the present invention, wherein, theoretical queries is the queries obtained according to total queries of service inquiry machine and the weight calculation of each querying server.The result of Performance Evaluation.As shown in table 1:

Table 1 Performance Evaluation table

As can be seen from Table 1, service inquiry machine is to the actual queries amount of each querying server close to the theoretical queries by weight allocation, and therefore, the technical scheme of the embodiment of the present invention can realize load balancing rationally and effectively.

Embodiments of the invention comprise following advantage, because according to the packet amount adding up to receive from each querying server and to the difference between this querying server adds up the packet amount that sends, determine the available quotas of each querying server, and from server farm, the querying server of access is selected according to the available quotas of each querying server, the state of querying server can be determined directly, quickly and accurately, and then realize load balancing; Owing to not needing the load information collecting querying server, effectively system resource overhead can be reduced; In addition, embodiments of the invention support GSLB, choose server farm by the information such as region, IDC, while guarantee inquiry response speed, can realize overall disaster tolerance.Certainly, the arbitrary product implementing embodiments of the invention might not need to reach above-described all advantages simultaneously.

According to the load-balancing method provided in above-mentioned execution mode, the embodiment of the present invention additionally provides the device applying above-mentioned load-balancing method.

As shown in Figure 5, be the structural representation of the load balancing apparatus in the embodiment of the present invention, comprise:

Receiver module 510, for receiving the inquiry request from client.

Group determination module 520, for determining alternative server farm.

Above-mentioned group determination module 520, specifically for judging whether before the deadline current server farm, if, then using current server farm as alternative server farm; Otherwise, obtain the server farm after upgrading from configuration server.

Particularly, current server farm can for being pre-configured in the server farm on load balancing apparatus, the server list also can selecting to use during querying server for load balancing apparatus is last.If current server farm is not before the deadline, group determination module 520 can send server farm to configuration server and obtain request, and receives the server farm after the renewal that configuration server returns.

Quota determination module 530, for according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server the server farm that group determination module 520 is determined, determine the available quotas of each querying server respectively, this available amount is for characterizing the rest processing capacity of querying server.

Particularly, above-mentioned quota determination module 530, specifically for according to following formula determination querying server s iavailable quotas:

Wherein, q left(s i) be querying server s iavailable quotas, △ cnt is that receiver module 510 is from querying server s ithe accumulative packet amount that receives and sending module 550 are to this querying server s idifference between the accumulative packet amount sent, q max(s i) be querying server s imaximum quota.

Select module 540, from server farm, select querying server for the available quotas according to each querying server.

Particularly, above-mentioned selection module 540, interval specifically for determining the quota that each querying server is corresponding according to the available quotas of each querying server; Generate random number, determine that the quota at this random number place is interval, and select the interval corresponding querying server of this quota.

Wherein, querying server s icorresponding quota interval is:

Wherein, s jfor the querying server in server cohort, q left(s j) be querying server s javailable quotas, w (s j) be querying server s jweights.

Above-mentioned selection module 540, also for when random number is outside the quota interval that all querying servers are corresponding, selects the arbitrary querying server in server farm.

Sending module 550, for sending inquiry request to the querying server selecting module 540 to select.

Preferably, above-mentioned load balancing apparatus, can further include:

Update module 560, for according to the packet that receives from querying server, upgrades and adds up from this querying server the packet amount that receives; According to the packet sent to querying server, upgrade the packet amount adding up transmission to this querying server.

Above-mentioned update module 560, specifically for after receiver module 510 adds up to receive a predetermined number packet from this querying server after querying server Resume service, resets the packet amount adding up to receive from this querying server; Afterwards, often receive a packet from described querying server, the described accumulative packet amount received is added up one be greater than 1 numeral, until the described accumulative packet amount received equals the accumulative packet amount sent.

Embodiments of the invention comprise following advantage, because according to the packet amount adding up to receive from each querying server and to the difference between this querying server adds up the packet amount that sends, determine the available quotas of each querying server, and from server farm, the querying server of access is selected according to the available quotas of each querying server, the state of querying server can be determined directly, quickly and accurately, and then realize load balancing; Owing to not needing the load information collecting querying server, effectively system resource overhead can be reduced; In addition, embodiments of the invention support GSLB, choose server farm by the information such as region, IDC, while guarantee inquiry response speed, can realize overall disaster tolerance.Certainly, the arbitrary product implementing embodiments of the invention might not need to reach above-described all advantages simultaneously.

It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.

Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a station terminal equipment (can be mobile phone, personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.

The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should look protection scope of the present invention.

Claims (14)

1. a load-balancing method, is characterized in that, comprising:
Service inquiry machine receives the inquiry request from client, determines alternative server farm;
Described service inquiry machine is according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server in described server farm, determine the available quotas of each querying server respectively, described available amount is for characterizing the rest processing capacity of querying server;
Described service inquiry machine selects querying server according to the available quotas of each querying server from described server farm, and sends inquiry request to the querying server selected;
Wherein, described service inquiry machine is according to following formula determination querying server s iavailable quotas:
Wherein, q left(s i) be querying server s iavailable quotas, △ cnt is that described service inquiry machine is from querying server s ithe accumulative packet amount that receives and described service inquiry machine are to this querying server s idifference between the accumulative packet amount sent, q max(s i) be querying server s imaximum quota.
2. the method for claim 1, is characterized in that, described service inquiry machine selects querying server according to the available quotas of each querying server from described server farm, is specially:
According to the available quotas of each querying server, described service inquiry machine determines that the quota that each querying server is corresponding is interval;
Described service inquiry machine, according to the random number generated, determines that the quota at this random number place is interval, and selects the interval corresponding querying server of this quota.
3. method as claimed in claim 2, is characterized in that, querying server s icorresponding quota interval is:
Wherein, s jfor the querying server in described server cohort, q left(s j) be querying server s javailable quotas, w (s j) be querying server s jweights.
4. method as claimed in claim 2, is characterized in that, also comprise:
When described random number is outside the quota interval that all querying servers are corresponding, the arbitrary querying server in described server farm selected by described service inquiry machine, and sends inquiry request to this querying server.
5. the method for claim 1, is characterized in that, alternative server farm determined by described service inquiry machine, comprising:
Described service inquiry machine judges whether before the deadline current server farm, if, then using described current server farm as alternative server farm; Otherwise, obtain the server farm after upgrading from configuration server.
6. the method for claim 1, is characterized in that, also comprises:
Described service inquiry machine, according to the packet received from querying server, upgrades and adds up from this querying server the packet amount that receives; According to the packet sent to querying server, upgrade the packet amount adding up transmission to this querying server.
7. method as claimed in claim 6, is characterized in that, described service inquiry machine, according to the packet received from querying server, upgrades and adds up from this querying server the packet amount that receives, comprising:
After described service inquiry machine adds up to receive a predetermined number packet from this querying server after querying server Resume service, described service inquiry machine resets the packet amount adding up to receive from this querying server; Afterwards,
Described service inquiry machine often receives a packet from described querying server, the described accumulative packet amount received is added up one be greater than 1 numeral, until the described accumulative packet amount received equals the accumulative packet amount sent.
8. a load balancing apparatus, is characterized in that, comprising:
Receiver module, for receiving the inquiry request from client;
Group determination module, for determining alternative server farm;
Quota determination module, for according to from the accumulative packet amount that receives and to the difference between this querying server adds up the packet amount that sends respectively of each querying server described server farm, determine the available quotas of each querying server respectively, described available amount is for characterizing the rest processing capacity of querying server, described quota determination module, specifically for according to following formula determination querying server s iavailable quotas:
Wherein, q left(s i) be querying server s iavailable quotas, △ cnt is that described receiver module is from querying server s ithe accumulative packet amount that receives and described sending module are to this querying server s idifference between the accumulative packet amount sent, q max(s i) be querying server s imaximum quota;
Select module, from described server farm, select querying server for the available quotas according to each querying server;
Sending module, for sending inquiry request to the querying server selected.
9. device as claimed in claim 8, is characterized in that,
Described selection module, interval specifically for determining the quota that each querying server is corresponding according to the available quotas of each querying server; Generate random number, determine that the quota at this random number place is interval, and select the interval corresponding querying server of this quota.
10. device as claimed in claim 9, is characterized in that, querying server s icorresponding quota interval is:
Wherein, s jfor the querying server in described server cohort, q left(s j) be querying server s javailable quotas, w (s j) be querying server s jweights.
11. devices as claimed in claim 9, is characterized in that,
Described selection module, also for when described random number is outside the quota interval that all querying servers are corresponding, selects the arbitrary querying server in described server farm.
12. devices as claimed in claim 8, is characterized in that,
Described group determination module, specifically for judging whether before the deadline current server farm, if, then using described current server farm as alternative server farm; Otherwise, obtain the server farm after upgrading from configuration server.
13. devices as claimed in claim 8, is characterized in that, also comprise:
Update module, for according to the packet that receives from querying server, upgrades and adds up from this querying server the packet amount that receives; According to the packet sent to querying server, upgrade the packet amount adding up transmission to this querying server.
14. devices as claimed in claim 13, is characterized in that,
Described update module, specifically for after described receiver module adds up to receive a predetermined number packet from this querying server after querying server Resume service, resets the packet amount adding up to receive from this querying server; Afterwards, often receive a packet from described querying server, the described accumulative packet amount received is added up one be greater than 1 numeral, until the described accumulative packet amount received equals the accumulative packet amount sent.
CN201110078347.4A 2011-03-30 2011-03-30 A kind of load-balancing method and device CN102724105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110078347.4A CN102724105B (en) 2011-03-30 2011-03-30 A kind of load-balancing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110078347.4A CN102724105B (en) 2011-03-30 2011-03-30 A kind of load-balancing method and device

Publications (2)

Publication Number Publication Date
CN102724105A CN102724105A (en) 2012-10-10
CN102724105B true CN102724105B (en) 2016-03-09

Family

ID=46949770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110078347.4A CN102724105B (en) 2011-03-30 2011-03-30 A kind of load-balancing method and device

Country Status (1)

Country Link
CN (1) CN102724105B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125202B (en) * 2013-04-26 2019-03-05 深圳市腾讯计算机系统有限公司 Weight regulating method, device and terminal device
CN103634144B (en) * 2013-11-15 2017-06-13 新浪网技术(中国)有限公司 The configuration file management method of many IDC clusters, system and equipment
CN105991741B (en) * 2015-03-02 2020-03-06 阿里巴巴集团控股有限公司 Method and device for displaying load request and network server
CN106708826A (en) * 2015-07-30 2017-05-24 中兴通讯股份有限公司 Data processing method and apparatus, and data query method and apparatus
CN106973368A (en) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 Method and device for business processing
CN107368500B (en) * 2016-05-13 2020-03-03 北京京东尚科信息技术有限公司 Data extraction method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534244A (en) * 2009-02-09 2009-09-16 华为技术有限公司 Method, device and system for load distribution
CN101533417A (en) * 2009-04-28 2009-09-16 阿里巴巴集团控股有限公司 A method and system for realizing ETL scheduling
CN101945433A (en) * 2009-07-10 2011-01-12 中国移动通信集团上海有限公司 Method, system and equipment for selecting mobile switch center server

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101534244A (en) * 2009-02-09 2009-09-16 华为技术有限公司 Method, device and system for load distribution
CN101533417A (en) * 2009-04-28 2009-09-16 阿里巴巴集团控股有限公司 A method and system for realizing ETL scheduling
CN101945433A (en) * 2009-07-10 2011-01-12 中国移动通信集团上海有限公司 Method, system and equipment for selecting mobile switch center server

Also Published As

Publication number Publication date
CN102724105A (en) 2012-10-10

Similar Documents

Publication Publication Date Title
EP2852125B1 (en) Server selection for content distribution
EP3142017B1 (en) Network connectivity methods and systems
US9241304B2 (en) Optimization process and system for a heterogeneous ad hoc network
US8539079B2 (en) Edge-based resource spin-up for cloud computing
US8849976B2 (en) Dynamic route requests for multiple clouds
US10097448B1 (en) Routing mode and point-of-presence selection service
CN101133622B (en) Splitting a workload of a node
US9374276B2 (en) CDN traffic management in the cloud
US10091096B1 (en) Routing mode and point-of-presence selection service
US10057139B2 (en) Maintain a service on a cloud network based on a scale rule
EP1472846B1 (en) Method and apparatus for web farm traffic control
CN102577450B (en) Method, apparatus and system for determining policy and charging rule function entity
US8620784B2 (en) Formation and rearrangement of ad hoc networks
US7664847B2 (en) Managing workload by service
Leivadeas et al. Efficient resource mapping framework over networked clouds via iterated local search-based request partitioning
US7788380B2 (en) Load balancing method and apparatus, and software streaming system using the same
US6853642B1 (en) Load balancing between service component instances
US6883028B1 (en) Apparatus and method for performing traffic redirection in a distributed system using a portion metric
US7930344B2 (en) Incremental run-time session balancing in a multi-node system
US8037186B2 (en) System and method for routing service requests
US8087025B1 (en) Workload placement among resource-on-demand systems
EP2647174B1 (en) System and method to distribute application traffic to servers based on dynamic service response time
US9317336B2 (en) Method and apparatus for assignment of virtual resources within a cloud environment
DE60216918T2 (en) Method and computer system for selection of a border computer
CN102611735B (en) A kind of load-balancing method of application service and system

Legal Events

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

Effective date of registration: 20180928

Address after: 100086 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Patentee after: Tencent cloud computing (Beijing) limited liability company

Address before: 518057 East 403 room, Sai Ge science and Technology Park, Futian District Zhenxing Road, Shenzhen, Guangdong, China, 2

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.

TR01 Transfer of patent right