CN112241350B - Micro-service evaluation method and device, computing device and micro-service detection system - Google Patents

Micro-service evaluation method and device, computing device and micro-service detection system Download PDF

Info

Publication number
CN112241350B
CN112241350B CN201910642690.3A CN201910642690A CN112241350B CN 112241350 B CN112241350 B CN 112241350B CN 201910642690 A CN201910642690 A CN 201910642690A CN 112241350 B CN112241350 B CN 112241350B
Authority
CN
China
Prior art keywords
micro
service
test
operation data
test command
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910642690.3A
Other languages
Chinese (zh)
Other versions
CN112241350A (en
Inventor
孔华明
吕晓敏
程佳鸣
彭庆畅
王延长
茹锋
李佳欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Zhejiang 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 China Mobile Communications Group Co Ltd, China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201910642690.3A priority Critical patent/CN112241350B/en
Publication of CN112241350A publication Critical patent/CN112241350A/en
Application granted granted Critical
Publication of CN112241350B publication Critical patent/CN112241350B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/324Display of status information
    • G06F11/327Alarm or error message display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites

Abstract

The embodiment of the invention relates to the technical field of communication, and discloses a micro-service evaluation method, a device, a computing device and a micro-service detection system, wherein the method comprises the following steps: acquiring at least one test command according to the received test requirement; testing the micro service in a non-invasive mode according to the test command to obtain a test result of the micro service; and evaluating the micro service according to the test result. The embodiment of the invention realizes the detection of the micro-service in a non-invasive mode, thereby realizing the detection of the micro-service in the running process of the micro-service and being convenient for evaluating the resistance of the micro-service to unexpected faults.

Description

Micro-service evaluation method and device, computing device and micro-service detection system
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a micro-service evaluation method, a micro-service evaluation device, computing equipment and a micro-service detection system.
Background
With the continuous development of the communication field, the micro service system can be deployed and expanded quickly and independently, and the micro services are loosely coupled through a lightweight protocol and an interface or other communication modes, so that the flexibility of the whole micro service system is improved, and meanwhile, the occurrence probability of faults, such as hardware faults, network delay and the like, can be increased.
In the process of implementing the embodiment of the present invention, the inventors found that: the existing vulnerability evaluation method for the micro service needs to deploy corresponding test logic in the micro service in advance, and the problems which will occur in the service operation process are not considered.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention provide a micro-service evaluation method, apparatus, computing device and micro-service detection system, which overcome the foregoing problems or at least partially solve the foregoing problems.
According to an aspect of an embodiment of the present invention, there is provided a micro-service evaluation method, including: acquiring at least one test command according to the received test requirement; testing the micro-service in a non-invasive mode according to the test command to obtain a test result of the micro-service; and evaluating the micro service according to the test result.
In an optional manner, the method further comprises: and configuring the corresponding relation among the test requirement, the test command and the micro-service.
In an optional manner, the step of testing the microservice in a non-invasive manner according to the test command to obtain a test result of the microservice includes: acquiring first operating data of micro service before executing a test command; sending the test command to a micro service, and executing the test command; monitoring second operation data of the micro service in the process of executing the test command; acquiring third operating data of the microservice after the test command is executed; generating a comparison report according to the first operation data, the second operation data and the third operation data; the comparison is reported as a test result of the microservice.
In an alternative manner, evaluating the microservice according to the test result includes: screening abnormal operation data meeting preset alarm conditions according to the comparison report; determining a micro-service score according to the abnormal operation data; and evaluating the micro-service according to the micro-service score.
In an alternative manner, determining a microservice score from abnormal operating data includes: and weighting the abnormal operation data according to the abnormal operation data and the preset weight of the abnormal operation data to obtain the micro-service score.
In an alternative approach, the micro-services are evaluated based on the micro-service scores, including: determining the section to which the micro service score belongs according to the micro service score; and determining the evaluation result of the micro-service according to the section to which the micro-service score belongs.
According to another aspect of the embodiments of the present invention, there is provided a micro-service evaluation apparatus including: the device comprises an acquisition module, a test module and an evaluation module, wherein the acquisition module is used for acquiring at least one test command according to a received test requirement; the test module is used for testing the micro-service in a non-invasive mode according to the test command to obtain a test result of the micro-service; and the evaluation module is used for evaluating the micro-service according to the test result.
In an optional manner, the apparatus further comprises: and the configuration module is used for configuring the corresponding relation among the test requirement, the test command and the micro-service.
In an optional manner, the test module is further configured to: acquiring first operation data of the micro service before the test command is executed; sending the test command to a micro service, and executing the test command; monitoring second operation data of the microservice in the process of executing the test command; acquiring third operating data of the microservice after the test command is executed; generating a comparison report according to the first operation data, the second operation data and the third operation data; the comparison is reported as a test result of the microservice.
In an optional manner, the evaluation module is further configured to: screening abnormal operation data meeting preset alarm conditions according to the comparison report; determining a micro-service score according to the abnormal operation data; and evaluating the micro-service according to the micro-service score.
In an optional manner, determining the microservice score according to the abnormal operation data includes: and weighting the abnormal operation data according to the abnormal operation data and the preset weight of the abnormal operation data to obtain the micro-service score.
In an alternative form, evaluating the microservice based on the microservice score includes: determining the section to which the micro service score belongs according to the micro service score; and determining the robustness grade of the micro service according to the section to which the micro service score belongs.
According to another aspect of embodiments of the present invention, there is provided a computing device including: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is used for storing at least one executable instruction, and the executable instruction enables the processor to execute the operation corresponding to the micro-service evaluation method.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium having at least one executable instruction stored therein, where the executable instruction causes a processor to perform an operation corresponding to the micro service evaluation method.
According to still another aspect of the embodiments of the present invention, there is provided a micro-service evaluation system, including: a console and a task scheduler; the console includes: the task arranging module is used for configuring the corresponding relation among the test requirements, the test commands and the micro-services; the task scheduling module is used for acquiring a corresponding test command in the task scheduler according to the test requirement; the warning rule setting module is used for setting the weight of the abnormal operation data and the corresponding relation between the micro-service obtaining areas and the micro-service evaluation results; the evaluation module is used for evaluating the microservice according to the test result; the task scheduler includes: the test command configuration module is used for configuring the test command; the scheduling module is used for testing the microservice in a non-invasive mode; and the console tests the micro-service through the task scheduler in a non-intrusive mode according to the received test requirement, and monitors to obtain a test result.
The embodiment of the invention detects the micro-service in a non-invasive mode, thereby realizing the detection of the micro-service in the operation process of the micro-service and facilitating the evaluation of the resistance of the micro-service to unexpected faults.
The foregoing description is only an overview of the technical solutions of the embodiments of the present invention, and the embodiments of the present invention can be implemented according to the content of the description in order to make the technical means of the embodiments of the present invention more clearly understood, and the detailed description of the present invention is provided below in order to make the foregoing and other objects, features, and advantages of the embodiments of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 shows a schematic diagram of an application scenario of an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for evaluating microservice according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram of a microservice test in a first embodiment of the present invention;
FIG. 4 is a flowchart illustrating a micro-service evaluation method according to a second embodiment of the present invention;
fig. 5 shows a functional block diagram of a micro-service evaluation device according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram illustrating a micro-service detection system according to a fourth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computing device according to a fifth embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The embodiment of the invention is applied to a system module under a micro-service control platform and mainly used for carrying out vulnerability resistance detection on micro-services. Fig. 1 shows an application scenario diagram of an embodiment of the present invention, and as shown in fig. 1, the system modules include a console 100 and a task scheduler 200, the console 100 includes the following functional modules: the task orchestration module 101 is configured to orchestrate the test commands, including configuring corresponding relationships between the test requirements, the test commands, and the micro services. The task scheduling module 102 is configured to obtain a corresponding test command from the task scheduler 200 according to the test requirement. And the alarm rule setting module 103 is used for setting an alarm condition of the abnormal operation data, the weight of the operation data and the corresponding relation between the micro-service obtaining areas and the micro-service evaluation results. And the evaluation module 104 is configured to evaluate the micro service according to the test result. The task scheduler 200 includes a test command configuration module 201 for configuring the test commands, i.e. configuring the test logic corresponding to each test command. The testing module 202 is configured to test the micro service in a non-intrusive manner, and mainly test an operating environment of the micro service, an operating environment of a service domain where the micro service is located, middleware, iaaS, and PaaS resources. The console 100 tests the micro service through the task scheduler 200 in a non-invasive manner according to the received test requirement, and monitors to obtain a test result. The following further describes embodiments of the present invention.
Fig. 2 is a flowchart illustrating a method for evaluating microservice according to a first embodiment of the present invention, and as shown in fig. 2, the method includes the following steps:
step 110: and acquiring at least one test command according to the received test requirement.
In this step, the test requirement refers to the failure type of the micro service to be tested, for example: hardware failures, network delays, etc. The test command is test logic preset in the system by a person skilled in the art in advance. The test command in the embodiment of the present invention is a test command obtained by packaging test logic and packaging the packaged test command in an interface format, where the package interface includes an input end and an output end, the input end is used to receive a test requirement, and the output end is used to send the test command to a test object. The test command includes: random kill, simulated degradation, conditional kill, health guard, vulnerability detection, configuration check, and high availability fault simulation. The random killing tests whether the micro-service has the problems of automatic restart, system throughput capacity attenuation and the like by sending a forced process stopping instruction to the micro-service. The simulated degradation is to send a degradation instruction to a specific service to reduce the operation specification of the specific service, so as to test the core service operation capacity of the micro service in the peak period of the service. The conditional killing is to send a forced process stopping instruction to the microservice according to a certain strategy. For example, a policy may be a CPU occupancy above 80%, a number of requests above a certain threshold, a service response time exceeding a threshold, etc. The health guard periodically checks the micro service, for example, periodically sends a GET request to the micro service in an HTTP manner, and determines whether a return code thereof is 2XX, if so, the micro service is considered healthy, and if not, the micro service is considered unhealthy. The resource recovery is to automatically recover idle resources, integrate fragment resources and the like according to a predefined resource use model by collecting the resource use condition, so that the resource utilization rate of the whole cluster is improved. The vulnerability check is used for finding high-risk vulnerabilities and potential security risks of the micro-services, and loss and influence caused by utilization of the vulnerabilities by hackers on servers, applications and the like are avoided. The configuration check is used to check the parameter configuration specification of each service, e.g., whether the actually usable resource is consistent with the service resource specification configuration. Simulating high availability failures is used to simulate various system failures, such as load balancing server failures, automatic switching failures, and the like. The test requirement corresponds to at least one test command, a plurality of test commands can be put together, and the corresponding test command is selected by setting a selection switch according to the test requirement, and the specific form is shown in fig. 3. In fig. 3, a denotes an input terminal, B denotes an output terminal, and the selection switch is used for selecting a corresponding test command according to a test requirement. And sending the test command corresponding to the test requirement to the micro-service through the interface B, wherein a plurality of test commands can be jointly sent to the micro-service to be tested.
Step 120: and testing the micro-service in a non-invasive mode according to the test command to obtain a test result of the micro-service.
In this step, the non-intrusive mode does not need to write the user code into the micro-service framework, and only needs a person skilled in the art to write a test class required by the test, wherein the test class contains the test command, and the dependent injection can be completed through configuration, that is, the test command can be sent to the micro-service through the packaging interface during the test by configuring the corresponding relationship between the test command and the micro-service, so as to obtain the test result of the micro-service. The test result of the micro service is obtained by monitoring the operation data of the micro service after the test command is sent. When testing the micro service, the operating environment of the service domain where the micro service is located, the middleware, the IaaS and the PaaS resources are mainly tested, and these related data are collectively referred to as the operating data of the micro service in the embodiment of the present invention.
In a specific embodiment, before sending a test command to a microservice, first operating data of the microservice is acquired; sending the test command to the micro-service, and executing the test command; monitoring second operation data of the microservice in the process of executing the test command; acquiring third operating data of the microservice after the test command is executed; generating a comparison report according to the first operation data, the second operation data and the third operation data; the comparison is reported as a test result of the microservice.
The first operation data, the second operation data and the third operation data are performance index data used for representing the performance of the micro-service when the micro-service is in operation, for example, delay rate, CPU occupancy rate, memory occupancy rate and the like of the micro-service. The first operation data, the second operation data and the third operation data all contain the same type of performance indexes, but the corresponding performance index data can be changed. And generating a comparison report according to the performance indexes of the micro-service before and after the test command is executed, wherein the comparison report comprises the change process of each performance index, and the comparison report is the test result of the micro-service.
Step 130: and evaluating the microservice according to the test result.
In this step, the micro-service's resistance to vulnerability to test requirements is evaluated based on the test results of the micro-service.
In a specific embodiment, according to the comparison report obtained in step 120, screening out abnormal operation data meeting a preset alarm condition; determining a micro-service score according to the abnormal operation data; and evaluating the micro-service according to the micro-service score.
The abnormal operation data refers to performance index data which changes in the test command execution process and after the test command execution process compared with the performance index data before the test command execution process. For each performance index data, a corresponding alarm condition is preset, for a numerical performance index, such as a CPU utilization rate, a corresponding threshold value is preset, and when the performance index data exceeds the set threshold value, the data is considered as abnormal data. For a non-numerical performance index, for example, a configuration ERROR, may be identified by setting a corresponding abnormality flag, for example, the abnormality flag is a keyword "ERROR" or "abnormality," and the setting of the keyword is related to a feedback result of the performance index. Corresponding setting can be performed according to the feedback result, for example, if the feedback result has an abnormality and the indication information includes "abnormality", the abnormality flag is set to "abnormality".
And presetting relevant weights for each performance index, and weighting the abnormal operation data according to the obtained abnormal operation data and the preset weights of the abnormal operation data to obtain the micro-service score. In a specific implementation process, a numerical value corresponding to the abnormal operation data during weighting may be manually set by a person skilled in the art. In a specific embodiment, for a numerical abnormal operation data, a mean value of all abnormal operation data included in the performance index may be used as a value corresponding to the performance index when weighted, and for a non-numerical abnormal operation data, a value corresponding to the performance index when weighted may be set to a certain value. And weighting each performance index contained in the abnormal operation data to obtain a result as a micro service score.
And determining the section to which the score belongs according to the micro service score, and determining the evaluation result of the micro service according to the section to which the micro service score belongs. The micro-service obtaining intervals are manually set by a person skilled in the art, and each interval corresponds to an evaluation result of the micro-service. In a specific embodiment, the evaluation result of the micro service is a robustness level of the micro service, which is used for representing the anti-vulnerability capability of the micro service, and the higher the robustness of the micro service is, the stronger the anti-vulnerability capability of the corresponding micro service is.
The embodiment of the invention detects the micro-service in a non-invasive mode, thereby realizing the detection of the micro-service in the operation process of the micro-service and facilitating the evaluation of the resistance of the micro-service to unexpected faults.
Fig. 4 shows a flowchart of a micro-service evaluation method according to a second embodiment of the present invention, and as shown in fig. 4, the method further includes the following steps before step 110 in the first embodiment:
step 210: and configuring the corresponding relation among the test requirement, the test command and the micro-service.
In this step, a certain test requirement corresponds to at least one test command, and each test command acts on at least one micro service. In configuration, the test requirements of all the microservices in the service domain where the microservices are located need to be preset. For the configuration of the test command, the logic of the test command needs to be configured, packaged and packaged through an interface. It is worth noting that multiple test commands can simultaneously test the same microservice.
In some embodiments, in addition to configuring the corresponding relationship in this step, an alarm condition of abnormal operation data, a weight of the operation data, and a corresponding relationship between micro-service obtaining areas and micro-service evaluation results need to be configured, so that the micro-service is evaluated according to the test results.
The embodiment of the invention improves the efficiency of executing the test command by carrying out the configuration related to the test command in advance before executing the test command.
Fig. 5 shows a functional block diagram of a micro-service evaluation apparatus according to a third embodiment of the present invention, as shown in fig. 5, the apparatus includes: the device comprises an acquisition module 310, a test module 320 and an evaluation module 330, wherein the acquisition module 310 is used for acquiring at least one test command according to a received test requirement; the test module 320 is configured to test the micro service in a non-invasive manner according to the test command to obtain a test result of the micro service; and the evaluation module 330 is configured to evaluate the micro service according to the test result.
In an optional manner, the apparatus further comprises: the configuration module 340 is configured to configure a corresponding relationship between the test requirement, the test command, and the micro service.
In an alternative manner, the test module 320 is further configured to: acquiring first operation data of the micro service before the test command is executed; sending the test command to a micro service, and executing the test command; monitoring second operation data of the microservice in the process of executing the test command; acquiring third operating data of the microservice after the test command is executed; generating a comparison report according to the first operation data, the second operation data and the third operation data; the comparison is reported as a test result of the microservice.
In an optional manner, the evaluation module 330 is further configured to: screening abnormal operation data meeting preset alarm conditions according to the comparison report; determining a micro-service score according to the abnormal operation data; and evaluating the micro-service according to the micro-service score.
In an optional manner, determining the microservice score according to the abnormal operation data includes: and weighting the abnormal operation data according to the abnormal operation data and the preset weight of the abnormal operation data to obtain the micro-service score.
In an alternative approach, evaluating the microservice based on the microservice score includes: determining the section to which the micro service score belongs according to the micro service score; and determining the evaluation result of the micro service according to the section to which the micro service score belongs.
In the embodiment of the invention, the test module 320 detects the micro-service in a non-invasive manner, so that the micro-service is detected in the operation process of the micro-service, and the evaluation module 330 is convenient to evaluate the resistance of the micro-service to unexpected faults.
The embodiment of the invention provides a nonvolatile computer storage medium, wherein at least one executable instruction is stored in the computer storage medium, and the computer executable instruction can execute the operation corresponding to the micro-service evaluation method in any method embodiment.
Embodiments of the present invention provide a computer program product, where the computer program product includes a computer program stored on a computer storage medium, and the computer program includes program instructions, which, when executed by a computer, cause the computer to perform operations corresponding to one of the micro-service evaluation methods in any of the above-mentioned method embodiments.
Fig. 6 is a schematic structural diagram of a micro-service evaluation system according to a fourth embodiment of the present invention, and as shown in fig. 6, the system includes: a console 100 and a task scheduler 200, wherein the console 100 comprises the following functional modules: and the task arranging module 101 is used for configuring the corresponding relation among the test requirements, the test commands and the micro-services. And the task scheduling module 102 is configured to obtain a corresponding test command from the self-test task scheduler according to the test requirement. And the alarm rule setting module 103 is used for setting an alarm condition of the frequently-running data, a weight of the running data and a corresponding relation between the micro-service obtaining areas and the micro-service evaluation result. And the evaluation module 104 is configured to evaluate the micro service according to the test result. The task scheduler 200 includes a test command configuration module 201 for configuring the test commands, i.e. configuring the test logic corresponding to each test command. The testing module 202 is configured to test the microservice in a non-invasive manner. The console 100 tests the micro service through the task scheduler 200 in a non-invasive manner according to the received test requirement, and monitors to obtain a test result.
In the embodiment of the invention, the task scheduler 100 detects the micro-service in a non-invasive manner, so that the micro-service is detected in the operation process of the micro-service, and the resistance of the micro-service to unexpected faults is conveniently evaluated.
Fig. 7 is a schematic structural diagram of a computing device according to a fifth embodiment of the present invention, and the specific embodiment of the present invention does not limit the specific implementation of the computing device.
As shown in fig. 7, the computing device may include: a processor (processor) 502, a Communications Interface 504, a memory 506, and a communication bus 508.
Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically execute the relevant steps in one embodiment of the above-described microservice evaluating method.
In particular, program 510 may include program code that includes computer operating instructions.
The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement an embodiment of the present invention. The computing device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
The program 510 may specifically be used to cause the processor 502 to perform the following operations: acquiring at least one test command according to the received test requirement; testing the micro service in a non-invasive mode according to the test command to obtain a test result of the micro service; and evaluating the micro service according to the test result.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations: and configuring the corresponding relation among the test requirement, the test command and the micro-service.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations: acquiring first operation data of the micro service before the test command is executed; sending the test command to a micro service, and executing the test command; monitoring second operation data of the microservice in the process of executing the test command; acquiring third operating data of the microservice after the test command is executed; generating a comparison report according to the first operation data, the second operation data and the third operation data; the comparison is reported as a test result of the microservice.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations: screening abnormal operation data meeting preset alarm conditions according to the comparison report; determining a micro-service score according to the abnormal operation data; and evaluating the micro-service according to the micro-service score.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations: and weighting the abnormal operation data according to the abnormal operation data and the preset weight of the abnormal operation data to obtain the micro-service score.
In an alternative manner, the program 510 may be specifically configured to cause the processor 502 to perform the following operations: determining the section to which the micro-service score belongs according to the micro-service score; and determining the evaluation result of the micro-service according to the section to which the micro-service score belongs.
The embodiment of the invention detects the micro-service in a non-invasive mode, thereby realizing the detection of the micro-service in the operation process of the micro-service and facilitating the evaluation of the resistance of the micro-service to unexpected faults.
The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system is apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

Claims (9)

1. A method of microservice evaluation, the method comprising:
acquiring at least one test command according to the received test requirement, wherein the test command comprises the following steps: by configuring the corresponding relation between the test command and the micro-service, when receiving the test requirement, sending the test command to the micro-service through the packaging interface;
according to the test command, testing the micro service in a non-invasive mode to obtain a test result of the micro service, wherein the test result comprises the following steps: acquiring first operation data of the micro service before the test command is executed, sending the test command to the micro service, executing the test command, monitoring second operation data of the micro service in the process of executing the test command, acquiring third operation data of the micro service after the test command is executed, generating a comparison report according to the first operation data, the second operation data and the third operation data, and taking the comparison report as a test result of the micro service; the first operation data, the second operation data and the third operation data are performance index data used for representing the performance of the micro-service during the operation of the micro-service, and comprise the operation environment of the micro-service, the operation environment of a service domain where the micro-service is located, middleware, iaaS and PaaS resource data; the first operating data, the second operating data and the third operating data all contain performance indexes of the same type;
and evaluating the micro service according to the test result.
2. The method of claim 1, further comprising:
and configuring the corresponding relation among the test requirement, the test command and the micro service.
3. The method of claim 2, wherein said evaluating said microservice based on said test results comprises:
screening abnormal operation data meeting preset alarm conditions according to the comparison report;
determining the micro-service score according to the abnormal operation data;
and evaluating the micro-service according to the micro-service score.
4. The method of claim 3, wherein determining the microservice score based on the abnormal operation data comprises:
and weighting the abnormal operation data according to the abnormal operation data and the preset weight of the abnormal operation data to obtain the micro service score.
5. The method of claim 3 or 4, wherein evaluating the microservice based on the microservice score comprises:
determining the section to which the micro service score belongs according to the micro service score;
and determining the evaluation result of the micro service according to the section to which the micro service score belongs.
6. A microservice assessment apparatus, the apparatus comprising:
the obtaining module is used for obtaining at least one test command according to the received test requirement, and comprises: by configuring the corresponding relation between the test command and the micro-service, when receiving the test requirement, sending the test command to the micro-service through the packaging interface;
the test module is used for testing the micro-service in a non-invasive mode according to the test command to obtain a test result of the micro-service, and comprises the following steps: acquiring first operation data of the micro service before the test command is executed, sending the test command to the micro service, executing the test command, monitoring second operation data of the micro service in the process of executing the test command, acquiring third operation data of the micro service after the test command is executed, generating a comparison report according to the first operation data, the second operation data and the third operation data, and taking the comparison report as a test result of the micro service;
an evaluation module: for evaluating the microservice according to the test result.
7. A computing device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the micro-service evaluation method according to any one of claims 1-5.
8. A computer storage medium having stored therein at least one executable instruction for causing a processor to perform operations corresponding to a micro-service evaluation method as claimed in any one of claims 1-5.
9. A microservice evaluation system, comprising: a console and a task scheduler;
the console includes:
the task arranging module is used for configuring the corresponding relation among the test requirements, the test commands and the micro-services;
the task scheduling module is used for acquiring a corresponding test command in the task scheduler according to the test requirement;
the warning rule setting module is used for setting the warning condition of the abnormal operation data, the weight of the operation data and the corresponding relation between the micro-service obtaining areas and the micro-service evaluation result;
the evaluation module is used for evaluating the microservice according to the test result;
the task scheduler includes:
the test command configuration module is used for configuring the test command;
a testing module for testing the microservice in a non-invasive manner, comprising: acquiring first operation data of the micro service before the test command is executed, sending the test command to the micro service, executing the test command, monitoring second operation data of the micro service in the process of executing the test command, acquiring third operation data of the micro service after the test command is executed, generating a comparison report according to the first operation data, the second operation data and the third operation data, and taking the comparison report as a test result of the micro service;
and the console tests the micro-service through the task scheduler in a non-invasive mode according to the received test requirements and monitors to obtain a test result.
CN201910642690.3A 2019-07-16 2019-07-16 Micro-service evaluation method and device, computing device and micro-service detection system Active CN112241350B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910642690.3A CN112241350B (en) 2019-07-16 2019-07-16 Micro-service evaluation method and device, computing device and micro-service detection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910642690.3A CN112241350B (en) 2019-07-16 2019-07-16 Micro-service evaluation method and device, computing device and micro-service detection system

Publications (2)

Publication Number Publication Date
CN112241350A CN112241350A (en) 2021-01-19
CN112241350B true CN112241350B (en) 2022-11-01

Family

ID=74167075

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910642690.3A Active CN112241350B (en) 2019-07-16 2019-07-16 Micro-service evaluation method and device, computing device and micro-service detection system

Country Status (1)

Country Link
CN (1) CN112241350B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112925709A (en) * 2021-02-26 2021-06-08 西安交通大学 Micro-service maintainability assessment method based on multi-source characteristic space
CN113206759B (en) * 2021-04-27 2022-10-14 北京赛博云睿智能科技有限公司 Management method and system of intelligent PaaS service platform across different service domains
CN115001788A (en) * 2022-05-28 2022-09-02 四川大学 Vulnerability detection and defense method for remote agriculture Internet of things micro-service architecture
CN115396341B (en) * 2022-08-16 2023-12-05 度小满科技(北京)有限公司 Service stability evaluation method and device, storage medium and electronic device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270818A (en) * 2016-12-30 2018-07-10 中国移动通信集团公司 A kind of micro services architecture system and its access method
CN108664378A (en) * 2018-05-10 2018-10-16 西安电子科技大学 A kind of most short optimization method for executing the time of micro services

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10656929B2 (en) * 2015-08-11 2020-05-19 International Business Machines Corporation Autonomously healing microservice-based applications
CN108038051A (en) * 2017-11-03 2018-05-15 深圳市牛鼎丰科技有限公司 Dissemination method, device, computer equipment and the storage medium of micro services
US10592402B2 (en) * 2017-11-20 2020-03-17 International Business Machines Corporation Automated integration testing with mock microservices
CN109358858B (en) * 2018-09-19 2022-03-22 网易(杭州)网络有限公司 Automatic deployment method, device, medium and electronic equipment
CN109756364B (en) * 2018-12-07 2021-12-14 成都四方伟业软件股份有限公司 Micro-service performance optimization system and analysis method based on log analysis

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108270818A (en) * 2016-12-30 2018-07-10 中国移动通信集团公司 A kind of micro services architecture system and its access method
CN108664378A (en) * 2018-05-10 2018-10-16 西安电子科技大学 A kind of most short optimization method for executing the time of micro services

Also Published As

Publication number Publication date
CN112241350A (en) 2021-01-19

Similar Documents

Publication Publication Date Title
CN112241350B (en) Micro-service evaluation method and device, computing device and micro-service detection system
CN109586952B (en) Server capacity expansion method and device
US8990778B1 (en) Shadow test replay service
US9009683B2 (en) Systems and/or methods for testing client reactions to simulated disruptions
US9575745B1 (en) Immediately launching applications
Cotroneo et al. A fault correlation approach to detect performance anomalies in virtual network function chains
CN109976935A (en) Micro services framework, micro services node and its fusing restoration methods, device
CN111176803B (en) Service processing method, device, server and storage medium
CN103401698B (en) For the monitoring system that server health is reported to the police in server set group operatione
CN109739527B (en) Method, device, server and storage medium for client gray scale release
US8850398B1 (en) Automated testing of application programs from an application program ecosystem
CN110851311A (en) Service fault identification method, device, equipment and storage medium
CN108268305A (en) For the system and method for virtual machine scalable appearance automatically
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN109558313B (en) Method and device for constructing abnormal test scene
AlGhamdi et al. Towards reducing the time needed for load testing
CN106789308A (en) The GIS service device and its control method of a kind of micro services framework automatically retractable
CN108400885A (en) A kind of service availability detection method, device and electronic equipment
CN109873730A (en) A kind of network slice test and management method and Related product
CN106294364B (en) Method and device for realizing web crawler to capture webpage
CN107846294B (en) Main/standby service switching method and device
CN111159029B (en) Automated testing method, apparatus, electronic device and computer readable storage medium
CN110971478B (en) Pressure measurement method and device for cloud platform service performance and computing equipment
Suffian et al. The design and execution of performance testing strategy for cloud-based system
CN106230666B (en) A kind of monitoring method and monitoring system of service availability

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
GR01 Patent grant
GR01 Patent grant