CN110554920A - Method and device for processing capacity unhealthy module - Google Patents

Method and device for processing capacity unhealthy module Download PDF

Info

Publication number
CN110554920A
CN110554920A CN201910804986.0A CN201910804986A CN110554920A CN 110554920 A CN110554920 A CN 110554920A CN 201910804986 A CN201910804986 A CN 201910804986A CN 110554920 A CN110554920 A CN 110554920A
Authority
CN
China
Prior art keywords
capacity
module
unhealthy
server
called
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.)
Pending
Application number
CN201910804986.0A
Other languages
Chinese (zh)
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.)
Shanghai Yidianshikong Network Co Ltd
Original Assignee
Shanghai Yidianshikong Network 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 Shanghai Yidianshikong Network Co Ltd filed Critical Shanghai Yidianshikong Network Co Ltd
Priority to CN201910804986.0A priority Critical patent/CN110554920A/en
Publication of CN110554920A publication Critical patent/CN110554920A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Abstract

The application discloses a method and a device for processing a capacity unhealthy module. Recording the called amount and the called weight of the server under the capacity unhealthy module; determining module capacity of a capacity unhealthy module; calculating the capacity supporting capacity of a single server; determining a preset safety threshold of the module capacity; under the condition that the called amount is kept unchanged, carrying out weight promotion on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value; and comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module still belongs to unhealthy, and if so, continuing processing. The method and the device solve the technical problem that a scheme for processing the capacity optimization of the service module with unhealthy processing capacity is lacked. According to the method and the system, the capacity among the servers is concentrated in an acceptable capacity interval as far as possible, so that the capacity of the unhealthy service module becomes a capacity healthy service module.

Description

Method and device for processing capacity unhealthy module
Technical Field
The present application relates to the field of service cluster processing, and in particular, to a method and an apparatus for processing a capacity unhealthy module.
background
The service requests initiate load balancing access, the number of the requests can basically and uniformly fall on the servers under the called modules, and the capacity difference can be caused due to the performance difference among the servers.
the inventor finds that the lack of a scheme for adjusting the capacity of a service module with unhealthy processing capacity is not beneficial to making the capacity of the service module in a healthy state.
Aiming at the problem that a scheme for processing a service module with unhealthy capacity to adjust and optimize the capacity is lacked in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for processing a module with unhealthy capacity, so as to solve the problem of a scheme for adjusting and optimizing the capacity of a service module lacking unhealthy processing capacity.
to achieve the above object, according to one aspect of the present application, there is provided a method of processing a capacity unhealthy module.
a method of processing a capacity unhealthy module according to the present application includes: recording the called amount and the called weight of the server under the capacity unhealthy module; determining module capacity of a capacity unhealthy module; calculating the capacity supporting capacity of a single server; determining a preset safety threshold of the module capacity; under the condition that the called amount is kept unchanged, carrying out weight promotion on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value; and comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module still belongs to unhealthy, and if so, continuing processing.
Further, when judging whether the capacity of the capacity unhealthy module is still unhealthy, the following method is adopted:
When a server calling request under the same service module is received in a service cluster, judging whether module capacities among the servers have differences or not;
if there is a difference in module capacity, the called weights of the servers are adjusted to balance the capacity among the servers.
Further, under the condition that the called amount is kept unchanged, weight promotion is carried out on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value, and the following method is adopted:
When the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount;
The capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
Further, the following method is adopted for calculating the capacity supporting capacity of a single server:
Support capability (called amount) called weight/module capacity
the module capacity is selected from CPU utilization rate.
Further, after determining the preset safety threshold of the module capacity, the method further includes:
Searching a server with the highest capacity under the service module according to the preset safety threshold, and determining whether the highest capacity is in a safety threshold range;
And under the condition that the called amount is kept unchanged, taking the highest capacity as a reference value.
to achieve the above object, according to another aspect of the present application, there is provided an apparatus for processing a capacity unhealthy module for a server in a cluster.
An apparatus for processing a capacity unhealthy module according to the present application includes: the recording module is used for recording the called amount and the called weight of the server under the unhealthy capacity module; the first determining module is used for determining the module capacity of the capacity unhealthy module; the calculation module is used for calculating the capacity supporting capacity of the single server; the second determination module is used for determining a preset safety threshold of the module capacity; the weight lifting module is used for carrying out weight lifting on the modules with the capacity not reaching the preset safety threshold value according to the preset safety threshold value under the condition that the called amount is kept unchanged; and the comparison module is used for comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module belongs to unhealthy, and if so, continuing processing.
further, the comparison module is used for
When a server calling request under the same service module is received in a service cluster, judging whether module capacities among the servers have differences or not;
If there is a difference in module capacity, the called weights of the servers are adjusted to balance the capacity among the servers.
further, the weight boosting module is configured to:
When the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount;
The capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
further, the calculation module is configured to:
Support capability (called amount) called weight/module capacity
The module capacity is selected from CPU utilization rate.
further, the apparatus further comprises: threshold module for
Searching a server with the highest capacity under the service module according to the preset safety threshold, and determining whether the highest capacity is in a safety threshold range;
And under the condition that the called amount is kept unchanged, taking the highest capacity as a reference value.
According to the method and the device for processing the capacity unhealthy module in the embodiment of the application, the called amount and the called weight of the server under the capacity unhealthy module are recorded; determining module capacity of a capacity unhealthy module; calculating the capacity supporting capacity of a single server; determining a preset safety threshold of the module capacity; under the condition that the called amount is kept unchanged, carrying out weight promotion on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value; comparing the adjusted theoretical value with the actual value, judging whether the capacity of the capacity unhealthy module still belongs to unhealthy, if so, continuing the processing mode, and adjusting the weight of the module to achieve the aim of concentrating the capacity between the servers in an acceptable capacity interval as far as possible, thereby realizing the technical effect of enabling the capacity of the unhealthy service module to become the capacity healthy service module, and further solving the technical problem of lacking a scheme for processing the capacity unhealthy service module to perform capacity optimization.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow diagram of a method of handling a capacity unhealthy module according to a first embodiment of the present application;
FIG. 2 is a flow diagram of a method of handling a capacity unhealthy module according to a second embodiment of the present application;
FIG. 3 is a schematic flow chart diagram of a method of handling a capacity unhealthy module according to a third embodiment of the present application;
FIG. 4 is a block diagram of an apparatus for handling capacity unhealthy modules according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
it should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
in this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In the application, when each server faces the same number of called requests under the same module and the capacity between the servers is greatly different, the called weight of the server under the module needs to be optimized and adjusted, and the capacity between the servers is concentrated in an acceptable capacity interval as much as possible by adjusting the weight of the server, so that the capacity of the service module becomes a capacity health service module.
as shown in fig. 1, the method includes steps S102 to S112 as follows:
step S102, recording the called amount and the called weight of the server under the unhealthy capacity module;
step S104, determining the module capacity of the unhealthy capacity module;
Step S106, calculating the capacity supporting capacity of a single server;
Step S108, determining a preset safety threshold of the module capacity;
Step S110, under the condition that the called amount is kept unchanged, carrying out weight lifting on the modules with the capacity not reaching the preset safety threshold value according to the preset safety threshold value;
And step S112, comparing the adjusted theoretical value with the real value, judging whether the capacity of the unhealthy capacity module still belongs to unhealthy capacity, and if so, continuing processing.
It should be noted that, since the service requests initiate load-balanced access, the number of requests will fall substantially uniformly on the servers below the called module, and differences in capacity will occur due to performance differences between the servers. Specifically, there are some modules under which the capacity difference between servers is not large, and within an acceptable range, the capacity health module is defined. In addition, the capacity difference between servers under other modules is large, and the capacity is defined as an unhealthy module.
According to the method for processing the capacity unhealthy module, the called amount and the called weight of the server under the capacity unhealthy module are recorded, and the service use peak period can be selected for recording. And determining the module capacity of the unhealthy module, preferably, selecting the CPU utilization rate as the module capacity.
And calculating the basis of the new weight share value by calculating the capacity supporting capacity function of the single server.
And determining a preset safety threshold of the module capacity, performing weight promotion on the module with the capacity not reaching the preset safety threshold according to the preset safety threshold under the condition that the called quantity is kept unchanged by taking the safety threshold as a reference, then comparing the adjusted theoretical value with the real value, and judging whether the capacity of the unhealthy module with the capacity is still unhealthy, if so, continuing the processing.
Specifically, the following is taken as an example that the module a, the capacity core index CPU usage, and the module b are 7 servers, for example, the amount N of calls/calls to each server is 2000 times/second during the peak period, and the weight q of calls to each server is 100.
The method comprises the following steps: the capacity unhealthy module records the following data during service use peak periods:
Server 1 Server 2 Server 3 Server 4 Server 5 Server 6 Server 7
Called amount 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second
Called weight 100 100 100 100 100 100 100
CPU utilization (%) 70 60 55 81 72 48 51
Step two: calculating the capacity supporting capacity of a single server, wherein the capacity supporting capacity of the single server is (called quantity is called weight)/CPU, the capacity supporting capacity of the single server is rounded, and data are calculated:
(called amount of weight of called) ═ 2000 × 100 ═ 200000
server 1 Server 2 server 3 Server 4 server 5 Server 6 Server 7
Calculation process =20000/70 =20000/60 =20000/55 =20000/81 =20000/72 =20000/48 =20000/51
Single stand support capability 2857 3333 3636 2469 2777 4166 3921
Step three: the established maximum safe value of the capacity is as follows: for example, the CPU utilization in the table is 85%, the server with the highest capacity under the module is found, and it is determined whether the highest capacity is within the safety value specification, such as the server 4 with the highest capacity in the table is 81 and within the highest range value.
step four: under the condition that the called quantity is not changed, the highest capacity 81 is used as a reference value, weight promotion is carried out on the modules with the capacity not reaching 81, and the capacity of the modules reaches 81, wherein the calculation method comprises the following steps:
New weight value (single support capacity) per called amount;
Then, new weight calculation is carried out according to the capacity of other servers, the result is rounded, and the data is as follows:
Step five: the current network adjusts the weight, and then observes and records the data of the capacity of each server under the peak period module.
The net adjustment weights may be specified in the following table. The theory should be consistent because there may be a certain difference between the theoretical calculation value and the adjusted server real capacity value. For example, the value of x1.. x7 in the following table should be 81, but there may be some deviation in practice, and some servers may not have the same performance due to hardware.
so as the request increases, the magnitude of the load rise will be higher than expected, using x1... x7 as an indicator. For example, the value in x1... x7 is not 81, and the absolute value of the subtraction of 81 is greater than 5, and when the real value x1 of the capacity of the server 1 after tuning is 86, then the capacity of the server 1 needs to be tuned once again. Calculating theoretical value of capacity in peak period after adjustment:
server 1 Server 2 server 3 server 4 Server 5 Server 6 server 7
Adjusted weights 116 135 147 100 112 169 159
New capacity value after weight adjustment 81 81 81 81 81 81 81
Adjusted peak capacity true value:
Server 1 Server 2 Server 3 server 4 Server 5 Server 6 server 7
adjusted weights 116 135 147 100 112 169 159
new capacity value after weight adjustment x1 x2 x3 x4 x5 x6 x7
from the above description, it can be seen that the following technical effects are achieved by the present application:
in the embodiment of the application, the method comprises the steps of recording the called amount and the called weight of a server under a capacity unhealthy module; determining module capacity of a capacity unhealthy module; calculating the capacity supporting capacity of a single server; determining a preset safety threshold of the module capacity; under the condition that the called amount is kept unchanged, carrying out weight promotion on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value; comparing the adjusted theoretical value with the actual value, judging whether the capacity of the unhealthy capacity module still belongs to unhealthy, if so, continuing to process the capacity, and adjusting the weight of the module to achieve the aim of concentrating the capacity between the servers in an acceptable capacity interval as much as possible, thereby realizing the technical effect of enabling the capacity of the unhealthy service module to become the healthy capacity service module, and further solving the technical problem of lacking a scheme for processing the unhealthy capacity service module to perform capacity optimization
according to the embodiment of the present application, as shown in fig. 2, when determining whether the capacity of the capacity unhealthy module is still unhealthy, the following method is adopted:
Step S202, when a server calling request under the same service module is received in a service cluster, judging whether module capacity between servers has difference;
When a server call request for the same service module is received in the service cluster, it is necessary to determine whether module capacities between servers are different. For example, it is determined whether there is a large difference in module capacity between servers, or whether the difference in module capacity between servers exceeds a threshold.
Specifically, the module capacity refers to selecting one index from multiple index dimensions of the module according to the function of the module as a unique core standard for measuring the module capacity.
It should be noted that, as the indices: CPU usage, memory usage, I/O usage, service return code on module program, etc. of the servers in the module.
For example, in the access type service, the utilization rate of the CPU is generally selected as the only core index of the support performance of the module, and the utilization rate of the CPU is 90%, which indicates that the module has reached the maximum support bottleneck of the performance.
For another example, the data storage module generally selects the disk I/O read/write performance as the only core index.
And step S204, if the module capacities are different, adjusting the called weight of the server to balance the capacities among the servers.
and if the difference of the module capacity is known according to the judgment result, adjusting the called weight of the server to balance the capacity among the servers so as to enable the module capacity to be a healthy capacity module.
it should be noted that, since the service requests initiate load-balanced access, the number of requests will fall substantially uniformly on the servers below the called module, and differences in capacity will occur due to performance differences between the servers. Specifically, there are some modules under which the capacity difference between servers is not large, and within an acceptable range, the capacity health module is defined. In addition, the capacity difference between servers under other modules is large, and the capacity is defined as an unhealthy module.
It should also be noted that, various methods for determining whether the module capacity belongs to the healthy capacity may be adopted, and the method is not specifically limited in the embodiment of the present application, and a person skilled in the art may select the module capacity according to the actual use situation.
The service cluster is a set that a plurality of service modules are combined to realize a complete service function or a certain core function.
The service module refers to a collection in which a certain service function point is deployed on a single server or a group of servers.
According to the embodiment of the present application, as a preferable option in the embodiment, under the condition that the called amount is kept unchanged, the weight of the module whose capacity does not reach the preset safety threshold is increased according to the preset safety threshold, and the following method is adopted:
when the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount;
The capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
the method comprises the steps of determining the called quantity and the called weight when a server calling request under the same service module is received, and then adjusting the called weight of the server to obtain a new weight (the single support capability capacity) per the called quantity when the module capacity of the server is different.
The capacity benchmark is a safety threshold with the highest capacity, and the single-station supporting capacity refers to the server capacity supporting capacity.
According to the tuning method, the called weight of the server under the called module is adjusted, so that the utilization rate of the servers with different performances under the module can be maximized, the capacity among the servers can be balanced, chain running caused by the short capacity of a certain server is avoided, the service is more stable in operation, and the cost of the server is optimal.
According to the embodiment of the application, as a preferable method in the embodiment, the following method is adopted for calculating the capacity supporting capacity of a single server:
Support capability (called amount) called weight/module capacity
the module capacity is selected from CPU utilization rate.
Preferably, if the one-time tuning result cannot meet the requirement, namely the capacity standard value cannot be reached, multiple times of tuning are needed.
and calculating the capacity supporting capacity of the single server, wherein the capacity supporting capacity of the single server is (called quantity is called weight)/CPU, and the capacity supporting capacity of the single server is rounded to obtain data.
According to the embodiment of the present application, as shown in fig. 3, after determining the preset safety threshold of the module capacity, the method further includes:
step S302, searching a server with the highest capacity under the service module according to the preset safety threshold, and determining whether the highest capacity is in the range of the safety threshold;
And step S304, taking the highest capacity as a reference value when the called amount is kept unchanged.
And searching the server with the highest capacity under the service module according to the preset safety threshold, confirming whether the highest capacity is in the range of the safety threshold, and taking the highest capacity as a reference value under the condition that the called amount is not changed.
Specifically, the established capacity maximum safety value is: for example, if the CPU utilization in the table is 85%, the server with the highest capacity under the module is searched, and it is determined whether the highest capacity is within the safety value paradigm, and if the called volume is not changed, the highest capacity 81 is used as the reference value, and the weight of the module with the capacity not reaching 81 is increased to make the capacity reach 81.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided an apparatus for implementing the method for processing a capacity unhealthy module, where the apparatus is used for a server in a cluster, and as shown in fig. 4, the apparatus includes: the recording module 10 is used for recording the called amount and the called weight of the server under the capacity unhealthy module; a first determining module 20 for determining a module capacity of the capacity unhealthy module; the calculation module 30 is used for calculating the capacity supporting capacity of a single server; a second determination module 40, configured to determine a preset safety threshold of the module capacity; the weight lifting module 50 is used for carrying out weight lifting on modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value under the condition that the called amount is kept unchanged; and the comparison module 60 is used for comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module is unhealthy or not, and if so, continuing the processing.
It should be noted that, since the service requests initiate load-balanced access, the number of requests will fall substantially uniformly on the servers below the called module, and differences in capacity will occur due to performance differences between the servers. Specifically, there are some modules under which the capacity difference between servers is not large, and within an acceptable range, the capacity health module is defined. In addition, the capacity difference between servers under other modules is large, and the capacity is defined as an unhealthy module.
According to the method for processing the capacity unhealthy module, the called amount and the called weight of the server under the capacity unhealthy module are recorded, and the service use peak period can be selected for recording. And determining the module capacity of the unhealthy module, preferably, selecting the CPU utilization rate as the module capacity.
And calculating the basis of the new weight share value by calculating the capacity supporting capacity function of the single server.
And determining a preset safety threshold of the module capacity, performing weight promotion on the module with the capacity not reaching the preset safety threshold according to the preset safety threshold under the condition that the called quantity is kept unchanged by taking the safety threshold as a reference, then comparing the adjusted theoretical value with the real value, and judging whether the capacity of the unhealthy module with the capacity is still unhealthy, if so, continuing the processing.
specifically, the following is taken as an example that the module a, the capacity core index CPU usage, and the module b are 7 servers, for example, the amount N of calls/calls to each server is 2000 times/second during the peak period, and the weight q of calls to each server is 100.
the method comprises the following steps: the capacity unhealthy module records the following data during service use peak periods:
Server 1 Server 2 Server 3 Server 4 Server 5 Server 6 Server 7
called amount 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second 2000 times/second
Called weight 100 100 100 100 100 100 100
CPU utilization (%) 70 60 55 81 72 48 51
Step two: calculating the capacity supporting capacity of a single server, wherein the capacity supporting capacity of the single server is (called quantity is called weight)/CPU, the capacity supporting capacity of the single server is rounded, and data are calculated:
(called amount of weight of called) ═ 2000 × 100 ═ 200000
server 1 Server 2 server 3 Server 4 Server 5 Server 6 server 7
Calculation process =20000/70 =20000/60 =20000/55 =20000/81 =20000/72 =20000/48 =20000/51
Single stand support capability 2857 3333 3636 2469 2777 4166 3921
Step three: the established maximum safe value of the capacity is as follows: for example, the CPU utilization in the table is 85%, the server with the highest capacity under the module is found, and it is determined whether the highest capacity is within the safety value specification, such as the server 4 with the highest capacity in the table is 81 and within the highest range value.
Step four: under the condition that the called quantity is not changed, the highest capacity 81 is used as a reference value, weight promotion is carried out on the modules with the capacity not reaching 81, and the capacity of the modules reaches 81, wherein the calculation method comprises the following steps:
new weight value (single support capacity) per called amount;
And then rounding the new weight calculation result according to the capacity of other servers, wherein the data is as follows:
step five: the current network adjusts the weight, and then observes and records the data of the capacity of each server under the peak period module.
the net adjustment weights may be specified in the following table. The theory should be consistent because there may be a certain difference between the theoretical calculation value and the adjusted server real capacity value. For example, the value of x1.. x7 in the following table should be 81, but there may be some deviation in practice, and some servers may not have the same performance due to hardware.
So as the request increases, the magnitude of the load rise will be higher than expected, using x1... x7 as an indicator. For example, the value in x1... x7 is not 81, and the absolute value of the subtraction of 81 is greater than 5, and when the real value x1 of the capacity of the server 1 after tuning is 86, then the capacity of the server 1 needs to be tuned once again. Calculating theoretical value of capacity in peak period after adjustment:
Server 1 Server 2 Server 3 Server 4 Server 5 Server 6 Server 7
Adjusted weights 116 135 147 100 112 169 159
New capacity value after weight adjustment 81 81 81 81 81 81 81
Adjusted peak capacity true value:
Server 1 Server 2 Server 3 server 4 Server 5 Server 6 Server 7
Adjusted weights 116 135 147 100 112 169 159
new capacity value after weight adjustment x1 x2 x3 x4 x5 x6 x7
According to the embodiment of the present application, as a preferred choice in the embodiment, the comparison module 60 is configured to determine whether module capacities between servers have a difference when a server call request for a same service module is received in a service cluster; if there is a difference in module capacity, the called weights of the servers are adjusted to balance the capacity among the servers.
In the comparison module 60 according to the embodiment of the present application, when a server call request for the same service module is received in a service cluster, it is necessary to determine whether module capacities between servers are different. For example, it is determined whether there is a large difference in module capacity between servers, or whether the difference in module capacity between servers exceeds a threshold.
Specifically, the module capacity refers to selecting one index from multiple index dimensions of the module according to the function of the module as a unique core standard for measuring the module capacity.
It should be noted that, as the indices: CPU usage, memory usage, I/O usage, service return code on module program, etc. of the servers in the module.
For example, in the access type service, the utilization rate of the CPU is generally selected as the only core index of the support performance of the module, and the utilization rate of the CPU is 90%, which indicates that the module has reached the maximum support bottleneck of the performance.
For another example, the data storage module generally selects the disk I/O read/write performance as the only core index.
In the comparison module 60 according to the embodiment of the present application, if the difference in module capacity is found according to the determination result, the called weight of the server is adjusted to balance the capacity between the servers so that the module capacity is a healthy capacity module.
It should be noted that, since the service requests initiate load-balanced access, the number of requests will fall substantially uniformly on the servers below the called module, and differences in capacity will occur due to performance differences between the servers. Specifically, there are some modules under which the capacity difference between servers is not large, and within an acceptable range, the capacity health module is defined. In addition, the capacity difference between servers under other modules is large, and the capacity is defined as an unhealthy module.
it should also be noted that, various methods for determining whether the module capacity belongs to the healthy capacity may be adopted, and the method is not specifically limited in the embodiment of the present application, and a person skilled in the art may select the module capacity according to the actual use situation.
The service cluster is a set that a plurality of service modules are combined to realize a complete service function or a certain core function.
The service module refers to a collection in which a certain service function point is deployed on a single server or a group of servers.
According to the embodiment of the present application, as a preferred embodiment in the present application, the weight boosting module 50 is configured to perform the following operations: when the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount; the capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
The method comprises the steps of determining the called quantity and the called weight when a server calling request under the same service module is received, and then adjusting the called weight of the server to obtain a new weight (the single support capability capacity) per the called quantity when the module capacity of the server is different.
the capacity benchmark is a safety threshold with the highest capacity, and the single-station supporting capacity refers to the server capacity supporting capacity.
According to the tuning method, the called weight of the server under the called module is adjusted, so that the utilization rate of the servers with different performances under the module can be maximized, the capacity among the servers can be balanced, chain running caused by the short capacity of a certain server is avoided, the service is more stable in operation, and the cost of the server is optimal.
According to the embodiment of the present application, as a preferred feature in the embodiment, the calculating module 30 is configured to perform the following operations: the single support capability (called quantity and called weight)/module capacity, and the module capacity is selected from the CPU utilization rate.
Preferably, if the one-time tuning result cannot meet the requirement, namely the capacity standard value cannot be reached, multiple times of tuning are needed.
And calculating the capacity supporting capacity of the single server, wherein the capacity supporting capacity of the single server is (called quantity is called weight)/CPU, and the capacity supporting capacity of the single server is rounded to obtain data.
According to the embodiment of the present application, as a preference in the embodiment, the apparatus further includes: a threshold module (not shown) for searching a server with the highest capacity under the service module according to the preset security threshold, and determining whether the highest capacity is within a security threshold range; and under the condition that the called amount is kept unchanged, taking the highest capacity as a reference value.
In the threshold module of the embodiment of the application, the server with the highest capacity under the service module is searched according to the preset safety threshold, whether the highest capacity is in the range of the safety threshold is determined, and meanwhile, the highest capacity is used as a reference value under the condition that the called amount is kept unchanged.
Specifically, the established capacity maximum safety value is: for example, if the CPU utilization in the table is 85%, the server with the highest capacity under the module is searched, and it is determined whether the highest capacity is within the safety value paradigm, and if the called volume is not changed, the highest capacity 81 is used as the reference value, and the weight of the module with the capacity not reaching 81 is increased to make the capacity reach 81.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for processing a capacity unhealthy module for use with a server in a cluster, the method comprising:
Recording the called amount and the called weight of the server under the capacity unhealthy module;
Determining module capacity of a capacity unhealthy module;
Calculating the capacity supporting capacity of a single server;
Determining a preset safety threshold of the module capacity;
Under the condition that the called amount is kept unchanged, carrying out weight promotion on the modules of which the capacity does not reach the preset safety threshold value according to the preset safety threshold value;
And comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module still belongs to unhealthy, and if so, continuing processing.
2. The method of claim 1, wherein determining whether the capacity of the capacity unhealthy module is still unhealthy comprises:
When a server calling request under the same service module is received in a service cluster, judging whether module capacities among the servers have differences or not;
If there is a difference in module capacity, the called weights of the servers are adjusted to balance the capacity among the servers.
3. The method for processing the capacity unhealthy module according to claim 1, wherein, in a case that the called amount remains unchanged, the weight of the module whose capacity does not reach the preset safety threshold is increased according to the preset safety threshold by:
When the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount;
The capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
4. The method of handling capacity unhealthy modules according to claim 1, wherein calculating a capacity support capacity for a single server comprises:
Support capability (called amount) called weight/module capacity
the module capacity is selected from CPU utilization rate.
5. the method of handling capacity unhealthy modules according to claim 1, further comprising, after determining a preset safety threshold for said module capacity:
Searching a server with the highest capacity under the service module according to the preset safety threshold, and determining whether the highest capacity is in a safety threshold range;
And under the condition that the called amount is kept unchanged, taking the highest capacity as a reference value.
6. An apparatus for processing a capacity unhealthy module, for use with a server in a cluster, the apparatus comprising:
The recording module is used for recording the called amount and the called weight of the server under the unhealthy capacity module;
The first determining module is used for determining the module capacity of the capacity unhealthy module;
The calculation module is used for calculating the capacity supporting capacity of the single server;
the second determination module is used for determining a preset safety threshold of the module capacity;
The weight lifting module is used for carrying out weight lifting on the modules with the capacity not reaching the preset safety threshold value according to the preset safety threshold value under the condition that the called amount is kept unchanged;
And the comparison module is used for comparing the adjusted theoretical value with the real value, judging whether the capacity of the capacity unhealthy module belongs to unhealthy, and if so, continuing processing.
7. The apparatus of claim 6, wherein the comparison module is configured to process the capacity unhealthy module
when a server calling request under the same service module is received in a service cluster, judging whether module capacities among the servers have differences or not;
If there is a difference in module capacity, the called weights of the servers are adjusted to balance the capacity among the servers.
8. The apparatus of the processing capacity unhealthy module of claim 6, wherein the weight boosting module is configured to:
When the module capacity between the servers is different, adjusting the called weight of the servers to obtain a new weight (the single support capacity) and a new called amount;
the capacity benchmark is a safety threshold with the highest capacity, and the single support capacity refers to the server capacity support capacity.
9. the apparatus of the processing capacity unhealthy module of claim 6, wherein the computing module is configured to:
Support capability (called amount) called weight/module capacity
the module capacity is selected from CPU utilization rate.
10. The apparatus for processing a capacity unhealthy module according to claim 6, further comprising: threshold module for
searching a server with the highest capacity under the service module according to the preset safety threshold, and determining whether the highest capacity is in a safety threshold range;
And under the condition that the called amount is kept unchanged, taking the highest capacity as a reference value.
CN201910804986.0A 2019-08-27 2019-08-27 Method and device for processing capacity unhealthy module Pending CN110554920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910804986.0A CN110554920A (en) 2019-08-27 2019-08-27 Method and device for processing capacity unhealthy module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910804986.0A CN110554920A (en) 2019-08-27 2019-08-27 Method and device for processing capacity unhealthy module

Publications (1)

Publication Number Publication Date
CN110554920A true CN110554920A (en) 2019-12-10

Family

ID=68736772

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910804986.0A Pending CN110554920A (en) 2019-08-27 2019-08-27 Method and device for processing capacity unhealthy module

Country Status (1)

Country Link
CN (1) CN110554920A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124472A (en) * 2017-06-26 2017-09-01 杭州迪普科技股份有限公司 Load-balancing method and device, computer-readable recording medium
CN109343965A (en) * 2018-10-31 2019-02-15 北京金山云网络技术有限公司 Resource adjusting method, device, cloud platform and server
CN110083512A (en) * 2019-04-16 2019-08-02 上海易点时空网络有限公司 The method and device of cluster monitoring
CN110134513A (en) * 2019-04-17 2019-08-16 平安科技(深圳)有限公司 Load-balancing method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107124472A (en) * 2017-06-26 2017-09-01 杭州迪普科技股份有限公司 Load-balancing method and device, computer-readable recording medium
CN109343965A (en) * 2018-10-31 2019-02-15 北京金山云网络技术有限公司 Resource adjusting method, device, cloud platform and server
CN110083512A (en) * 2019-04-16 2019-08-02 上海易点时空网络有限公司 The method and device of cluster monitoring
CN110134513A (en) * 2019-04-17 2019-08-16 平安科技(深圳)有限公司 Load-balancing method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110018799B (en) Storage pool PG (packet data) master determination method, device, equipment and readable storage medium
CN107124472A (en) Load-balancing method and device, computer-readable recording medium
KR102047900B1 (en) Method and apparatus for leveling load in a distributed database
CN102111813B (en) Method and equipment for balancing loads of carriers
CN111045808B (en) Distributed network task scheduling method and device
CN107948293A (en) One kind is based on MongoDB load balance optimization system and methods
US11889354B2 (en) Method for load imbalance optimization under same network coverage, apparatus, device, and storage medium
US9807008B2 (en) Tournament scheduling
CN105871983A (en) Method and device for selecting servers
KR101611817B1 (en) Apparatus and method for supporting idle mode load balancing
WO2014194704A1 (en) A grouping processing method and system
CN107220108A (en) A kind of method and system for realizing cloud data center load balancing
WO2017151510A1 (en) A method and device for scheduling resources
CN104158902B (en) A kind of Hbase data blocks distribution method and device based on number of request
CN110543366A (en) Service module capacity tuning method and device for service cluster and server
US20160117107A1 (en) High Performance Hadoop with New Generation Instances
CN110554920A (en) Method and device for processing capacity unhealthy module
CN110018797B (en) Data migration method, device and equipment and readable storage medium
CN104899072B (en) Fine granularity resource scheduling system based on virtual platform and method
CN111967682B (en) Equipment on-shelf scheme optimizing method and device and terminal equipment
CN101730147B (en) Carrier frequency allocating method and device
CN116955271A (en) Method and device for storing data copy, electronic equipment and storage medium
CN111190728B (en) Resource adjustment method and device
US20140359104A1 (en) Grouping processing method and system
CN107480229B (en) Distributed computer database system for object retrieval and retrieval method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20191210

RJ01 Rejection of invention patent application after publication