Specific embodiment
In order to better understand the above technical scheme, below by attached drawing and specific embodiment to this specification embodiment
Technical solution be described in detail, it should be understood that the specific features in this specification embodiment and embodiment are to this explanation
The detailed description of book embodiment technical solution rather than the restriction to this specification technical solution, in the absence of conflict,
Technical characteristic in this specification embodiment and embodiment can be combined with each other.
Fig. 1 is referred to, is the network service management method application scenarios schematic diagram of this specification embodiment.Terminal, which is located at, to be used
Family side 100 communicates with network side 200.Network service client terminal 101 in terminal can realize network service based on internet
The APP of (business) or website provide inquiry (such as search engine etc.), transaction (such as online shopping, finance etc.) etc. to the user
The interface of service, and the service data that user is proposed is supplied to network side to handle;Network side includes network service
Offer system 201 and network service management system 202.Wherein:Network service providing system 201 is used for and network service client terminal
101 communications receive the service datas such as inquiry or the transaction of network service client terminal 101, and back services after treatment
Response data is to network service client terminal 101;Network service management system 202 is used for according to network service providing system 201
Loading condition carries out maintenance and management to the operation of network service providing system 201.
In a first aspect, this specification embodiment provides a kind of network service management method, for provide network service
Network service providing system determines processing strategy and adjustresources.It please refers to Fig.2, including S201-S203.
S201:Obtain the current achievement data of network service providing system.
The index of this specification embodiment can include system performance index and business effectiveness indicator.Wherein system performance refers to
Mark is for example including processor utilization rate (cpu), memory usage (Mem), disk transfer rate (Disk), network utilization
(Network) etc..Business effectiveness indicator is such as including query rate per second (qps), number of concurrent, the response time (rt).Systematicness
Energy achievement data can be calculated by inquiry system file acquisition to relevant information;Business effectiveness indicator data can be with
By monitoring business processing situation in real time and being calculated.
For example, processor utilization rate can extract four data from system directory/proc/stat:User mode (user),
User mode (nice), kernel mode (system) and the processor time (idle) of free time of low priority;Then it uses
Equation below carrys out computation processor utilization rate:
CPU usage=100* (user+nice+system)/(user+nice+system+idle).
For another example, memory usage can extract two data from system directory/proc/meminfo files:Current memory
Usage amount (cmem) and memory amount (amem).Then memory usage is calculated using equation below:
Memory usage=100* (cmem/umem).
The acquisition modes of other achievement datas are similar, do not repeat.
S202:According to achievement data, the current grade of load of network service providing system is determined.
After obtaining indices data, indices data with corresponding metrics-thresholds are compared, are determined each
The score value (water level) of item index, then integrates indices score value, calculates load score value, finally determines that network service provides
The current grade of load of system.
In an optional implementation manner, the current grade of load of network service providing system is determined according to achievement data
The step of include:
(1) it is the indices setting target threshold value of network service providing system;
(2) the current indices data of network service providing system are compared respectively with corresponding metrics-thresholds,
Obtain indices score value;
(3) according to indices score value, computational load score value;
(4) according to load score value, the grade of load is determined.
The realization process of wherein above-mentioned steps (4) can include:
(4.1) setting minimum load threshold value, highest load threshold;
(4.2) load score value with minimum load threshold value, highest load threshold is compared respectively, determines the grade of load
For the lowest class, intermediate grade or highest level.
Above by indices score value computational load score value so as to finally determine a specific implementation example of the grade of load
Son is such as:Assuming that the index of system reference includes cpu, mem, qps, rt tetra- at present, then it is each one metrics-thresholds of setting;It is false
If when cpu is more than cpu threshold values (such as cpu threshold values are 60%), then it is assumed that cpu scores (specific to consider index item for cpu
Score value can determine according to the size of cpu data and threshold value, such as score when many more than threshold value higher);Assuming that other three
Within the threshold value of safety, then this three are not considered, it is 0 to score.Computational load point is being carried out according to indices score value
During value, can weight (weight can not also be set) be distributed for different index item in advance, then COMPREHENSIVE CALCULATING (such as weighted average)
Obtain load score value.Finally the load score value and preset minimum load threshold value, highest load threshold are compared respectively, really
The section residing for present load score value is determined, so that it is determined that the current grade of load.For example, when load score value is less than minimum load threshold
During value, it is the lowest class to determine the grade of load;When loading score value higher than highest load threshold, determine the grade of load for most
It is high-grade;When loading score value between minimum load threshold value and highest load threshold, determine the grade of load for centre etc.
Grade.
S203:According to the current grade of load of network service providing system, adjustment effect optimal strategy, the impact of performance are balanced
The tactful ratio of strategy, performance optimal strategy so that service traffics are handled by the configuration according to the tactful ratio.
In an optional implementation manner, different processing can be determined by the way that different codes is set to perform logic
Strategy.Wherein, best results strategy corresponds to the preferential code execution logic of computational accuracy, and performance optimal strategy, which corresponds to, to be calculated
The code of speed-priority performs logic.Wherein:It is good that so-called best results can be understood as business effect, such as calculates more smart
It is accurate;So-called performance most preferably can be understood as process performance height, such as processing speed higher (response time is shorter).Drawn with search
For holding up service system, sort algorithm is more complicated, and sequence effect is better, but processing time is longer, this processing strategy is exactly
Effect is good, poor performance;In turn, sort algorithm is simpler, and effect is poorer, but elapsed time is shorter, is exactly that effect is poor, performance
It is good.
Such as:If the current grade of load be highest level, the ratio of reducing effect optimal strategy and/or, increase property
It can effect balance policy and performance optimal strategy.When the grade of load be highest level, illustrate that the processing pressure of current system is very big
(such as situation of double 11 flow blowouts) can only sacrifice process performance or improve business effect to solve at this time.Similarly:It is if current
The grade of load for the lowest class, can reduce performance optimal strategy ratio and/or, increase impact of performance balance policy and effect
The ratio of fruit optimal strategy.When the grade of load is relatively low rank, illustrate that the processing pressure of current system has been crossed (such as double 11
Cross), it at this time can be by the best results that increase the ratio of best results strategy to ensure under default setting.
" service traffics is made to be handled by the configuration of strategically ratio " is meant that:For the business in a period of time
Request, strategically ratio, determines by the number of requests of each strategy processing;Also service request that will be in a period of time according to
The corresponding strategy of tactful pro rate is handled.
In a particular application, different processing strategy and strategically can be realized respectively by different tactful buckets
Ratio carries out the configuration of business processing.Such as setting effect bucket, balanced bucket, performance bucket correspond respectively to best results strategy, property
The strategy of energy effect balance policy, performance optimal strategy.Assuming that allocative effect bucket, balanced bucket, performance bucket at flow peak
Ratio is 1:2:7, then in flow processing procedure is carried out, control service traffics are handled according to aforementioned proportion, i.e., for example right
In 10000 service requests in a period of time, 1000 best results strategies according to effect bucket are handled, 2000 by
According to balanced bucket impact of performance balance policy handled, 7000 handled according to the performance optimal strategy of performance bucket.
As it can be seen that above describe after the grade of load is determined according to achievement data, to the ratio of the processing strategy of system
It is adjusted, so as to fulfill to system strategy promotion and demotion management.For example, by improving the ratio of performance optimal strategy during flow peak
Example achievees the effect that degradation, and the sequence that strategy degrades is:Best results strategy->Effect performance balance policy->Performance is best
Strategy;Upgrading is achieved the effect that by the ratio of improvement effect optimal strategy during flow ebb, the sequence of strategy upgrading is:Performance
Optimal strategy->Effect performance balance policy->Best results strategy.
Other than carrying out tactful promotion and demotion adjustment, the adjustment of system resource configuration can also be carried out according to the grade of load
(dilatation and capacity reducing) particularly carries out dilatation at flow peak.Therefore, in an optional implementation manner, determining
After stating the current grade of load of network service providing system, the above method further includes S204:According to network service providing system
The current grade of load adjusts system resource for network service providing system.Step S204 can be with step S203 simultaneously or timesharing
It carries out.For example, if the current grade of load is highest level, operated by dilatation, increase system resource.Such as when flow height
When peak arrives, operated (for example increasing deployment machine resources) by dilatation.Similarly, if the current grade of load is the lowest class,
It can then be operated by capacity reducing and (reduce machine resources), reduce system resource.
It is realized below using search engine system as network service providing system specific example, with tactful bucket different
The mode of strategy is handled, exemplary Jie is carried out to the example of network service management method that this specification embodiment provides
It continues.
Referring to Fig. 3, the network service management method example schematic provided for this specification embodiment.
Each component in Fig. 3 is described below:
1st, search engine service:The online service system of search engine, in this specification embodiment as being downgraded and
By the system object of dilatation capacity reducing.
It is a kind of figuratively method wherein " to degrade ", and specific implementation is by the way that different disposal is configured by such as preceding introduction
What the allocation proportion between strategy was realized.So-called degradation can be understood as reducing or reducing partial service capability, to ensure
Major function can be used.For example, system supported function A, B, C originally, wherein A is major function, when bottleneck occurs in performance, in order to protect
Hinder the service of A, service degradation, the ability of B and C no longer provide, and A still can be applied.Or from A to become a (weaker with respect to A
Function), although ability has decrease, it is also possible to provide basic service.
" dilatation capacity reducing " refers to increasing and decreasing for resource.Such as original 10 machines of modules A, dilatation is to 15, capacity reducing
To 5.
2nd, bucket 0, bucket 1, bucket 2:It is to be formulated according to performance and effectiveness indicator, the processing strategy of different service ability.Such as
0 (effect bucket) of bucket, bucket 1 (balanced bucket), bucket 2 (performance bucket) correspond respectively to best results strategy, impact of performance balance policy, property
The strategy of energy optimal strategy.
3rd, access layer is searched for:It is traffic ingress, can be introduced flow different according to different processing strategy allocation ratios
Tactful bucket.
4th, BTS (experimental system) can be fallen according to configuration and metrics system indexs, intelligent control present flow rate
In which tactful bucket.
BTS intelligent control methods are for example:
(1) current system load grade (water level) is obtained.
The industry of the cpu of current system, the system indexs such as mem, disk and qps and rt are read from amonitor server
Business index.For example, cpu utilization rates 45%, mem uses 15GB, latency 20ms etc..
(2) judge whether current system load water level is excessively high.
For example it is excessively high that setting cpu water levels, which are more than 60%, then when current cpu water levels are more than 60%, triggers degraded operation, it is sacrificial
Domestic animal effect, improving performance reduce water level.
(3) demotion processes are performed.
The strategy that degrades is changed by interface, degradation strategy is made to come into force.
5、Amonitor server:It can collect the system index of search engine service system, such as cpu, qps and rt etc.,
So as to the current load capacity of sensory perceptual system.
6th, Hippo (scheduling system) can carry out application dilatation and capacity reducing operates, such as including installation and deployment, drainage
Deng operation.
7th, intelligent volume-expansion capacity reducing:(referred to by obtaining search engine service system metrics from amonitor server
Mark), judge current capacity situation, then by decision, send and instruct to hippo, complete the dilatation capacity reducing of system.
Degraded below with Fig. 3 examples on flow peak to system, the realization method of dilatation is described below.
(1) intelligent degradation:
In order to reach the optimal of performance and effect, such as the support of preceding introduction is to the degradation (bucket 0 of tactful bucket:Best results plan
Slightly, bucket 1:Impact of performance balance policy, bucket 2:Performance optimal strategy).Search engine service system can second grade report status information
To Amonitor server (metrics collects service), Intelligent Selection bucket strategy can be read from Amonitor server works as
Preceding system index data and operational indicator data are determined current system load grade, and are selected according to the grade of load
Suitable tactful bucket.Such as:When flow peak is arrived, the grade of load of search engine service is more than highest threshold value, then automatic drop
The ratio of inefficient fruit optimal strategy (bucket 0) carrys out improving performance, and safeguards system can be used;Flow peak period mistake, then can automatic lifting
The ratio of best results strategy (bucket 2) ensures that business effect is optimal.
(2) intelligent volume-expansion
For the flow that can both support expected neutralization unexpected, and can be with optimal machine assignment, intelligent volume-expansion capacity reducing
Module reads the achievement data of search engine service system from Amonitor server, and determines current load etc.
Grade is adjusted each machine resources of search engine service by Hippo dynamics, the sequence of operations such as is disposed or unloaded,
Reach the target of dynamic capacity-expanding capacity reducing, can both ensure minute grade real-time optimization online resource, support peak flow, it can also
Global optimum utilizes machine resources, while realizes unattended saving human cost.
As it can be seen that in the network service management method that this specification embodiment provides, the grade of load is determined according to achievement data
Later, the ratio of the various processing strategies of network service providing system is adjusted according to the grade of load, for example, can flow
Measure peak when, realize and degrade to system strategy, so as to ensure burst flow arrive when system normal operation.In addition, also
Can the dilatation to system and capacity reducing be realized by the adjustment to system resource.
Second aspect, based on same inventive concept, this specification embodiment provides a kind of network service management device, is used for
Network service providing system to provide the network service determines that processing strategy please refers to Fig.4, including:
Achievement data acquiring unit 401, for obtaining the current achievement data of the network service providing system;
Grade of load determination unit 402, for according to the achievement data, determining that the network service providing system is current
The grade of load;
Tactful dispensing unit 403, for according to the current grade of load of the network service providing system, adjustment effect to be most
The tactful ratio of good strategy, impact of performance balance policy, performance optimal strategy so that service traffics are by according to the tactful ratio
Configuration handled.
In a kind of optional mode, the achievement data includes system performance index data and/or business effectiveness indicator number
According to;Wherein:System performance index includes one in processor utilization rate, memory usage, disk transfer rate, network utilization
It is or multinomial;Business effectiveness indicator includes query rate per second, number of concurrent, one or more in the response time.
In a kind of optional mode, the grade of load determination unit 402 includes:
Metrics-thresholds set subelement 4021, for the indices setting target threshold for the network service providing system
Value;
Indexes Comparison subelement 4022, for by the current indices data of the network service providing system respectively and
Corresponding metrics-thresholds are compared, and obtain indices score value;
Score value computation subunit 4023 is loaded, for according to indices score value, computational load score value;
Grade of load determination subelement 4024, for according to the load score value, determining the grade of load.
In a kind of optional mode, the grade of load determination subelement 4024 is specifically used for:By the load score value point
It is not compared with preset minimum load threshold value, highest load threshold, determines the grade of load for the lowest class, centre
Grade or highest level.
In a kind of optional mode, the processing strategy includes best results strategy, impact of performance balance policy, performance most
Good strategy;
In a kind of optional mode, the strategy dispensing unit 403 is specifically used for:If the current grade of load is most
It is high-grade, then reduce the best results strategy ratio and/or, increase the impact of performance balance policy and performance be best
The ratio of strategy;If the current grade of load be the lowest class, reduce the performance optimal strategy ratio and/or, increase
The ratio of the impact of performance balance policy and best results strategy.
In a kind of optional mode, further include:
Policy implementation unit 404 sets different codes to perform logic, determines different processing strategies for passing through;Its
In, the best results strategy corresponds to the preferential code of computational accuracy and performs logic, and the performance optimal strategy corresponds to meter
The code for calculating speed-priority performs logic.
In a kind of optional mode, further include:
Resource adjustment unit 405, for being the network according to the current grade of load of the network service providing system
Service provider system adjusts system resource.
In a kind of optional mode, the resource adjustment unit 405 is specifically used for:If the current grade of load is most high
Grade, then operated by dilatation, increase the system resource;If the current grade of load is the lowest class, operated by capacity reducing,
Reduce the system resource.
The third aspect, based on the same inventive concept of network service management method in previous embodiment, the present invention also carry
For a kind of server, as shown in figure 5, including memory 504, processor 502 and being stored on memory 504 and can be in processor
The computer program run on 502, the processor 502 realize network service management method described previously when performing described program
Either method the step of.
Wherein, in Figure 5, bus architecture (being represented with bus 500), bus 500 can include any number of interconnection
Bus and bridge, bus 500 deposited what the one or more processors including being represented by processor 502 and memory 504 represented
The various circuits of reservoir link together.Bus 500 can also will peripheral equipment, voltage-stablizer and management circuit etc. it
Various other circuits of class link together, and these are all it is known in the art, and therefore, no longer it is carried out further herein
Description.Bus interface 506 provides interface between bus 500 and receiver 501 and transmitter 503.Receiver 501 and transmitter
503 can be same element, i.e. transceiver, provide the unit for communicating over a transmission medium with various other devices.Place
Reason device 502 is responsible for bus 500 and common processing, and memory 504 can be used for storage processor 502 and perform behaviour
Used data when making.
Fourth aspect, based on the inventive concept with network service management method in previous embodiment, the present invention also provides one
Kind computer readable storage medium, is stored thereon with computer program, which realizes net described previously when being executed by processor
The step of either method of network service management.
This specification is with reference to the method, equipment (system) and computer program product according to this specification embodiment
Flowchart and/or the block diagram describes.It should be understood that it can be realized by computer program instructions every in flowchart and/or the block diagram
The combination of flow and/or box in one flow and/or box and flowchart and/or the block diagram.These computers can be provided
Program instruction is to the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices
To generate a machine so that the instruction performed by computer or the processor of other programmable data processing devices generates use
In setting for the function that realization is specified in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes
It is standby.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction generation being stored in the computer-readable memory includes referring to
Enable the manufacture of equipment, the commander equipment realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps are performed on calculation machine or other programmable devices to generate computer implemented processing, so as in computer or
The instruction offer performed on other programmable devices is used to implement in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment of this specification has been described, those skilled in the art once know basic wound
The property made concept, then additional changes and modifications may be made to these embodiments.So appended claims are intended to be construed to include
Preferred embodiment and all change and modification for falling into this specification range.
Obviously, those skilled in the art can carry out this specification various modification and variations without departing from this specification
Spirit and scope.In this way, if these modifications and variations of this specification belong to this specification claim and its equivalent skill
Within the scope of art, then this specification is also intended to include these modifications and variations.