Movatterモバイル変換


[0]ホーム

URL:


CN107911470B - Distributed dynamic load-balancing method calculates equipment and computer storage medium - Google Patents

Distributed dynamic load-balancing method calculates equipment and computer storage medium
Download PDF

Info

Publication number
CN107911470B
CN107911470BCN201711240171.1ACN201711240171ACN107911470BCN 107911470 BCN107911470 BCN 107911470BCN 201711240171 ACN201711240171 ACN 201711240171ACN 107911470 BCN107911470 BCN 107911470B
Authority
CN
China
Prior art keywords
service request
load balancing
uri
name space
configuration strategy
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
CN201711240171.1A
Other languages
Chinese (zh)
Other versions
CN107911470A (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.)
Shenzhen Zhangyue Animation Technology Co ltd
Original Assignee
Zhangyue 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 Zhangyue Technology Co LtdfiledCriticalZhangyue Technology Co Ltd
Priority to CN201711240171.1ApriorityCriticalpatent/CN107911470B/en
Publication of CN107911470ApublicationCriticalpatent/CN107911470A/en
Application grantedgrantedCritical
Publication of CN107911470BpublicationCriticalpatent/CN107911470B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of distributed dynamic load-balancing method, calculate equipment and computer storage medium.Wherein, method includes: the Notification of Changes of the real-time load balancing configuration strategy for monitoring the storage of decentralized configuration administrative center;According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;Service request is received, service node corresponding with the service request is determined according to the load balancing configuration strategy in memory;The service request is redirected to the service node to handle.Using this programme, service request can be routed according to the load balancing configuration strategy that dynamic updates in real time, improve the flexibility to service request routing;And avoid and low efficiency is updated to load balancing in the prior art, and after being updated to load balancing, the drawbacks of can not being routed in time according to updated load balancing to service request.

Description

Distributed dynamic load-balancing method calculates equipment and computer storage medium
Technical field
The present invention relates to field of computer technology, and in particular to a kind of distributed dynamic load-balancing method calculates equipmentAnd computer storage medium.
Background technique
Favor of the distributed system with its powerful processing capacity and by numerous technical staff.However, due to distributionService node number is more in system, when occurring load imbalance in distributed system, as the load of some service node is serious super negativeLotus and when leading to service node delay machine, then will affect entire distributed system performance.So need to usually pass through load balancerIt realizes the load balancing to distributed system, guarantees the stability of distributed system.
Currently used distributed load equalizing method be according to the load balancing configuration strategy being stored in disk come pairService request is routed.However, being needed using this kind of load-balancing method when being changed to load balancing configuration strategyWrite operation is carried out to disk, after changing to the load balancing configuration strategy in disk, generally requires restarting loadBalanced device loads load balancing configuration strategy new in disk, and then according to new load balancing configuration strategy to service requestIt is routed.So will be greatly reduced the update efficiency of load balancing configuration strategy using this kind of method, and can not be in real timeService request is routed according to updated load balancing configuration strategy.
Summary of the invention
In view of the above problems, the present invention is proposed to overcome the above problem in order to provide one kind or at least be partially solvedThe distributed dynamic load-balancing method of the above problem calculates equipment and computer storage medium.
According to an aspect of the invention, there is provided a kind of distributed dynamic load-balancing method, comprising:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
According to another aspect of the present invention, a kind of calculating equipment is provided, the calculating equipment is used for in distributionThe service registered in coordination system carries out health examination, wherein calculate equipment include: processor, memory, communication interface andCommunication bus, the processor, the memory and the communication interface complete mutual lead to by the communication busLetter;
The memory for storing an at least executable instruction, the executable instruction execute the processor withLower operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
According to a further aspect of the invention, a kind of computer storage medium is provided, in the computer storage mediumIt is stored with an at least executable instruction, for carrying out health examination to the service registered in distributed coordination system, this can be heldRow instruction makes processor execute following operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
Distributed dynamic load-balancing method, calculating equipment and the computer storage medium provided according to the present invention, passes throughThe Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time, and according to Notification of Changes, it willLoad balancing configuration strategy after change is synchronized in memory, thus can realize rapidly to load balancing configuration strategy moreNewly;Also, service node corresponding with service request is determined according to the load balancing configuration strategy in memory, and business is askedIt asks and is redirected to corresponding service node and is handled.Using this programme, it is equal to realize the load updated in real time according to dynamicWeighing apparatus configuration strategy routes service request, improves the flexibility to service request routing;And it avoids in the prior artLow efficiency is updated to load balancing, and after being updated to load balancing, it can not be in time according to updateThe drawbacks of load balancing afterwards routes service request.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage canIt is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are general for this fieldLogical technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to this hairBright limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the process signal of the distributed dynamic load-balancing method provided according to an embodiment of the present inventionFigure;
Fig. 2 shows the processes of the distributed dynamic load-balancing method provided according to a further embodiment of the invention to showIt is intended to;
Fig. 3 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing this public affairs in attached drawingThe exemplary embodiment opened, it being understood, however, that may be realized in various forms the disclosure without the implementation that should be illustrated hereExample is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the disclosureRange is fully disclosed to those skilled in the art.
Fig. 1 shows the process signal of the distributed dynamic load-balancing method provided according to an embodiment of the present inventionFigure.As shown in Figure 1, this method comprises:
Step S110 monitors the Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage in real time.
Wherein, decentralized configuration administrative center is stored with load balancing configuration strategy.Pass through decentralized configuration administrative centerLoad balancing configuration strategy is stored convenient for improving the reliability of configuration strategy, and convenient for carrying out pipe to load balancing configuration strategyReason and change.
Further, since the load balancing configuration strategy of decentralized configuration administrative center storage can dynamically update, becomingCorresponding Notification of Changes is generated more afterwards, then can monitor the load balancing of decentralized configuration administrative center storage in this step in real timeThe Notification of Changes of configuration strategy, for updated load balancing configuration strategy can be obtained in subsequent step in real time.
Specifically, the specific of the Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitoredImplementation, those skilled in the art can self-setting, include the negative of decentralized configuration administrative center storage in Notification of ChangesCarry the identification information that equilibrium allocation strategy changes.Alternatively, also may include decentralized configuration in Notification of Changes in this stepThe detailed change details of the load balancing configuration strategy of administrative center's storage.It such as, may include that load balancing is matched in Notification of ChangesThe n-th part in strategy is set to have occurred change (n is the integer more than or equal to 1), and the change letter that other parts do not changeBreath.
Load balancing configuration strategy after change is synchronized in memory by step S120 according to Notification of Changes.
According to the Notification of Changes in step S110, the load balancing configuration strategy after change is synchronized in memory, thusAchieve the purpose that the load balancing configuration strategy after change can be obtained in real time.
Optionally, load balancing configuration strategy after change can be synchronized in memory in such a way that full dose is synchronous.Such as, when in step S110 whenever listening to Notification of Changes, after the change for storing decentralized configuration administrative center in this stepAll load balancing configuration strategies be synchronized in memory.
Optionally, the load balancing configuration strategy after change can be synchronized in memory by way of increment synchronization.For example, when whenever listening to Notification of Changes, according to Notification of Changes, decentralized configuration administrative center is stored in step S110Load balancing configuration strategy in the part changed be synchronized in memory.Synchronous number needed for being reduced using this methodAccording to amount, synchronous efficiency is improved.
Step S130 receives service request, corresponding with service request according to the load balancing configuration strategy determination in memoryService node.
Specifically, receive service request, according to the load balancing configuration strategy stored in current memory to service request intoRow parsing, determines service node corresponding with the service request according to parsing result.Optionally, when the business receivedWhen request is multiple, service corresponding with each service request is determined according to the load balancing configuration strategy in memory respectivelyNode.
Service request is redirected to corresponding service node and handled by step S140.
Specifically, according to the service node corresponding with service request determined in step S130, service request is resetIt is handled to corresponding service node.
According to distributed dynamic load-balancing method provided in this embodiment, by monitoring decentralized configuration management in real timeThe Notification of Changes of the load balancing configuration strategy of central store, and according to Notification of Changes, the load balancing after change is configured into planIt is slightly synchronized in memory, so that the rapidly update to load balancing configuration strategy can be realized;Also, according to negative in memoryIt carries equilibrium allocation strategy and determines service node corresponding with service request, and service request is redirected to corresponding service and is savedPoint is handled.Using this programme, realize in real time according to dynamic update load balancing configuration strategy to service request intoWalking along the street is by improving the flexibility to service request routing;And it avoids and efficiency is updated to load balancing in the prior artIt is low, and after being updated to load balancing, it can not be in time according to updated load balancing to businessThe drawbacks of request is routed.
Fig. 2 shows the processes of the distributed dynamic load-balancing method provided according to a further embodiment of the invention to showIt is intended to.As shown in Fig. 2, this method comprises:
Step S210 monitors the Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage in real time.
Wherein, decentralized configuration administrative center can be the Distributed Application management coordination center based on zookeeper.After servicing online, the service discovery component in zookeeper distributed application program coordination system calls service registration automaticallyInterface will be in service registration to zookeeper.Also, the data store organisation of tree structure is used in zookeeper, thusThe drawbacks of naming conflict occurs when being registered on zookeeper is avoided, ensure that global uniqueness.Further, work as serviceNode is notified that all nodes for subscribing to the service node after changing.
By the way that the reliability of configuration strategy can be improved in decentralized configuration administrative center storage load balancing configuration strategy,And convenient for load balancing configuration strategy is managed and is changed.For example, zookeeper would know that by health control mechanismThe health status of each service node then can accurately be known by this decentralized configuration administrative center of zookeeper eachThe information of service node, consequently facilitating the load balancing configuration strategy according to the information of each service node for storage carries outChange.Such as, after a certain service node is offline, it is dynamically adjusted load balancing configuration strategy, for asking subsequent for businessThe offline service node is shielded when seeking distribution service node, to improve the processing speed to service request.
Specifically, it is included at least in the load balancing configuration strategy of the decentralized configuration administrative center storage in this stepThere are rewriting rule and/or routing rule.Wherein, for being written over replacement to service request, routing rule is used for rewriting ruleService node corresponding thereto is determined according to service request.It is further alternative, in the decentralized configuration management in this stepFeel and specifically includes URI (Uniform Resource Identifier, uniform resource identifier) and name in the routing rule of storageThe corresponding relationship of word space and at least one match pattern.Wherein, match pattern includes accurate match pattern, with modificationPrefix matching mode, case sensitive canonical match pattern, the canonical match pattern of case-insensitive, without modificationPrefix matching mode, and/or general match pattern.
Optionally, decentralized configuration administrative center is provided with connects to what rewriting rule and/or routing rule were configuredMouthful.The dynamic adjustment to rewriting rule and/or routing rule can be realized by rewriting rule and/or routing rule interface, thusRealize that the dynamic of the load balancing configuration strategy stored in decentralized configuration administrative center updates.It is further alternative, the interfaceIt can be http interface, can be convenient for the management and update to load balancing configuration strategy using http interface, and be load balancingThe visualization of configuration strategy updates operation and provides basis, can also be adapted to most production environment servers.
Since the load balancing configuration strategy of decentralized configuration administrative center storage can dynamically update, when changing,Corresponding Notification of Changes can be generated, then can monitor the load balancing configuration plan of decentralized configuration administrative center storage in this stepNotification of Changes slightly.Wherein, specific listening mode those skilled in the art can self-setting.It optionally, can in Notification of ChangesThe identification information only changed comprising load balancing configuration strategy, as only (T shows to bear comprising identification parameter in Notification of ChangesIt carries equilibrium allocation strategy to change);Alternatively, in Notification of Changes can also packet load balancing configuration strategy detailed change it is thinSection, e.g., in Notification of Changes may include in load balancing configuration strategy the n-th part have occurred change (n be it is whole more than or equal to 1Number), and the modification information that other parts do not change.
Step S220, it is by shared drive component, the load balancing configuration strategy after change is same according to Notification of ChangesStep is into memory.
Wherein, when decentralized configuration administrative center is the Distributed Application management coordination center based on zookeeper,The load balancing configuration strategy after change can be synchronized to by the qconf agent shared drive component in zookeeperIn memory.By the application of shared drive component, avoidable load balancing configuration strategy is frequently heavily loaded when changing,To improve the update synchronous efficiency of load balancing configuration strategy.
Specifically, read the URI's and name space configured in decentralized configuration administrative center by shared drive componentCorresponding relationship and at least one match pattern, the corresponding relationship and at least one match pattern of URI and name space is sameStep is into memory.
Further, it is synchronized in memory by the corresponding relationship of URI and name space and at least one match patternAfterwards, corresponding priority can be set for match pattern.For example, priority set-up mode as shown in Table 1 can be used, shown in table 1Priority set-up mode in, accurate match pattern highest priority, and general match pattern priority is minimum.The present embodimentThe set-up mode of middle priority includes but is not limited to the set-up mode in table 1, and those skilled in the art can be according to practical business needSelf-setting is sought, the present embodiment is not construed as limiting this.
Table 1
Match patternPriority
Accurate match pattern1
Prefix matching mode with modification2
Case sensitive canonical match pattern3
The canonical match pattern of case-insensitive4
Without the prefix matching mode of modification5
General match pattern6
Optionally, during the load balancing configuration strategy after change is synchronized to memory, it is synchronous that full dose can be usedMode, the load balancing configuration strategy after change is synchronized in memory.Such as, when in step S210 whenever listen to changeWhen notice, all load balancing configuration strategies after the change for storing decentralized configuration administrative center in this step are synchronousInto memory.Alternatively, the load balancing configuration strategy after change can also be synchronized in memory by way of increment synchronization.For example, when whenever listening to Notification of Changes, according to Notification of Changes, decentralized configuration administrative center is stored in step S210Load balancing configuration strategy in the part changed be synchronized in memory.The number of synchrodata can be reduced using this methodAccording to amount, synchronous efficiency is improved.
Step S230 receives service request, extracts the URI information in service request, is advised according to routing stored in memoryThe then name space that the determining URI information with service request matches, determine the corresponding service node of the name space be withThe corresponding service node of service request.
Specifically, when receiving service request, the URI information in the service request is extracted.For example, receivingWhen http service request, the URI field in the http request can be extracted, to obtain the URI information in the service request.
Further, according to the determining name space to match with URI information of routing rule stored in memory.Firstly,The corresponding match pattern of URI information is determined according to match pattern stored in memory and corresponding priority.Specifically, it pressesAccording to the sequence of priority from high to low, successively matched using a match pattern in routing rule with the URI information,Until successful match, then stop matching, and the successful match pattern of current matching is determined as corresponding with the URI informationMatch pattern.For example, being matched first, in accordance with accurate match pattern with the URI information, if successful match, it is determined that accurateMatch pattern is match pattern corresponding with the URI information;Otherwise, further according to the prefix matching mode pair with modificationURI information is matched, if successful match, it is determined that with modification prefix matching mode be and the URI information correspondingWith mode, to determine match pattern corresponding with the URI information using this kind of method.Secondly, URI information has been determinedAfter corresponding match pattern, URI information is parsed according to the match pattern, and according to result after parsing and interiorThe URI information for depositing middle storage determines name space corresponding with the URI information with the corresponding relationship of name space.
It optionally, can also be according to memory before according to the determining name space to match with URI information of routing ruleThe rewriting rule of middle storage is written over the URI information in service request, the URI information after being rewritten.Optionally, URIInformation can pass through one or many rewrite operations.After being written over to URI information, URI information after being rewritten,Name space corresponding with the URI information after rewriting is further then determined according to routing rule stored in memory.By rightThe rewriting of URI, can further specification URI format, realize pseudo- static address (i.e. by dynamic address disguise oneself as static address), andIt is able to satisfy the demand that address jumps after domain name switches.
It, further will service corresponding with the name space after the name space to match with URI information has been determinedNode is determined as service node corresponding with service request.
Service request is redirected to corresponding service node and handled by step S240.
According to the URI information corresponding with service request determined in step S230, in a manner of dynamic routing, by instituteIt states request and is redirected to the corresponding service node of the request, so that the service node handles service request.
According to distributed dynamic load-balancing method provided in this embodiment, by monitoring decentralized configuration management in real timeThe Notification of Changes of the load balancing configuration strategy of central store, and will be changed according to Notification of Changes by shared drive componentLoad balancing configuration strategy afterwards is synchronized in memory, so that the rapidly update to load balancing configuration strategy can be realized;AndService request is received, the URI information in service request is extracted, according to routing rule determination stored in memory and service requestIn the name space that matches of URI information, determine that the corresponding service node of the name space is clothes corresponding with service requestBusiness node, and service request is redirected to corresponding service node and is handled.Using this programme, root in real time is realizedService request is routed according to the load balancing configuration strategy that dynamic updates, improves the flexibility to service request routing;And avoid and low efficiency is updated to load balancing in the prior art, and after being updated to load balancing, nothingThe drawbacks of method in time routes service request according to updated load balancing;Also, in decentralized configuration pipeThe interface configured to rewriting rule and/or routing rule is provided in reason center, thus further convenient for rewriting ruleThen and/or the adjustment and management of routing rule;Moreover, the synchronization of load balancing configuration strategy is realized by shared drive component,It can further improve synchronous efficiency, the frequent heavy duty of load balancing configuration strategy avoided, to further increase router efficiency.
A kind of nonvolatile computer storage media is provided according to an embodiment of the present invention, wherein the computerStorage medium is stored with an at least executable instruction, which can be performed in above-mentioned any means embodimentMethod.
Executable instruction specifically can be used for so that processor executes following operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;According to describedLoad balancing configuration strategy after change is synchronized in memory by Notification of Changes;Service request is received, according to the institute in memoryIt states load balancing configuration strategy and determines service node corresponding with the service request;The service request is redirected to instituteService node is stated to be handled.
In a kind of optional embodiment, the load balancing configuration strategy is included at least: rewriting rule and/or roadBy rule.
In a kind of optional embodiment, the decentralized configuration administrative center is provided with to rewriting rule and/or roadThe interface configured by rule.
In a kind of optional embodiment, executable instruction specifically can be used for so that processor executes following operation:
The URI information in the service request is extracted, is determined according to the routing rule and is matched with the URI informationName space;Determine that the corresponding service node of the name space is service node corresponding with the service request.
In a kind of optional embodiment, executable instruction specifically can be used for so that processor executes following operation:
The URI information in the service request is written over according to the rewriting rule, the URI letter after being rewrittenBreath;It is then described to determine that the name space to match with the URI information further comprises according to the routing rule: according to instituteState the name space that the determining URI information with after the rewriting of routing rule matches.
In a kind of optional embodiment, executable instruction specifically can be used for so that processor executes following operation:
The load balancing configuration strategy after change is synchronized to interior according to the Notification of Changes by shared drive componentIn depositing.
In a kind of optional embodiment, executable instruction specifically can be used for so that processor executes following operation:
The pass corresponding with name space the URI configured in decentralized configuration administrative center is read by shared drive componentSystem and at least one match pattern, the URI is synchronous with the corresponding relationship of name space and at least one match patternInto memory.
In a kind of optional embodiment, executable instruction specifically can be used for so that processor executes following operation:
According to the corresponding relationship and at least one match pattern of the URI and name space, set for the match patternSet corresponding priority.
In a kind of optional embodiment, the decentralized configuration administrative center is the distribution based on zookeeperApplication management Consultation Center.
Fig. 3 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention, present invention toolBody embodiment does not limit the specific implementation for calculating equipment.
As shown in figure 3, the calculating equipment may include: processor (processor) 302, communication interface(Communications Interface) 304, memory (memory) 306 and communication bus 308.
Wherein: processor 302, communication interface 304 and memory 306 are completed mutual by communication bus 308Communication.Communication interface 304, for being communicated with the network element of other equipment such as client or other servers etc..Processor 302,For executing program 310, the correlation step in above method embodiment can be specifically executed.
Program 310 specifically can be used for so that processor 302 executes following operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
In a kind of optional embodiment, the load balancing configuration strategy is included at least: rewriting rule and/or roadBy rule.
In a kind of optional embodiment, the decentralized configuration administrative center is provided with to rewriting rule and/or roadThe interface configured by rule.
In a kind of optional embodiment, program 310 specifically can be used for so that processor 302 executes following operation:
The URI information in the service request is extracted, is determined according to the routing rule and is matched with the URI informationName space;Determine that the corresponding service node of the name space is service node corresponding with the service request.
In a kind of optional embodiment, program 310 specifically can be used for so that processor 302 executes following operation:
The URI information in the service request is written over according to the rewriting rule, the URI letter after being rewrittenBreath;It is then described to determine that the name space to match with the URI information further comprises according to the routing rule: according to instituteState the name space that the determining URI information with after the rewriting of routing rule matches.
In a kind of optional embodiment, program 310 specifically can be used for so that processor 302 executes following operation:
The load balancing configuration strategy after change is synchronized to interior according to the Notification of Changes by shared drive componentIn depositing.
In a kind of optional embodiment, program 310 specifically can be used for so that processor 302 executes following operation:
The pass corresponding with name space the URI configured in decentralized configuration administrative center is read by shared drive componentSystem and at least one match pattern, the URI is synchronous with the corresponding relationship of name space and at least one match patternInto memory.
In a kind of optional embodiment, program 310 specifically can be used for so that processor 302 executes following operation:
According to the corresponding relationship and at least one match pattern of the URI and name space, set for the match patternSet corresponding priority.
In a kind of optional embodiment, the decentralized configuration administrative center is the distribution based on zookeeperApplication management Consultation Center.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of systemStructure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use variousProgramming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose thisThe preferred forms of invention.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the inventionExample can be practiced without these specific details.In some instances, well known method, knot is not been shown in detailStructure and technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,In the above description of the exemplary embodiment of the present invention, each feature of the invention is grouped together into single reality sometimesIt applies in example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: being wantedAsk protection the present invention claims features more more than feature expressly recited in each claim.More precisely, such asAs following claims reflect, inventive aspect is all features less than single embodiment disclosed above.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment, wherein each rightIt is required that itself is all as a separate embodiment of the present invention.
Those skilled in the art will understand that adaptivity can be carried out to the module in the equipment in embodimentGround changes and they is arranged in one or more devices different from this embodiment.It can be the module in embodimentOr unit or assembly is combined into a module or unit or component, and furthermore they can be divided into multiple submodule or sonsUnit or sub-component.It, can be with other than such feature and/or at least some of process or unit exclude each otherUsing any combination to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and such asAll process or units of any method or apparatus of the displosure are combined.Unless expressly stated otherwise, this specificationEach feature disclosed in (including the accompanying claims, abstract and drawings) can be by providing identical, equivalent, or similar meshAlternative features replace.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodimentsIn included certain features rather than other feature, but the combination of the feature of different embodiments means in the present inventionWithin the scope of and form different embodiments.For example, in the following claims, embodiment claimedIt is one of any can in any combination mode come using.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and thisField technical staff can be designed alternative embodiment without departing from the scope of the appended claims.In claimIn, any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" is not excluded for depositingIn element or step not listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multipleSuch element.The present invention can be by means of including the hardware of several different elements and by means of properly programmed calculatingMachine is realized.In the unit claims listing several devices, several in these devices can be by sameHardware branch embodies.The use of word first, second, and third does not indicate any sequence.It can be by these word solutionsIt is interpreted as title.
The invention discloses: a kind of distributed dynamic load-balancing method of A1., comprising:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
A2. method according to a1, wherein the load balancing configuration strategy includes at least: rewriting rule and/orRouting rule.
A3. the method according to A2, wherein the decentralized configuration administrative center be provided with to rewriting rule and/orThe interface that routing rule is configured.
A4. the method according to any one of A2 or A3, wherein the load balancing according in memory is matchedIt sets strategy and determines that service node corresponding with the service request further comprises:
The URI information in the service request is extracted, is determined according to the routing rule and is matched with the URI informationName space;
Determine that the corresponding service node of the name space is service node corresponding with the service request.
A5. method according to a4, wherein described according to routing rule determination and the URI information phaseBefore the name space matched, the method also includes:
The URI information in the service request is written over according to the rewriting rule, the URI letter after being rewrittenBreath;
It is then described to determine that the name space to match with the URI information further comprises according to the routing rule:
The name space to be matched according to the determining URI information with after the rewriting of the routing rule.
A6. according to the described in any item methods of A1-A5, wherein it is described according to the Notification of Changes, it will be negative after changeCarrying equilibrium allocation policy synchronization to memory further comprises:
The load balancing configuration strategy after change is synchronized to interior according to the Notification of Changes by shared drive componentIn depositing.
A7. the method according to A6, wherein the load balancing configuration strategy by after change is synchronized in memoryFurther comprise:
The pass corresponding with name space the URI configured in decentralized configuration administrative center is read by shared drive componentSystem and at least one match pattern, the URI is synchronous with the corresponding relationship of name space and at least one match patternInto memory.
A8. the method according to A7, wherein the method also includes:
According to the corresponding relationship and at least one match pattern of the URI and name space, set for the match patternSet corresponding priority.
A9. according to the described in any item methods of A1-A8, wherein the decentralized configuration administrative center be based onThe Distributed Application management coordination center of zookeeper.
The invention also discloses: a kind of calculating equipment of B10., the calculating equipment includes: processor, memory, communicationInterface and communication bus, the processor, the memory and the communication interface are completed mutual by the communication busCommunication;
The memory for storing an at least executable instruction, the executable instruction execute the processor withLower operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
B11. calculating equipment according to b10, wherein the load balancing configuration strategy includes at least: rewriting ruleAnd/or routing rule.
B12. the calculating equipment according to B11, wherein the decentralized configuration administrative center, which is provided with, advises rewritingThen and/or the interface that is configured of routing rule.
B13. the calculating equipment according to any one of B11 or B12, wherein the executable instruction further makes instituteIt states processor and executes following operation:
The URI information in the service request is extracted, is determined according to the routing rule and is matched with the URI informationName space;
Determine that the corresponding service node of the name space is service node corresponding with the service request.
B14. calculating equipment according to b13, wherein the executable instruction further executes the processorIt operates below:
The URI information in the service request is written over according to the rewriting rule, the URI letter after being rewrittenBreath;
It is then described to determine that the name space to match with the URI information further comprises according to the routing rule:
The name space to be matched according to the determining URI information with after the rewriting of the routing rule.
B15. according to the described in any item calculating equipment of B10-B14, wherein the executable instruction further makes describedProcessor executes following operation:
The load balancing configuration strategy after change is synchronized to interior according to the Notification of Changes by shared drive componentIn depositing.
B16. the calculating equipment according to B15, wherein the executable instruction further executes the processorIt operates below:
The pass corresponding with name space the URI configured in decentralized configuration administrative center is read by shared drive componentSystem and at least one match pattern, the URI is synchronous with the corresponding relationship of name space and at least one match patternInto memory.
B17. the calculating equipment according to B16, wherein the executable instruction further executes the processorIt operates below:
According to the corresponding relationship and at least one match pattern of the URI and name space, set for the match patternSet corresponding priority.
B18. according to the described in any item calculating equipment of B10-B17, wherein the decentralized configuration administrative center is baseIn the Distributed Application management coordination center of zookeeper.
The invention also discloses a kind of C19. computer storage medium, it is stored at least in the computer storage mediumOne executable instruction, the executable instruction make processor execute following operation:
The Notification of Changes of the load balancing configuration strategy of decentralized configuration administrative center storage is monitored in real time;
According to the Notification of Changes, the load balancing configuration strategy after change is synchronized in memory;
Service request is received, it is corresponding with the service request according to the load balancing configuration strategy determination in memoryService node;
The service request is redirected to the service node to handle.
C20. the computer storage medium according to C19, wherein the load balancing configuration strategy includes at least: weightWrite rule and/or routing rule.
C21. the computer storage medium according to C20, wherein the decentralized configuration administrative center is provided with pairThe interface that rewriting rule and/or routing rule are configured.
C22. the computer storage medium according to any one of C20 or C21, wherein the executable instruction is into oneStep makes the processor execute following operation:
The URI information in the service request is extracted, is determined according to the routing rule and is matched with the URI informationName space;
Determine that the corresponding service node of the name space is service node corresponding with the service request.
C23. the computer storage medium according to C22, wherein the executable instruction further makes the processingDevice executes following operation:
The URI information in the service request is written over according to the rewriting rule, the URI letter after being rewrittenBreath;
It is then described to determine that the name space to match with the URI information further comprises according to the routing rule:
The name space to be matched according to the determining URI information with after the rewriting of the routing rule.
C24. according to the described in any item computer storage mediums of C19-C23, wherein the executable instruction is furtherThe processor is set to execute following operation:
The load balancing configuration strategy after change is synchronized to interior according to the Notification of Changes by shared drive componentIn depositing.
C25. the computer storage medium according to C24, wherein the executable instruction further makes the processingDevice executes following operation:
The pass corresponding with name space the URI configured in decentralized configuration administrative center is read by shared drive componentSystem and at least one match pattern, the URI is synchronous with the corresponding relationship of name space and at least one match patternInto memory.
C26. the computer storage medium according to C25, wherein the executable instruction further makes the processingDevice executes following operation:
According to the corresponding relationship and at least one match pattern of the URI and name space, set for the match patternSet corresponding priority.
C27. according to the described in any item computer storage mediums of C19-C26, wherein in the decentralized configuration managementThe heart is the Distributed Application management coordination center based on zookeeper.

Claims (21)

CN201711240171.1A2017-11-302017-11-30Distributed dynamic load-balancing method calculates equipment and computer storage mediumActiveCN107911470B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201711240171.1ACN107911470B (en)2017-11-302017-11-30Distributed dynamic load-balancing method calculates equipment and computer storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201711240171.1ACN107911470B (en)2017-11-302017-11-30Distributed dynamic load-balancing method calculates equipment and computer storage medium

Publications (2)

Publication NumberPublication Date
CN107911470A CN107911470A (en)2018-04-13
CN107911470Btrue CN107911470B (en)2018-12-14

Family

ID=61848266

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201711240171.1AActiveCN107911470B (en)2017-11-302017-11-30Distributed dynamic load-balancing method calculates equipment and computer storage medium

Country Status (1)

CountryLink
CN (1)CN107911470B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108809848A (en)*2018-05-282018-11-13北京奇艺世纪科技有限公司Load-balancing method, device, electronic equipment and storage medium
CN108965381B (en)*2018-05-312023-03-21康键信息技术(深圳)有限公司Nginx-based load balancing implementation method and device, computer equipment and medium
CN109376013B (en)*2018-10-112020-12-15北京小米智能科技有限公司 Load balancing method and device
CN110047236B (en)*2019-04-232021-01-15万申科技股份有限公司High-risk-level area security management method and system
CN110519388B (en)*2019-08-302022-04-19望海康信(北京)科技股份公司Processing method and device for block chain request, electronic equipment and readable storage medium
CN112527491A (en)*2019-09-172021-03-19烽火通信科技股份有限公司Micro-service call load balancing method and system
CN110688146A (en)*2019-09-232020-01-14凡普数字技术有限公司Method, device and storage medium for dynamically configuring monitoring system
CN110764908B (en)*2019-10-122024-12-10腾讯云计算(北京)有限责任公司 A load adjustment method, device, server and storage medium
CN111064626B (en)*2020-01-022023-05-26广州虎牙科技有限公司Configuration updating method, device, server and readable storage medium
CN111600930B (en)*2020-04-092022-12-09网宿科技股份有限公司Micro-service request traffic management method, device, server and storage medium
CN111711569A (en)*2020-06-162020-09-25普元信息技术股份有限公司System and method for realizing request dynamic routing in enterprise distributed application
CN112039710B (en)*2020-09-022023-08-01曙光信息产业(北京)有限公司Service fault processing method, terminal equipment and readable storage medium
CN112929408A (en)*2021-01-192021-06-08郑州阿帕斯数云信息科技有限公司Dynamic load balancing method and device
CN112905341B (en)*2021-02-082024-02-23中国工商银行股份有限公司Method and device for continuously inheriting distributed load balancing service information
CN113271260B (en)*2021-05-122024-12-03康键信息技术(深圳)有限公司 Load balancing processing method, device, equipment and storage medium
CN115065686B (en)*2022-07-292024-02-27中国工商银行股份有限公司Configuration method, device and system of distributed load balancing system
CN116775765A (en)*2023-06-252023-09-19招商银行股份有限公司 Data processing methods, devices, equipment and storage media
CN118394592B (en)*2024-04-162025-02-11广州视声智能股份有限公司 A Paas platform based on cloud computing
CN119788676A (en)*2024-12-032025-04-08天翼云科技有限公司Gateway service dynamic load balancing method, device, equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101394426A (en)*2008-11-102009-03-25中国网络通信集团公司 Internet business processing method and system based on network television
CN101534255A (en)*2009-04-022009-09-16福建星网锐捷网络有限公司A method and device for realizing oriented processing of certain request
CN103491115A (en)*2012-06-122014-01-01华为软件技术有限公司Resource dispatching method, resource dispatching device and resource dispatching system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US7761514B2 (en)*2003-11-262010-07-20International Business Machines CorporationMethod and apparatus for providing dynamic group management for distributed interactive applications
CN101272389A (en)*2008-05-272008-09-24华为技术有限公司 A CS communication method, system and device
CN103607305B (en)*2013-11-262017-03-15北京华胜天成科技股份有限公司A kind of distributed network strategy implementation method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101394426A (en)*2008-11-102009-03-25中国网络通信集团公司 Internet business processing method and system based on network television
CN101534255A (en)*2009-04-022009-09-16福建星网锐捷网络有限公司A method and device for realizing oriented processing of certain request
CN103491115A (en)*2012-06-122014-01-01华为软件技术有限公司Resource dispatching method, resource dispatching device and resource dispatching system

Also Published As

Publication numberPublication date
CN107911470A (en)2018-04-13

Similar Documents

PublicationPublication DateTitle
CN107911470B (en)Distributed dynamic load-balancing method calculates equipment and computer storage medium
US10999201B2 (en)Dynamic advertisement routing
EP2849064B1 (en)Method and apparatus for network virtualization
CN107003983B (en) Configure the network
US8904003B2 (en)Method and system for delegated job control across a network
CN104601736B (en)A kind of implementation method and device of short URL services
CN109542641A (en)Service calling method, apparatus and system
US20210410057A1 (en)Service Discovery Extension in a 5G Mobile Communication Network
US9847903B2 (en)Method and apparatus for configuring a communication system
CN111857974A (en)Service access method and device based on load balancer
US8935377B2 (en)Dynamic registration of listener resources for cloud services
EP3319270B1 (en)Service registration method, usage method and relevant apparatus
WO2012158718A1 (en)Extensible centralized dynamic resource distribution in a clustered data grid
CN107105013B (en)File processing method, server, terminal and system
CN108322502A (en)Method, gateway system and storage medium for equalization server load
US9760370B2 (en)Load balancing using predictable state partitioning
CN108958949A (en)The call method and system of application program
CN114448895B (en) An application access method, apparatus, device and medium
CN112953982B (en)Service processing method, service configuration method and related device
CN109792393A (en)Virtualize the software upgrading in off-line accounting system
US20230300055A1 (en)Cloud agnostic service discovery
CN116800761A (en)Local service debugging method and system based on micro-service architecture and containerization
US7877477B2 (en)Method and system for discovering managed systems in a network
EP3537660A1 (en)Access point deployment in a network comprising a centralized system and a distributed system
CN115037617B (en)Optimization method and device for dubbo service treatment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20220624

Address after:518054-13098, 13th floor, main tower of marine center, No. 59, Linhai Avenue, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong

Patentee after:Shenzhen ZhangYue Animation Technology Co.,Ltd.

Address before:100124 2029e, Sihui building, Chaoyang District, Beijing

Patentee before:ZHANGYUE TECHNOLOGY Co.,Ltd.


[8]ページ先頭

©2009-2025 Movatter.jp