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 pattern | Priority |
| Accurate match pattern | 1 |
| Prefix matching mode with modification | 2 |
| Case sensitive canonical match pattern | 3 |
| The canonical match pattern of case-insensitive | 4 |
| Without the prefix matching mode of modification | 5 |
| General match pattern | 6 |
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.