Disclosure of Invention
The invention aims to provide a non-stop system drilling method and a non-stop system drilling device, which can simulate real production flow during production drilling and ensure that system upgrading does not influence the capability of providing services to the outside during production drilling. The invention can verify the problems of the system upgrading on the aspects of the function influence on the service, the performance influence on the service, the load balance influence, the network influence and the like, and simultaneously determine the optimal production window and production time.
To achieve the above object, the present invention provides a method for validating a system drill without shutdown, the method comprising: acquiring server information and a production flow index of an application, generating environment information of the application according to the server information, and generating a flow simulation task according to the production flow index; initiating background simulation flow for the application according to the environment information and the flow simulation task, and upgrading and installing the application; monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the server-associated equipment; and obtaining the application production exercise result through the inlet flow, the performance parameters and the load condition.
In the above drilling verification method for an uninterruptible system, preferably, the generating a flow simulation task according to the production flow index includes: and converting the production flow index into a query rate index and a response time index, and generating a flow simulation task according to the query rate index and the response time index.
In the above method for performing validation on a non-stop system, preferably, the monitoring the ingress traffic of the application, the performance parameter of the server, and the load condition of the server-associated device further includes: acquiring historical access flow data of the application according to the environment information; and comparing the background simulation flow with the historical access flow data, and monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the equipment associated with the server when the difference between the background simulation flow and the historical access flow is smaller than a preset difference threshold value.
In the above method for validating the drill of the non-stop system, preferably, the performance parameters of the monitoring server include: and acquiring the performance parameters of the server through a Promiex monitoring system, and storing the performance parameters and the identification information of the server into a preset time sequence database according to a time sequence after the performance parameters are associated with the identification information of the server.
In the non-stop system drilling verification method, preferably, the performance parameters include memory usage ratio, CPU usage ratio, and coefficient disk processing efficiency; the entry flow comprises a transaction success flow and a transaction failure flow; the load condition includes access flow and load of each network device in the distributed architecture server.
In the above method for validating the non-stop system drilling, preferably, the obtaining of the production drilling result of the application through the inlet flow, the performance parameter and the load condition further includes: comparing the inlet flow, the performance parameters and the load condition in the commissioning result with a preset alarm threshold respectively, and generating an alarm signal when any data among the inlet flow, the performance parameters and the load condition meets a preset alarm condition; providing the alert signal to a predetermined location.
The invention also provides a non-stop system drilling verification device, which comprises a flow simulation module and a monitoring module; the flow simulation module is used for acquiring server information and production flow indexes of the application, generating environment information of the application according to the server information, and generating a flow simulation task according to the production flow indexes; initiating background simulation flow for the application according to the environment information and the flow simulation task, and upgrading and installing the application; the monitoring module is used for monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the server-associated equipment; and obtaining the application production exercise result through the inlet flow, the performance parameters and the load condition.
In the above-mentioned training verification apparatus for an uninterruptible system, preferably, the simulated traffic module further includes a module for acquiring historical access traffic data of the application according to the environment information; and comparing the background simulation flow with the historical access flow data, and monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the equipment associated with the server when the difference between the background simulation flow and the historical access flow is smaller than a preset difference threshold value.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
The invention has the beneficial technical effects that: the production practice can be carried out under the condition of simulating the production flow, so that the practice result is more suitable for the actual production condition; the service capability reduction condition caused by the upgrading of the application software can be evaluated, and the production time and the production window can be conveniently confirmed; whether system resources have bottlenecks caused by application software upgrading or not, if the system resources have bottlenecks, capacity can be expanded in time; and whether the application software is upgraded to cause load imbalance and whether the network equipment and each server can bear increased flow is beneficial to guiding the smooth production.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, unless otherwise specified, the embodiments and features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
Additionally, the steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions and, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
Referring to fig. 2, a non-stop system drilling verification method provided by the present invention includes:
s201, acquiring server information and a production flow index of an application, generating environment information of the application according to the server information, and generating a flow simulation task according to the production flow index;
s202, initiating background simulation flow to the application according to the environment information and the flow simulation task, and upgrading and installing the application;
s203, monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the server-associated equipment;
s204, obtaining the production drilling result of the application through the inlet flow, the performance parameters and the load condition.
The performance parameters comprise memory use ratio, CPU use ratio and coefficient disk processing efficiency; the entry flow comprises a transaction success flow and a transaction failure flow; the load condition includes access flow and load of each network device in the distributed architecture server. Therefore, the production flow can be simulated in the process of production exercise, the influence of version upgrading installation on the network, the server, the load and the like can be monitored, the reduction degree of the service capacity in the upgrading process can be evaluated, the proper production window and production time can be determined, and guidance opinions can be provided for safe and stable production.
In an embodiment of the present invention, generating the flow simulation task according to the production flow index includes: and converting the production flow index into a query rate index and a response time index, and generating a flow simulation task according to the query rate index and the response time index. Further, monitoring the ingress traffic of the application, the performance parameters of the server, and the load condition of the server-associated device further comprises: acquiring historical access flow data of the application according to the environment information; and comparing the background simulation flow with the historical access flow data, and monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the equipment associated with the server when the difference between the background simulation flow and the historical access flow is smaller than a preset difference threshold value. In the actual process, the simulation production real flow initiates concurrent access to the application software service, the production real flow comes from data obtained by counting the software flow, and then the multithreading high-concurrency simulation production flow initiates access. The concurrency number is gradually increased from 1 before the visit is started, the flow condition is monitored in real time and is continued until the simulation flow is consistent with the production flow, and therefore the initiated flow is consistent with the production.
In an embodiment of the present invention, the performance parameters of the monitoring server include: and acquiring the performance parameters of the server through a Promiex monitoring system, and storing the performance parameters and the identification information of the server into a preset time sequence database according to a time sequence after the performance parameters are associated with the identification information of the server. In practical operation, the monitoring service may use an open source promemeus system, and promemeus has the following characteristics: the multidimensional data model and the flexible query language do not depend on distributed storage, and a single server node is autonomous; time sequence data are acquired in a pull mode based on HTTP, and time sequence data pushing can be carried out through an intermediate gateway; target service objects are discovered through service discovery or static configuration, and various icon and page displays such as Grafana and the like are supported.
In the above embodiment, the basic principle of Prometheus is to periodically capture the state of a monitored component through the HTTP protocol, any component can access monitoring as long as a corresponding HTTP interface is provided, and the HTTP interface that outputs information of the monitored component is called an exporter. The monitoring module can automatically send the exporter to the corresponding server and start the exporter service (the information of CPU, memory, IO, flow and the like of the main acquisition system of the exporter) according to the ip information of the environment server input by the user, then the prometheus can pull the data from the corresponding exporter, and the pulled information can be stored to the self time sequence database according to the time sequence. CPU, memory and IO information collected by the Exporter are used as main information monitored by the server; the acquired flow information is used as main information for flow monitoring; if the servers are deployed in a multi-server and distributed mode, comparing whether the flow of each server is balanced or not, if so, considering that the load is balanced, and if not, considering that the load is unbalanced. The three monitors are collected and stored through prometheus and exporter, and then are used for different monitoring parts, namely flow monitoring, server monitoring and load balancing monitoring. Relationship of three monitoring and overall scheme: the three monitors can ensure normal flow, normal server performance and normal load balance in the drilling process. If one monitoring is abnormal, the whole drilling process is considered to have problems, and the three monitoring are parallel monitoring and data acquisition and analysis are carried out simultaneously.
In an embodiment of the present invention, obtaining a commissioning result of an application through the ingress traffic, the performance parameter, and the load condition further includes: comparing the inlet flow, the performance parameters and the load condition in the commissioning result with a preset alarm threshold respectively, and generating an alarm signal when any data among the inlet flow, the performance parameters and the load condition meets a preset alarm condition; providing the alert signal to a predetermined location.
To facilitate a more clear understanding of the specific application of the above embodiments provided by the present invention, the following description refers to fig. 1 to illustrate the practical application process of the above embodiments, and it should be understood by those skilled in the art that this example is only one application of the embodiments provided by the present invention for convenience of understanding, and is not intended to limit the invention in any way.
S101 registers environment information such as an IP of the application server for subsequent S102 service registration.
S102, the environmental information such as the application software server registered in S101 is registered in a management cluster, and the management cluster can realize health check and dynamic management of server information.
S103 refines the traffic into QPS (Query Per Second, Query rate), response time, and other indicators.
S104, the flow initiating module dynamically pulls the environment information such as the application software server and the like from the registered cluster, performs timing detection, and dynamically updates the environment information once the environment information changes.
S105 represents the generation of the corresponding flow simulation task according to the index of S103.
S106 executes the task of S106, initiating background simulation traffic.
And S107, normally carrying out application software upgrading and installation under the simulation flow.
S108 monitors the change of the background traffic in the upgrading process, where what is monitored is the traffic of the entry, that is, all the traffic of the whole application software.
S109, counting the inlet amount.
S110, the consumption condition of system resources in the upgrading process of the application software is monitored.
S111 refines the system monitoring of S110, including Web, middleware, storage.
And S112, monitoring the load equipment of the application software, and being suitable for distributed deployment, multi-server deployment, multi-park deployment and other applications.
S113 refines the monitoring device of S112, including network device monitoring, traffic monitoring of each server, and the like.
Specifically, in combination with a production drilling scene of the distributed cache system, the above process is applied as follows:
1. according to the production drill plan, the production drill personnel need to register the environmental information such as the IP of the distributed cache system and input the production flow index.
2. The management and control module can register the registered environmental information to the management cluster, the management cluster can detect the health of the environmental information, and meanwhile, the management and control module can refine the flow index into indexes such as QPS and response time.
3. The task module acquires the flow index information from the control module and generates a corresponding flow simulation initiation task script.
4. The flow initiating module firstly obtains the application software environment information from the master-slave cluster, and then obtains the task script from the task module.
5. And when no problem exists in the third step, the flow initiating module executes the task script and simulates the production flow.
6. And under the background of simulating the production flow, the commissioning personnel upgrade and install the normal application software.
7. In the upgrade and installation process of the application software, the simulation flow, the system, the network and the like are inevitably affected, and the flow, the system and the load need to be monitored respectively.
8. The flow monitoring mainly monitors the change condition of the whole simulation flow for the entrance of the application software so as to evaluate the reduction condition of the service capability during the application software upgrading and whether the application software upgrading has problems.
9. The system monitors the system performance of web, middleware and stored equipment when the application software is upgraded, so as to evaluate whether the whole system meets the upgrading condition.
10. The load monitoring mainly monitors whether the pressure and the load of the network equipment are normal during the upgrading of the application software, and the server can support corresponding flow when the flow of each server is changed under the condition of rolling upgrading.
11. And finally, after the production practice is finished, evaluating whether the service capacity change condition, the system resource use condition, the load balance and the like are balanced when the application software is upgraded.
Referring to fig. 3, the present invention further provides a non-stop system drilling verification apparatus, which includes a flow simulation module and a monitoring module; the flow simulation module is used for acquiring server information and production flow indexes of the application, generating environment information of the application according to the server information, and generating a flow simulation task according to the production flow indexes; initiating background simulation flow for the application according to the environment information and the flow simulation task, and upgrading and installing the application; the monitoring module is used for monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the server-associated equipment; and obtaining the application production exercise result through the inlet flow, the performance parameters and the load condition. The simulation flow module also acquires historical access flow data of the application according to the environment information; and comparing the background simulation flow with the historical access flow data, and monitoring the inlet flow of the application, the performance parameters of the server and the load condition of the equipment associated with the server when the difference between the background simulation flow and the historical access flow is smaller than a preset difference threshold value.
The flow simulation system comprises a flow simulation module, a task module and a flow simulation module, wherein the flow simulation module can comprise a task module, the task module is used for converting the production flow index into a query rate index and a response time index, and generating a flow simulation task according to the query rate index and the response time index; specifically, in actual work, the traffic task may be refined into indexes such as QPS, response time, Throughput (TPS), QPS, and concurrency number, so as to quantize the traffic simulation task to generate corresponding traffic data to complete traffic simulation, in this process, a person skilled in the art may select and use according to actual needs, for example, using query rate index and response time as quantization indexes, or using concurrency number as quantization indexes, which may be determined by drilling requirements, and thus, detailed description is omitted here.
Specifically referring to fig. 4, the application structure of the non-stop system drilling verification apparatus provided by the present invention in actual work may be composed of the following components:
the simulation flow module is mainly used for simulating production flow during production and practice of application software, wherein 001 is a management and control module and is used for registering application software environment information and refining the production flow to indexes such as QPS (quick Path System), response time and the like, 002 is a registration cluster and is used for dynamically managing the application software environment information, 003 is a task module and is used for generating a simulation flow script according to the index information, 004 is a flow initiating module and is used for executing the task script after acquiring the application software environment information from the registration cluster and acquiring the task script by the task module and initiating simulation flow access to the application software; when the simulation flow reaches the flow same as the production flow, the commissioning personnel normally carries out the installation and the upgrade of the application software, and the monitoring is synchronously carried out in the installation and the upgrade process; 005,006,007, belonging to the monitoring module of the invention, is used for monitoring relevant data in the process of commissioning, wherein 005 is flow monitoring for monitoring whether the flow of the whole application software changes, more precisely, whether the simulation flow drops in the process of application software installation and upgrade, and how large the drop amplitude is, 006 is system monitoring for monitoring the front-end server, middleware, storage and other systems of the application software, 007 is load monitoring for monitoring the network load equipment of the application software and the flow condition of each server, and exactly, if rolling upgrade is adopted in the upgrade process, the network load equipment and part of servers are bound to bear larger flow impact. The detailed description is as follows:
001 is a management and control module, which registers environment information such as an application software server to the 002 registration cluster, generates indexes such as a QPS and a response time for refining traffic, and uses the indexes to subsequently generate a task script. 002 is a registered cluster, which is used for dynamically managing environment information such as application software servers and the like, and can ensure the health and availability of the application software environment. And 003, a task module, configured to generate a corresponding analog flow task script according to the index information output by 001. Thetraffic initiating module 004 acquires environment information such as an application software server from the 002, and then acquires a simulation traffic task script from the 003 to execute the task script. 005 is a flow monitoring module, which is used to monitor the change of the analog flow when the application software is installed and upgraded, where the analog flow refers to the whole flow. And 006 is a system monitoring module, which is used for monitoring the system performance of nodes such as a front-end server, middleware, storage and the like when the application software is installed and upgraded. 007 is a load monitoring module, which is used to monitor the performance consumption of the network load device when the application software is installed and upgraded, and a traffic module of each server of the application software, to be precise, when the application software is updated in a rolling manner, after the original traffic inevitably passes through the load, the traffic is distributed to the servers that are not upgraded, and this module can monitor the load condition of the traffic.
The non-stop system drilling verification method and the device provided by the invention can be used for performing production drilling under the condition of simulating production flow, so that the drilling result is more suitable for the actual production condition; the service capability reduction condition caused by the upgrading of the application software can be evaluated, and the production time and the production window can be conveniently confirmed; whether system resources have bottlenecks caused by application software upgrading or not, if the system resources have bottlenecks, capacity can be expanded in time; and whether the application software is upgraded to cause load imbalance and whether the network equipment and each server can bear increased flow is beneficial to guiding the smooth production.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the computer program.
The present invention also provides a computer-readable storage medium storing a computer program for executing the above method.
As shown in fig. 5, theelectronic device 600 may further include:communication module 110,input unit 120,audio processing unit 130,display 160,power supply 170. It is noted that theelectronic device 600 does not necessarily include all of the components shown in fig. 5; furthermore, theelectronic device 600 may also comprise components not shown in fig. 5, which may be referred to in the prior art.
As shown in fig. 5, thecentral processor 100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, thecentral processor 100 receiving input and controlling the operation of the various components of theelectronic device 600.
Thememory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information relating to the failure may be stored, and a program for executing the information may be stored. And thecentral processing unit 100 may execute the program stored in thememory 140 to realize information storage or processing, etc.
Theinput unit 120 provides input to thecpu 100. Theinput unit 120 is, for example, a key or a touch input device. Thepower supply 170 is used to provide power to theelectronic device 600. Thedisplay 160 is used to display an object to be displayed, such as an image or a character. The display may be, for example, an LCD display, but is not limited thereto.
Thememory 140 may be a solid state memory such as Read Only Memory (ROM), Random Access Memory (RAM), a SIM card, or the like. There may also be a memory that holds information even when power is off, can be selectively erased, and is provided with more data, an example of which is sometimes called an EPROM or the like. Thememory 140 may also be some other type of device.Memory 140 includes buffer memory 141 (sometimes referred to as a buffer). Thememory 140 may include an application/function storage section 142, and the application/function storage section 142 is used to store application programs and function programs or a flow for executing the operation of theelectronic device 600 by thecentral processing unit 100.
Thememory 140 may also include adata store 143, thedata store 143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by the electronic device. Thedriver storage portion 144 of thememory 140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging application, address book application, etc.).
Thecommunication module 110 is a transmitter/receiver 110 that transmits and receives signals via anantenna 111. The communication module (transmitter/receiver) 110 is coupled to thecentral processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality ofcommunication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, may be provided in the same electronic device. The communication module (transmitter/receiver) 110 is also coupled to aspeaker 131 and amicrophone 132 via anaudio processor 130 to provide audio output via thespeaker 131 and receive audio input from themicrophone 132 to implement general telecommunications functions.Audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, anaudio processor 130 is also coupled to thecentral processor 100, so that recording on the local can be enabled through amicrophone 132, and so that sound stored on the local can be played through aspeaker 131.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.