CN105530311A - Load distribution method and device - Google Patents

Load distribution method and device Download PDF

Info

Publication number
CN105530311A
CN105530311A CN201510996362.5A CN201510996362A CN105530311A CN 105530311 A CN105530311 A CN 105530311A CN 201510996362 A CN201510996362 A CN 201510996362A CN 105530311 A CN105530311 A CN 105530311A
Authority
CN
China
Prior art keywords
client
server
unique identifier
allocation method
section
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.)
Granted
Application number
CN201510996362.5A
Other languages
Chinese (zh)
Other versions
CN105530311B (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 Qizhi Business Consulting Co ltd
Beijing Qihoo Technology Co Ltd
360 Digital Security Technology Group Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510996362.5A priority Critical patent/CN105530311B/en
Publication of CN105530311A publication Critical patent/CN105530311A/en
Application granted granted Critical
Publication of CN105530311B publication Critical patent/CN105530311B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Abstract

The invention discloses a load distribution method and device. The method comprises: receiving session requests from clients; according to the session requests, acquiring specific identifiers of the clients; and based on the specific identifiers, distributing the clients onto a specific server in all usable servers. According to the scheme, in the process of distributing a plurality of clients to different operation units, the requests of the specific clients, which belong to the same session, can be guaranteed to be distributed to the same server so as to keep a session.

Description

Load allocation method and equipment
Technical field
The present invention relates to virtual network service field, be specifically related to a kind of load allocation method and equipment.
Background technology
In existing virtual network service, different operating units is distributed in all loads.That is, perform sharing on multiple operating unit the service of load, such as Web server, ftp server, enterprise crucial application server and other mission critical server etc., thus jointly to be finished the work task by multiple operating unit.This extend server cluster bandwidth, add its throughput, strengthen network data processing ability, improve the flexibility of network and availability.
In the prior art, multiple load is distributed in the process of different operating unit, may by certain client, the request dispatching that belongs to same session gives different servers, may cause conversation thus.
Summary of the invention
In view of the above problems, the present invention is proposed to provide a kind of load allocation method of solving the problem at least in part and equipment.
According to one aspect of the present invention, provide a kind of load allocation method, comprising:
Receive the session request from client;
According to described session request, obtain the unique identifier of described client; And
Based on described unique identifier described client distributed to the particular server in all available servers.
According to another aspect of the present invention, additionally provide a kind of load distributing apparatus, comprising:
First receiver module, for receiving the session request from client;
Acquisition module, for according to described session request, obtains the unique identifier of described client; And
Distribution module, for distributing to the particular server in all available servers by described client based on described unique identifier.
The unique identifier of above-mentioned load allocation method of the present invention and equipment utilization client sets up the mapping relations one by one between client and particular server, thus multiple client can distributed in the process of different operating unit, ensure by particular clients, the request dispatching that belongs to same session to same server, keep session thus.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of specification, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows the indicative flowchart of load allocation method according to an embodiment of the invention;
Fig. 2 shows the indicative flowchart of the process based on unique identifier, client being distributed to particular server according to an embodiment of the invention; And
Fig. 3 shows the schematic block diagram of load distributing apparatus according to an embodiment of the invention.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
In prior art, when carrying out load and distributing, different servers may be given by the different request dispatching of the same session of certain load, cause conversation thus.In description herein, load can be client.Such as, in certain client, user have input the username and password of login, does shopping to log in related web site.Logging request corresponding to this register may be assigned with and give server A.Server A saves this session by this logging request thus.When next user does shopping at this related web site, the request corresponding to this shopping operation may be assigned with and give server B, and server B does not have any information of this session.For server A, although it saves this session, probably because do not receive any request from client within a predefined time limit, cause conversation.
In order to carrying out remaining session when load distributes, according to an aspect of the present invention, provide a kind of load allocation method.Fig. 1 shows the indicative flowchart of load allocation method 100 according to an embodiment of the invention.As shown in Figure 1, load allocation method 100 comprises step S110, step S130 and step S150.
In step s 110, the session request from client is received.
Session (session) is the sequence of unbroken request between client and server and response.User end to server sends request.After server receives request, send the response to request to client.
The request first that user end to server sends is the request needing to create session.This asks to be the beginning counted in logic multiple request first.Ask first according to this, server can obtain the special identifier symbol of client.That is, server starts the request remembering this client and this client.Such as, when user logs in or add commodity in shopping cart, a session is just started.Server can carry out identify customer end according to session, such as can use the user name password that session level variable record active user has inputted, so just send request without the need to user at every turn and all re-entered, can also be used to record some other the information relevant with current this time session.When the clear and definite end session of client or server do not receive any request from client within a predefined time limit, session just finishes.When after conversation end, server just have forgotten the request of this client and this client.
Particularly, user opens a browser, accesses some webpages (web) website, clicks multiple hyperlink in this web site, and the multiple web resource of access services device, then closes browser, and whole process can be referred to as a session.Once close browser, when reopening browser, again can not utilize last session, having needed a newly-built session.In brief, session is the once call between client and server, such as, to utilize the mode of browser to realize.
As mentioned above, a session may comprise multiple request.In this step, the request belonging to special session from client can be received.This request received can be ask first, may not be and asks first.
In step s 130, which, according to session request, obtain the unique identifier of client.
Each session request comprises the information of the unique identifier about client.Thus, server can determine client according to session.According to received session request, server can obtain the unique identifier of client.This unique identifier identifies this session request and comes from which client.
Alternatively, unique identifier is Internet protocol (IP) address of client, such as 221.217.241.***.Usually, session request comprises the IP address of client.The IP address of each client is relatively-stationary, and it may be used for identifying client.Utilize IP address to be very convenient and practicality as the unique identifier of client, it can identify client exactly, thus the smooth realization of assured plan.
Be appreciated that except IP address, unique identifier also can be other identification informations of client, as long as this identification information can identify client uniquely.
In some instances, client can visit destination server by proxy server.Destination server is the server that client expects session with it.In these examples, proxy server can by the session request forward of client to destination server, and destination server obtains the unique identifier of client via proxy server thus.
In step S150, based on unique identifier client distributed to the particular server in all available servers.
This particular server is the server for this client service.This particular server can be determined according to the unique identifier of client.Each unique identifier unique identification client, thus, can determine each client to distribute to specific server.
In above-mentioned load allocation method 100 of the present invention, the unique identifier of client is utilized to set up mapping relations one by one between client and particular server, thus multiple client can distributed in the process of different operating unit, ensure by particular clients, the request dispatching that belongs to same session to same server, keep session thus.
Alternatively, client to be distributed to based on unique identifier at the step S150 of above-mentioned load allocation method 100 in the particular server in all available servers, unique identifier can be the IP address of client.In step S150, based on any information in IP address, client can be distributed to particular server.Such as, according to last position of IP address, client can be distributed to particular server.Can be that the client of even number distributes to server A by last of IP address, be that the client of odd number distributes to server B by last of IP address.
Alternatively, in step S150, client is distributed to particular server by first three section IP address-based.First three section of IP address can comprise the symbol ". " between first three numeric string wherein and this three numeric strings.Or first three section of IP address can also comprise the symbol ". " after first three numeric string.For IP address 221.217.241.***, its first three section can be " 221.217.241 " or " 221.217.241. ".
Individual client's end that some client, particularly some operators (such as CHINAUNICOM) are served, its IP address may not be unalterable.Particularly the 4th section of IP address is often change.The 4th section of IP address can comprise last numeric string wherein.For IP address 221.217.241.***, its 4th section is * * *.Suppose in a sight, when client is distributed to particular server, consider the 4th section of IP address.If the IP address of client there occurs change when distributing client, so by causing server client being assigned to mistake, cause conversation.Client is distributed to particular server and each client can be ensured to a greater degree to distribute to particular server by first three section IP address-based, thus guarantees that session keeps.
Alternatively, in step S150, client is distributed to special services implement body and is comprised step S151, step S152, step S153 and step S154 by first three section IP address-based.
In step S151, according to the number determination divisor of all available servers.First, total number of whole available server is determined.According to this total number determination divisor.Such as, determine that this total number is divisor.Suppose that all available servers are 10 altogether.So determine that divisor is 10.Certainly, total number can also be greater than or less than divisor.
In step S152, first three section of IP address is encoded, to obtain encoded radio.By this cataloged procedure, obtain one, with IP address, there is the encoded radio of mapping relations one by one.Such as IP address 221.217.241.***, the array of wherein first three section can be become encoded radio 221217241.
In step S153, by encoded radio divided by divisor, to obtain remainder.That is modulo operation is carried out to encoded radio.Such as, by 221217241 divided by 10, obtaining remainder is 1.
In step S154, based on remainder determination particular server.Particularly, be in the example of divisor in total number, the 1st server can determined in server according to remainder 1 is particular server.Be appreciated that if remainder is 0, so can determine that in server, the 10th server is particular server.
The implementation of above-mentioned steps S150 is fairly simple, and each client can be mapped to a unique particular server, thus ensures that session is not interrupted.
Alternatively, first three section of IP address is carried out encoding and is specifically comprised by above-mentioned steps S152: generate encoded radio, to represent this IP address according to numeral in first three section of IP address.
As mentioned above, in the present invention's example, directly by the digital jointing in first three section of IP address together, a number is formed using as encoded radio.Such as, for IP address 221.217.241.***, this encoded radio can be 221217241.
In another example of the present invention, first by the digital jointing in first three section of IP address together, then according to unalterable rules change this through splicing number in numeral, to obtain encoded radio.Specifically comprise the following steps: 1) by the 5th figure place and the 2nd figure place reversing of position; 2) the 3rd figure place is added particular value, such as 5.For IP address 221217241, first exchange the 5th figure place wherein and the 2nd figure place, obtain numeral 221247211; Then the 3rd figure place is added 5, obtain encoded radio 221247711 thus.
Alternatively, at above-mentioned steps S152 first three section of IP address carried out encoding and specifically comprise: Hash operation is carried out to first three section of IP address, and determines that obtained cryptographic Hash is encoded radio.
The binary value of random length can be mapped as the binary value of shorter regular length by Hash operation, and the binary value of this regular length is called cryptographic Hash.For any one binary value, its cryptographic Hash be one piece of data uniquely and extremely compact numeric representation form.So, can using the Hash operation result of first three section of IP address as encoded radio.Alternatively, cryptographic Hash can be the binary value of 12 to 16.
Hash operation can be regarded as a kind of cryptographic calculation.In step S152, perform the Hash operation of first three section to IP address, load allocation method can be made not easily to be cracked by bad personages such as hackers.That is, other people will be not easy to determine how client is distributed to particular server, avoid its attack to server system, thus improve the fail safe of system.
Alternatively, above-mentioned load allocation method 100 comprises for each available server further, according to disposal ability for it gives respective weights.Wherein, the size of weight is directly proportional to the disposal ability of server.The disposal ability of available server can be different.Than if any server possible configuration have processor compared with multinuclear, the processor being configured with less core had, the processor be configured with compared with high primary frequency had, the processor being configured with lower dominant frequency had.Here, give larger weight can to the server that disposal ability is strong, the server weak to disposal ability gives less weight, with when load distributes, more client is distributed to the strong server of disposal ability, less client is distributed to the weak server of disposal ability.
Number determination divisor according to all available servers in above-mentioned steps S151 can specifically comprise: according to the respective weights of each available server and according to the number determination divisor of all available servers.
In one example, total number of available server is 10.Wherein the weight of the 10th server is 2, and the weight of other servers is 1.Divisor can be defined as 11.In this example, divisor is greater than total number.When the encoded radio of the IP address of client is to 11 deliverys, when remainder is 1 to 9, client is distributed to respectively the 1st server to the 9th server.When the encoded radio of the IP address of client is to 11 deliverys, when remainder is 10 or 0, client is distributed to the 10th server.
In a word, give different weights to the server that disposal ability is different, the server that the disposal ability made is strong is assigned with more client, all available servers will be made to make the best use of everything, avoid computing resource waste.
Alternatively, at the step S150 of load allocation method 100 before based on unique identifier client being distributed to the particular server in all available servers, method 100 comprises further: determine all available servers based on server list.Server in server cluster may break down, cause cannot with client normal conversation.So, load distribute before, first determine available server, can Deterministic service device cluster better with client session.This determination operation based on server list, can list the identifier of all available servers in this server list.Server list can be stored on server administrators, thus when needed, can take and determine all available servers based on server list.
Alternatively, before determining all available servers based on server list, method 100 comprises step S101, step S102 and step S103 further.In step S101, send message to Servers-all.Monitoring request message can be sent by server administrators to all servers, can normally work so that monitor server is current.In step s 102, the feedback message of described Servers-all is received.If any server fault, then it correctly may not send feedback message.Thus, the correct feedback message from failed server will do not received.In step s 103, according to received feedback message determination server list.Particularly, can judge whether to have have received the feedback message from each server.Then, in all feedback messages, determine correct feedback message wherein from server.Finally, above-mentioned server list is generated according to the identifier of the server sending correct feedback message.
By sending monitoring request message and receiving the operating state that feedback message determines server, the work state information of server can be obtained more exactly, and then ensure client to be distributed to the server that can normally work, ensure that carrying out smoothly of the session of client and server.
According to the present invention another part of aspect, provide a kind of load distributing apparatus.Fig. 3 illustrates the schematic block diagram of load distributing apparatus 300 according to an embodiment of the invention.As shown in Figure 3, load distributing apparatus 300 comprises the first receiver module 310, acquisition module 330 and distribution module 350.
First receiver module 310 is for receiving the session request from client.Acquisition module 330, for according to session request, obtains the unique identifier of client.Distribution module 350 is for distributing to the particular server in all available servers by client based on unique identifier.
Alternatively, above-mentioned unique identifier is the IP address of client.
Alternatively, above-mentioned distribution module 350 specifically comprises distribution sub module, for first three section IP address-based, client is distributed to particular server.
Alternatively, above-mentioned distribution sub module specifically comprises: divisor determining unit, coding unit, divider and server determining unit.Divisor determining unit is used for the number determination divisor according to all available servers.Coding unit is used for first three section of IP address to encode, to obtain encoded radio.Divider is used for by encoded radio divided by divisor, to obtain remainder.Server determining unit is used for based on remainder determination particular server.
Alternatively, above-mentioned coding unit specifically comprises the first subelement, for generating encoded radio according to numeral in first three section of IP address.
Alternatively, above-mentioned coding unit specifically comprises the second subelement, for carrying out Hash operation to first three section of IP address, and determines that obtained cryptographic Hash is encoded radio.
Alternatively, above-mentioned load distributing apparatus 300 comprises tax weight unit further, for for each available server, according to disposal ability for it gives respective weights.And divisor determining unit specifically comprises divisor determination subelement, for according to the respective weights of each available server and according to the number determination divisor of all available servers.
Alternatively, above-mentioned load distributing apparatus 300 comprises available server determination module further, for determining all available servers based on server list.
Alternatively, above-mentioned load distributing apparatus 300 comprises sending module, the second receiver module and List Generating Module further.Sending module is used for sending message to Servers-all.Second receiver module is for receiving the feedback message of described Servers-all.List Generating Module is used for according to the list of described feedback message generation server.
Those of ordinary skill in the art, by reading above about the detailed description of load allocation method 100, can understand the structure of above-mentioned load distributing apparatus 300, realization and advantage, therefore repeat no more here.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In specification provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this specification (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary compound mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the some or all parts in the load distributing apparatus of the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computer of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.
The embodiment of the invention discloses A1, a kind of load allocation method, comprising:
Receive the session request from client;
According to described session request, obtain the unique identifier of described client; And
Based on described unique identifier described client distributed to the particular server in all available servers.
A2, load allocation method as described in A1, described unique identifier is the Internet protocol address of described client.
A3, load allocation method as described in A2, it is described that based on described unique identifier, by described client, the special services implement body distributed in all available servers comprises:
Described client is distributed to described particular server by first three section based on described Internet protocol address.
A4, load allocation method as described in A3, described client is distributed to described special services implement body and is comprised by described first three section based on described Internet protocol address:
According to the number determination divisor of all available servers;
First three section of described Internet protocol address is encoded, to obtain encoded radio;
By described encoded radio divided by described divisor, to obtain remainder; And
Described particular server is determined based on described remainder.
A5, load allocation method as described in A4, described first three section by described Internet protocol address is carried out encoding and is specifically comprised:
Described encoded radio is generated according to numeral in first three section of described Internet protocol address.
A6, load allocation method as described in A4, described first three section by described Internet protocol address is carried out encoding and is specifically comprised:
Hash operation is carried out to first three section of described Internet protocol address, and determines that obtained cryptographic Hash is described encoded radio.
A7, load allocation method as described in any one of A4 to A6, described method comprises further:
For each available server, according to disposal ability for it gives respective weights, wherein said respective weights is directly proportional to described disposal ability;
The described number determination divisor according to all available servers specifically comprises:
Described divisor is determined according to the respective weights of described each available server according to the number of all available servers.
A8, load allocation method as described in any one of A1 to A7, described based on described unique identifier described client distributed to the particular server in all available servers before, described method comprises further:
Described all available servers are determined based on server list.
A9, load allocation method as described in A8, described determine all available servers based on server list before, described method comprises further:
Message is sent to Servers-all;
Receive the feedback message of described Servers-all; And
Described server list is determined according to described feedback message.
The embodiment of the invention also discloses B10, a kind of load distributing apparatus, comprising:
First receiver module, for receiving the session request from client;
Acquisition module, for according to described session request, obtains the unique identifier of described client; And
Distribution module, for distributing to the particular server in all available servers by described client based on described unique identifier.
B11, load distributing apparatus as described in B10, described unique identifier is the Internet protocol address of described client.
B12, load distributing apparatus as described in B11, described distribution module specifically comprises:
Distribution sub module, distributes to described particular server for first three section based on described Internet protocol address by described client.
B13, load distributing apparatus as described in B12, described distribution sub module specifically comprises:
Divisor determining unit, for the number determination divisor according to all available servers;
Coding unit, for encoding first three section of described Internet protocol address, to obtain encoded radio;
Divider, for by described encoded radio divided by described divisor, to obtain remainder; And
Server determining unit, for determining described particular server based on described remainder.
B14, load distributing apparatus as described in B13, described coding unit specifically comprises:
First subelement, for generating described encoded radio according to numeral in first three section of described Internet protocol address.
B15, load distributing apparatus as described in B13, described coding unit specifically comprises:
Second subelement, for carrying out Hash operation to first three section of described Internet protocol address, and determines that obtained cryptographic Hash is described encoded radio.
B16, load distributing apparatus as described in any one of B13 to B15, described equipment comprises further:
Compose weight unit, for for each available server, be its imparting respective weights according to disposal ability, wherein said respective weights is directly proportional to described disposal ability;
Described divisor determining unit specifically comprises:
Divisor determination subelement, for determining described divisor according to the number of all available servers according to the respective weights of described each available server.
B17, load distributing apparatus as described in any one of B10 to B16, described equipment comprises further:
Available server determination module, for determining described all available servers based on server list.
B18, load distributing apparatus as described in B17, described equipment comprises further:
Sending module, for sending message to Servers-all;
Second receiver module, for receiving the feedback message of described Servers-all; And
List Generating Module, for according to the list of described feedback message generation server.

Claims (10)

1. a load allocation method, comprising:
Receive the session request from client;
According to described session request, obtain the unique identifier of described client; And
Based on described unique identifier described client distributed to the particular server in all available servers.
2. load allocation method as claimed in claim 1, it is characterized in that, described unique identifier is the Internet protocol address of described client.
3. load allocation method as claimed in claim 2, it is characterized in that, described based on described unique identifier, by described client, the special services implement body distributed in all available servers comprises:
Described client is distributed to described particular server by first three section based on described Internet protocol address.
4. load allocation method as claimed in claim 3, it is characterized in that, described client is distributed to described special services implement body and is comprised by described first three section based on described Internet protocol address:
According to the number determination divisor of all available servers;
First three section of described Internet protocol address is encoded, to obtain encoded radio;
By described encoded radio divided by described divisor, to obtain remainder; And
Described particular server is determined based on described remainder.
5. load allocation method as claimed in claim 4, it is characterized in that, described first three section by described Internet protocol address is carried out encoding and is specifically comprised:
Described encoded radio is generated according to numeral in first three section of described Internet protocol address.
6. load allocation method as claimed in claim 4, it is characterized in that, described first three section by described Internet protocol address is carried out encoding and is specifically comprised:
Hash operation is carried out to first three section of described Internet protocol address, and determines that obtained cryptographic Hash is described encoded radio.
7. the load allocation method as described in any one of claim 4 to 6, is characterized in that, described method comprises further:
For each available server, according to disposal ability for it gives respective weights, wherein said respective weights is directly proportional to described disposal ability;
The described number determination divisor according to all available servers specifically comprises:
Described divisor is determined according to the respective weights of described each available server according to the number of all available servers.
8. the load allocation method as described in any one of claim 1 to 7, is characterized in that, described based on described unique identifier described client distributed to the particular server in all available servers before, described method comprises further:
Described all available servers are determined based on server list.
9. load allocation method as claimed in claim 8, is characterized in that, described determine all available servers based on server list before, described method comprises further:
Message is sent to Servers-all;
Receive the feedback message of described Servers-all; And
Described server list is determined according to described feedback message.
10. a load distributing apparatus, comprising:
First receiver module, for receiving the session request from client;
Acquisition module, for according to described session request, obtains the unique identifier of described client; And
Distribution module, for distributing to the particular server in all available servers by described client based on described unique identifier.
CN201510996362.5A 2015-12-25 2015-12-25 Load allocation method and equipment Active CN105530311B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510996362.5A CN105530311B (en) 2015-12-25 2015-12-25 Load allocation method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510996362.5A CN105530311B (en) 2015-12-25 2015-12-25 Load allocation method and equipment

Publications (2)

Publication Number Publication Date
CN105530311A true CN105530311A (en) 2016-04-27
CN105530311B CN105530311B (en) 2019-05-31

Family

ID=55772287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510996362.5A Active CN105530311B (en) 2015-12-25 2015-12-25 Load allocation method and equipment

Country Status (1)

Country Link
CN (1) CN105530311B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412120A (en) * 2016-11-22 2017-02-15 北京海泰方圆科技股份有限公司 Load server configuration method and device
CN106686129A (en) * 2017-01-23 2017-05-17 天地融科技股份有限公司 Load balancing method and load balancing system
CN106713499A (en) * 2017-01-23 2017-05-24 天地融科技股份有限公司 Load balancing method, equipment and system
CN106790675A (en) * 2017-01-23 2017-05-31 天地融科技股份有限公司 Load-balancing method, equipment and system in a kind of cluster
CN107070983A (en) * 2017-01-23 2017-08-18 天地融科技股份有限公司 A kind of load-balancing method, equipment and system forwarded based on address
CN111614726A (en) * 2020-04-24 2020-09-01 深圳震有科技股份有限公司 Data forwarding method, cluster system and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101594371A (en) * 2008-05-28 2009-12-02 山东省标准化研究院 The load balance optimization method of food safety trace back database
US20130336122A1 (en) * 2008-05-08 2013-12-19 Telefonaktiebolaget L M Ericsson (Publ) Load balancing pseudowire encapsulated iptv channels over aggregated links

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130336122A1 (en) * 2008-05-08 2013-12-19 Telefonaktiebolaget L M Ericsson (Publ) Load balancing pseudowire encapsulated iptv channels over aggregated links
CN101594371A (en) * 2008-05-28 2009-12-02 山东省标准化研究院 The load balance optimization method of food safety trace back database

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
DKCNDK: "Haproxy 配置项\配置实例(www.cnblogs.com/dkblog/archive/2012/03/13/2393321)", 《博客园》 *
ICOSGON: "设计一个中转的消息服务器的负载均衡算法", 《CSDN论坛》 *
XIAOHUO: "Nginx学习 - ip_hash的hash算法(www.linuxidc.com.cn/tips/154/8098154.shtml)", 《LINUX社区》 *
天神战队风之神: "架构设计(tieba.baidu.com/p/3804758995?red_tag=2859177667)", 《百度贴吧游戏编程开发吧》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412120A (en) * 2016-11-22 2017-02-15 北京海泰方圆科技股份有限公司 Load server configuration method and device
CN106686129A (en) * 2017-01-23 2017-05-17 天地融科技股份有限公司 Load balancing method and load balancing system
CN106713499A (en) * 2017-01-23 2017-05-24 天地融科技股份有限公司 Load balancing method, equipment and system
CN106790675A (en) * 2017-01-23 2017-05-31 天地融科技股份有限公司 Load-balancing method, equipment and system in a kind of cluster
CN107070983A (en) * 2017-01-23 2017-08-18 天地融科技股份有限公司 A kind of load-balancing method, equipment and system forwarded based on address
CN111614726A (en) * 2020-04-24 2020-09-01 深圳震有科技股份有限公司 Data forwarding method, cluster system and storage medium

Also Published As

Publication number Publication date
CN105530311B (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN105530311A (en) Load distribution method and device
US10505929B2 (en) Management and authentication in hosted directory service
US20230036089A1 (en) Testing systems and methods
US9998534B2 (en) Peer-to-peer seed assurance protocol
CN110134889B (en) Short link generation method and device and server
CN101971164A (en) Scalable hosting of user solutions
US10511484B1 (en) Membership self-discovery in distributed computing environments
CN107333248B (en) A kind of real-time sending method of short message and system
CN110519240A (en) A kind of single-point logging method, apparatus and system
EP3629522B1 (en) Systems and methods for testing resilience of a distributed network
US20120078946A1 (en) Systems and methods for monitoring files in cloud-based networks
CN105100224A (en) Data transmission method and device
CN106708636A (en) Cluster-based data caching method and apparatus
CN108737591A (en) A kind of method and device of service configuration
CN106657358A (en) Service proxy method and device for Android applications
CN110245014B (en) Data processing method and device
CN102150397B (en) Method for responding to request relative to hose name and method for entrusting multiple host names in shared entrusted environments
US20200267230A1 (en) Tracking client sessions in publish and subscribe systems using a shared repository
CN103701844B (en) The method and system of managing user information
CN112181599B (en) Model training method, device and storage medium
CN105100031A (en) Method, device and system for adding trusts in batches
CN111984614B (en) Method, device and system for sharing files
US11063948B2 (en) Handling potential service load interruptions by presenting action items for service requester to complete to increase time to address potential service load interruption
CN103856557A (en) Business object processing method and system based on third-party platform
Hwang et al. Blockchain-based automatic indemnification mechanism based on proof of violation for cloud storage services

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee after: Beijing Qizhi Business Consulting Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Qizhi software (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder
TR01 Transfer of patent right

Effective date of registration: 20220324

Address after: 100016 1773, 15 / F, 17 / F, building 3, No.10, Jiuxianqiao Road, Chaoyang District, Beijing

Patentee after: Sanliu0 Digital Security Technology Group Co.,Ltd.

Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park)

Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd.

Patentee before: Beijing Qizhi Business Consulting Co.,Ltd.

TR01 Transfer of patent right