Pressure test method, system and device, computer equipment and storage medium

By automatically adjusting the concurrency number and resource configuration of the virtual machine using a controller on the cloud computing platform, the adaptive pressurization test of the load balancer is achieved, which solves the performance problems of a single server when handling high concurrency, and improves the testing efficiency and accuracy sex.

CN119166480APending Publication Date: 2024-12-20JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411228000.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

In the case of a large number of users with high concurrent access requests, a single server cannot process all requests, resulting in performance degradation, response delay and system crashes. Traditional stress testing methods rely on manual operations, are time-consuming and labor-intensive and difficult to effectively discover performance bottlenecks.

Method used

Design an adaptive pressure-pressure test method, connect the controller to the cloud computing platform and the virtual machine, automatically obtain the network performance indicator value, adjust the concurrency number and virtual machine cluster scale according to the indicator value and resource utilization rate, and realize the load Automatic testing of the equalizer.

Benefits of technology

It improves the efficiency and accuracy of stress testing, quickly obtains the optimal value of network performance, reduces manual intervention, automates the processing of complex resource allocation and scheduling, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166480A_ABST
    Figure CN119166480A_ABST
Patent Text Reader

Abstract

The invention relates to a pressure testing method, system and device, computer equipment and a storage medium. The method comprises the steps of obtaining a current network performance index value of a second type of virtual machines, when the current network performance index value is larger than a previous network performance index value, increasing the concurrency number of a first type of virtual machines, obtaining a new network performance index value again, and when the new network performance index value is smaller than or equal to the previous network performance index value, increasing the concurrency number of the second type of virtual machines. And obtaining a resource utilization rate of the first type of virtual machines, and when the resource utilization rate of the first type of virtual machines is smaller than or equal to a preset threshold value, determining a test result of the pressure test according to the new network performance index value. By adopting the method, self-adaptive pressurization can be realized, so that the test efficiency of the pressure test is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a stress testing method, system, device, computer equipment and storage medium. Background Art

[0002] Under the circumstance of high concurrent access requests from massive users, a single server cannot handle all requests, resulting in performance degradation, response delays, and even system crashes, which seriously affects the user experience. Load balancing technology in cloud computing can help cloud platforms distribute network traffic and requests to multiple servers or virtual machine instances, thereby achieving balanced resource allocation, ensuring that each resource in the system is fully utilized, avoiding resource overload or shortage, and improving system performance, reliability, and scalability.

[0003] Load balancing technology can be implemented through a load balancer, which handles traffic distribution and load balancing related functions. The scale of the load balancer and the type of networking will affect the performance indicators of the load balancer. Therefore, it is necessary to traverse the stress data under each combination.

[0004] In traditional stress testing, people usually manually observe stress data based on test results and empirical data, explore performance bottlenecks, and find performance peaks. However, due to the large number of test cases, it takes up a lot of manpower and time. In addition, load balancing relies on many resources, so it is difficult to rely solely on manual exploration. Summary of the invention

[0005] Based on this, it is necessary to provide a pressure testing method, system, device, computer equipment and storage medium that can achieve adaptive pressurization in response to the above technical problems.

[0006] A stress testing method is applied to a control machine, the control machine is connected to a first-class virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second-class virtual machine, the cloud computing platform is also provided with at least one third-class virtual machine, the first-class virtual machine is used to send a data request to the second-class virtual machine, the second-class virtual machine is used to distribute the data request to the third-class virtual machine for processing, the method comprises:

[0007] Obtain the current network performance indicator value of the second type of virtual machine;

[0008] When the current network performance index value is greater than the previous network performance index value, the concurrency number of the first type of virtual machines is increased, and a new network performance index value is obtained again;

[0009] When the new network performance index value is less than or equal to the previous network performance index value, the resource utilization rate of the first type of virtual machine is obtained; when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold, the test result of the stress test is determined according to the new network performance index value.

[0010] In one embodiment, when the current network performance index value is greater than the previous network performance index value, increasing the concurrency number of the first type of virtual machines and re-obtaining a new network performance index value includes:

[0011] When the current network performance index value is greater than the previous network performance index value, the concurrency number of the first type of virtual machines is increased according to a preset gradient, and a new network performance index value is obtained again after the concurrency number is increased;

[0012] The first type of virtual machine is a virtual machine cluster, and the stress testing method also includes:

[0013] When the resource usage rate of the first type of virtual machine is greater than a preset threshold, the virtual machine cluster is expanded to obtain the network performance indicator value of the second type of virtual machine after the expansion;

[0014] When the network performance index value of the second type of virtual machine after capacity expansion is less than or equal to the previous network performance index value, the test result is determined according to the network performance index value of the second type of virtual machine before capacity expansion;

[0015] When the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, return to the step of expanding the virtual machine cluster to obtain the network performance index value of the second type of virtual machine after expansion.

[0016] In one embodiment, the current network performance indicator value of the second type of virtual machine includes any one or more of the following:

[0017] The number of new connections, maximum number of connections, and throughput.

[0018] In one embodiment, the stress testing method further includes:

[0019] In response to the start instruction of the stress test, extract the parameters in the start instruction, and send a resource creation request to the cloud computing platform according to the parameters, so that the cloud computing platform creates the second type virtual machine and the third type virtual machine according to the resource creation request, and the parameters include any one or more of the following parameters:

[0020] Load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machines.

[0021] In one embodiment, a load balancing service is running on the second type of virtual machine, the second type of virtual machine includes a primary virtual machine, and the method further includes:

[0022] Modify the socket configuration items of the load balancing service according to the load balancing specifications, and restart the load balancing service;

[0023] The node where the master virtual machine of the restarted second type virtual machine is located is obtained, and the monitoring script of the current network performance index value is uploaded to the node where the master virtual machine is located to monitor the current network performance index value of the master virtual machine.

[0024] In one embodiment, the stress testing method further includes:

[0025] Monitor the progress of resource creation on the cloud computing platform;

[0026] When it is monitored that the resource creation is completed, a configuration file is sent to the first type virtual machine and the third type virtual machine to control the first type virtual machine and the third type virtual machine to perform resource configuration.

[0027] A stress testing system includes a control machine, a first-class virtual machine and a cloud computing platform, wherein the control machine is connected to the first-class virtual machine and the cloud computing platform respectively, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second-class virtual machine, and the cloud computing platform is also provided with at least one third-class virtual machine, wherein:

[0028] The first type of virtual machine is used to send a data request to the second type of virtual machine;

[0029] The second type of virtual machine is used to distribute data requests to the third type of virtual machine for processing;

[0030] The control machine is used to obtain the current network performance index value of the second type of virtual machine, and when the current network performance index value is greater than the previous network performance index value, increase the concurrency number of the first type of virtual machine and re-acquire a new network performance index value;

[0031] The control machine is also used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold.

[0032] A stress testing device is applied to a control machine, the control machine is connected to a first-class virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second-class virtual machine, the cloud computing platform is also provided with at least one third-class virtual machine, the first-class virtual machine is used to send a data request to the second-class virtual machine, the second-class virtual machine is used to distribute the data request to the third-class virtual machine for processing, and the method includes:

[0033] An acquisition module, used to obtain the current network performance indicator value of the second type of virtual machine;

[0034] An additional module is used to increase the concurrency of the first type of virtual machines and re-acquire a new network performance index value when the current network performance index value is greater than the previous network performance index value;

[0035] The output module is used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold.

[0036] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0037] Obtain the current network performance indicator value of the second type of virtual machine;

[0038] When the current network performance index value is greater than the previous network performance index value, the concurrency number of the first type of virtual machines is increased, and a new network performance index value is obtained again;

[0039] When the new network performance index value is less than or equal to the previous network performance index value, the resource utilization rate of the first type of virtual machine is obtained; when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold, the test result of the stress test is determined according to the new network performance index value.

[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0041] Obtain the current network performance indicator value of the second type of virtual machine;

[0042] When the current network performance index value is greater than the previous network performance index value, the concurrency number of the first type of virtual machines is increased, and a new network performance index value is obtained again;

[0043] When the new network performance index value is less than or equal to the previous network performance index value, the resource utilization rate of the first type of virtual machine is obtained; when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold, the test result of the stress test is determined according to the new network performance index value.

[0044] The above-mentioned stress testing method, system, device, computer equipment and storage medium have an additional control machine in terms of hardware compared to traditional technologies. The control machine is connected to the cloud computing platform and the first type of virtual machine respectively, and the control machine is used to exchange data with the cloud computing platform and the first type of virtual machine. In terms of software design, the network performance index value of the second type of virtual machine is obtained by the control machine in a loop for multiple times, and each network performance index value obtained is compared with the previous one. According to the comparison result and the resource utilization rate of the first type of virtual machine, the optimal value of the network performance index value of the second type of virtual machine is determined to achieve stress testing of the second type of virtual machine. It can be seen that the use of this application can realize adaptive pressure application of the first type of virtual machine during the stress test, thereby realizing rapid acquisition of the optimal value of the network performance index of the second type of virtual machine, thereby improving the efficiency of the stress test. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 A schematic diagram of a pressure testing method according to an embodiment of the present invention;

[0046] Figure 2 A schematic diagram of a pressure testing method according to another embodiment;

[0047] Figure 3 is a structural block diagram of a pressure testing system in one embodiment;

[0048] Figure 4 A network diagram of a pressure testing system in an embodiment;

[0049] Figure 5 is a structural block diagram of a pressure testing device in one embodiment;

[0050] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] In one embodiment, Figure 1 As shown, a stress testing method is provided, the method is applied to a control machine, the control machine is connected to a first type of virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second type of virtual machine, the cloud computing platform is also provided with at least one third type of virtual machine, the first type of virtual machine is used to send a data request to the second type of virtual machine, the second type of virtual machine is used to distribute the data request to the third type of virtual machine for processing, the stress testing method includes:

[0053] Step S11, obtaining the current network performance index value of the second type of virtual machine;

[0054] Step S12, when the current network performance index value is greater than the previous network performance index value, increasing the number of concurrent virtual machines of the first type, and re-obtaining a new network performance index value;

[0055] Step S13, when the new network performance index value is less than or equal to the previous network performance index value, obtain the resource utilization rate of the first type of virtual machine; when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold, determine the test result of the stress test according to the new network performance index value.

[0056] The control machine may be a physical machine or a virtual machine, and is used to control the adaptive pressure increase of the first type of virtual machines.

[0057] The cloud computing platform may be an OpenStack platform, which is an open source cloud computing management platform project and a combination of a series of software open source projects. The OpenStack platform provides a set of scalable tools for building, managing and expanding computing, storage, network and other resources.

[0058] The load balancing service component may be an Octavia component, which is an open source project and a component in OpenStack that is specifically responsible for load balancing services. Octavia provides highly available TCP (Transmission Control Protocol), HTTP (Hypertext Transfer Protocol) and HTTPS (Hypertext Transfer Protocol Secure) load balancing services through a combination of HAProxy (load balancing software) and Keepalived (load balancing software). It supports different network types and can apply to create different specifications as needed.

[0059] The first type of virtual machine may be a stress machine used to pressurize the second type of virtual machine to implement stress testing on the second type of virtual machine.

[0060] The second type of virtual machine can be an Amphora virtual machine created by the Octavia component. Amphora is a virtual machine instance used in Octavia to perform load balancing, processing traffic distribution and load balancing related functions. In this application, the second type of virtual machine is a test object for stress testing, which is used to receive data requests sent by the first type of virtual machine and distribute the data requests to the third type of virtual machine for processing.

[0061] The third type of virtual machine may be a backend member in the cloud computing platform, which is used to receive data requests distributed by the Amphora virtual machine and process the data requests.

[0062] The network performance index value is the value of the index for measuring network performance, and is specifically used to measure the performance of the second type of virtual machine, such as the response speed and data processing efficiency. The current network performance index value is the network performance index value obtained in the current round, and the new network performance index value refers to the network performance index value obtained in the new round. Specifically, the current network performance index value may include the number of connections, bandwidth, latency, throughput, PPS (Packet Per Second, i.e., the number of packets transmitted per second), packet loss rate, retransmission rate, etc.

[0063] The concurrency of a first-class virtual machine refers to the number of concurrent threads on a single first-class virtual machine.

[0064] The resource usage of the first type of virtual machine may include the usage of a CPU (Central Processing Unit) and memory.

[0065] Specifically, the control machine monitors the network performance index value of the second type of virtual machine in multiple cycles, and each network performance index value obtained is compared with the network performance index value obtained last time. When it is greater than the network performance index value obtained last time, the concurrency number of the first type of virtual machine is increased. After the increase, a new round of network performance index values ​​(new network performance index values) are obtained again, and they are continued to be compared with the network performance index value obtained last time. When the new network performance index value obtained is less than or equal to the network performance index value obtained last time, the resource utilization rate of the first type of virtual machine is obtained.

[0066] Furthermore, when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold, the test result of the stress test is determined according to the new network performance index value, wherein the test result here can be the optimal value of the network performance index value, and the optimal value here refers to the peak value of the network performance index value, that is, the present application obtains the peak value of the network performance index value of the second type of virtual machine as the test result and outputs it.

[0067] In one of the embodiments, when the current network performance index value is greater than the previous network performance index value, the concurrency of the first type of virtual machine is increased, and a new network performance index value is obtained again, including: when the current network performance index value is greater than the previous network performance index value, the concurrency of the first type of virtual machine is increased according to a preset gradient, and a new network performance index value is obtained again after the concurrency is increased. The first type of virtual machine is a virtual machine cluster. The stress measurement method may also include: when the resource utilization rate of the first type of virtual machine is greater than a preset threshold, the virtual machine cluster is expanded, and the network performance index value of the second type of virtual machine after expansion is obtained; when the network performance index value of the second type of virtual machine after expansion is less than or equal to the previous network performance index value, the test result is determined according to the network performance index value of the second type of virtual machine before expansion; when the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, returning to the step of expanding the virtual machine cluster and obtaining the network performance index value of the second type of virtual machine after expansion.

[0068] The preset gradient refers to the increase step of the number of concurrent connections. Expanding the capacity of a virtual machine cluster refers to increasing the number of virtual machines in the virtual machine cluster, and one cluster node can be added each time the capacity is expanded.

[0069] Determining the test result according to the network performance indicator value of the second type virtual machine before capacity expansion may specifically include: determining the network performance indicator value of the second type virtual machine before capacity expansion as the test result as the optimal value of the network performance indicator of the second type virtual machine.

[0070] Please refer to Figure 2 , Figure 2 FIG. 1 is a flow chart of a control machine controlling a pressure test in an embodiment. Figure 2 In the process, the control machine starts the load balancing function in advance, performs resource scheduling and configuration delivery. Furthermore, the control machine executes the stress script startup command in parallel, initializes the number of first-class virtual machines to m, the number of concurrency of each first-class virtual machine to n, and stresses the load balancing service with n concurrency in parallel within the m first-class virtual machines.

[0071] Furthermore, the control machine obtains the initial network index value R1, and then the concurrency number increases by gradient t each time, obtains the current network index value Ri, and determines whether Ri is greater than the previous network index value Ri-1. If it is greater, it returns to the step of increasing the concurrency number n according to gradient t. If it is not greater, it further determines whether the resource utilization rate of the first type of virtual machine has reached the preset threshold. Specifically, it can be divided into the following two situations:

[0072] First, if the resource usage rate of the first type of virtual machine does not reach the preset threshold, that is, the idle resources are sufficient, then the network index value at this time is considered to be the optimal value of the network index value (that is, the first type of virtual machine is not a performance bottleneck, and increasing the number of concurrent first type virtual machines can no longer cause a linear increase in the network index value);

[0073] Second, if the resource utilization rate of the first type of virtual machine exceeds the preset threshold (that is, there is a bottleneck in the first type of virtual machine), the script automatically calls the API (Application Programming Interface) service to elastically expand the virtual machine cluster, expanding one cluster node at a time, and applying pressure again to obtain a new network indicator value until the new network indicator value no longer increases. The network indicator value at this time is considered to be the peak value, and the R peak in the figure is the peak value of the network indicator value.

[0074] It can be seen that in order to obtain accurate test data in this application, it is necessary to first eliminate the performance interference of the first-class virtual machine itself, and then horizontally expand the concurrency number of a single first-class virtual machine, and then gradually expand the scale of the virtual machine cluster (that is, the number of first-class virtual machines), and gradually explore and obtain the peak value of the network performance indicators.

[0075] The beneficial effect of this embodiment is: due to the insufficient concurrent pressure of a single first-class virtual machine, it will become a performance bottleneck. Therefore, in order to obtain accurate test data, it is necessary to first eliminate the performance interference of the first-class virtual machine itself. Therefore, in the software design of this application, the network performance index value of the second-class virtual machine is collected multiple times, and the concurrency of a single first-class virtual machine (pressurizer) is first horizontally expanded according to the network performance index value. When the concurrency number cannot cause the increase of the network performance index, the number of pressurizers is expanded to achieve a gradual approach to the optimal value of the network performance index. It is necessary to first horizontally expand the concurrency of a single pressurizer, and then gradually expand the scale of the pressurizer cluster to gradually explore and obtain the performance peak.

[0076] In addition, hardware improvements include the introduction of a control machine, which enables data exchange between the control machine, the cloud computing platform, and the first-class virtual machines to achieve resource scheduling, configuration distribution, and stress detection.

[0077] By obtaining the current network indicator value of the second-class virtual machine, adjusting the concurrency number of a single first-class virtual machine based on the current network indicator value, and then adjusting the size of the virtual machine cluster again based on the resource utilization rate of the first-class virtual machine, multi-dimensional adjustments are made to continuously approach the peak value of the network performance indicator of the second-class virtual machine, thereby improving the test efficiency of the stress test of the second-class virtual machine.

[0078] In one of the embodiments, the current network performance indicator value of the second type of virtual machine includes any one or more of the following: the number of newly created connections, the maximum number of connections, and the throughput.

[0079] Among them, the number of new connections (Connection Per Second, CPS) is a measurement indicator used to evaluate the number of new connections that a system or network can establish per unit time.

[0080] The maximum number of connections refers to the maximum number of connections that a database or network device can accept and process simultaneously.

[0081] Throughput refers to the amount of data (measured in bits, bytes, packets, etc.) successfully transmitted per unit time for a network, device, port, virtual circuit or other facility.

[0082] In one of the embodiments, the stress testing method may further include: responding to a startup instruction of the stress test, extracting parameters in the startup instruction, and sending a resource creation request to the cloud computing platform according to the parameters, so that the cloud computing platform creates a second type of virtual machine and a third type of virtual machine according to the resource creation request, the parameters including any one or more of the following parameters: load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machine.

[0083] The above parameters refer to the parameters carried in the startup instruction, which are used to instruct the cloud computing platform to create the resources required for the stress test. The resources required for the stress test may include load balancing, listeners, resource pools and backend members, and first-class virtual machine resources.

[0084] Specifically, the control machine starts the stress test of the second type of virtual machine with one click through the command line. The parameters carried by the start command may include basic parameters such as load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machine. The first type of virtual machine will also be created during the command start process.

[0085] Furthermore, after the stress script is started, it interacts with the cloud computing platform through the API of the load balancing service component to realize automatic scheduling to create the load balancing, listener, resource pool and third-class virtual machine and first-class virtual machine resources required for parameter transmission and wait for the resource status to be created.

[0086] The beneficial effect of this embodiment is that it can realize automatic scheduling of resources and automatic construction of various virtual machines.

[0087] In one of the embodiments, a load balancing service is running on the second type of virtual machine, and the second type of virtual machine includes a master virtual machine. The stress test also includes: modifying the Socket configuration items of the load balancing service according to the load balancing specifications, and restarting the load balancing service, obtaining the node where the master virtual machine of the second type of virtual machine is located after the restart, and uploading the monitoring script of the current network performance index value to the node where the master virtual machine is located to monitor the current network performance index value of the master virtual machine.

[0088] Among them, the second type of virtual machine is built using an active-standby architecture, including a primary virtual machine and a standby virtual machine. In a virtualized environment, the active-standby architecture is a common high availability and fault tolerance design. In the active-standby architecture, there is a primary virtual machine instance responsible for handling the main workload, while one or more standby virtual machine instances are in standby state, ready to take over when the primary instance fails. This design can ensure service continuity and reliability.

[0089] The load balancing service here may be haproxy, which is a free and open source software written in C language, and provides high availability, load balancing, and application proxy based on TCP and HTTP.

[0090] Socket configuration mainly refers to the setting and adjustment of sockets to ensure that network applications can effectively transmit and communicate data. Socket configuration items can include configuration items for socket creation (number of creations), connection, data transmission and reception, disconnection, and socket deletion.

[0091] The load balancing specification may specifically include the CPU and memory related data of the virtual machine, such as the number of CPUs (VCPUs) of the virtual machine.

[0092] Specifically, the present application modifies the Socket configuration items of the load balancing service according to the load balancing specification, which may include: modifying the number of Sockets to be consistent with the number of VCPUs in the load balancing specification.

[0093] Furthermore, after modifying the socket configuration item, the load balancing service needs to be restarted. Since the host of the second type of virtual machine will switch between the master and the standby after restarting the load balancing service, it is necessary to re-acquire the node where the master virtual machine of the second type of virtual machine is located, so as to upload the monitoring script of the network performance index to the node where the master virtual machine of the second type of virtual machine is located. The monitoring script of the network performance index is used to monitor the network performance index of the master virtual machine of the second type of virtual machine to obtain the network performance index value of the master virtual machine. Among them, the master virtual machine of the second type of virtual machine is the object of stress test.

[0094] Among them, virtual machine master-slave switching means that in a virtual machine environment, when the primary virtual machine fails or needs maintenance, the services and data running on the primary virtual machine can be automatically and quickly migrated to the backup virtual machine to ensure service continuity and data security.

[0095] In the present application, the current network performance index value of the second type virtual machine is obtained, which can be specifically achieved by: uploading the monitoring script of the network performance index to the node where the host of the second type virtual machine is located, so as to monitor the current network performance index value corresponding to the host of the second type virtual machine in real time.

[0096] The beneficial effect of this embodiment is that the configuration file of the second type of virtual machine is automatically sent to automatically configure the second type of virtual machine.

[0097] In one of the embodiments, the above-mentioned stress testing method may also include: monitoring the resource creation progress of the cloud computing platform, and when monitoring that the resource creation is completed, sending a configuration file to the first type virtual machine and the third type virtual machine to control the resource configuration of the first type virtual machine and the third type virtual machine.

[0098] Among them, the resource creation progress refers to the cloud computing platform's creation progress of load balancing (equivalent to the second type of virtual machine in this application), listeners, resource pools, third type of virtual machines, and first type of virtual machine resources.

[0099] Further, when monitoring that the resource creation is completed, a configuration file is sent to the first type virtual machine and the third type virtual machine to control the first type virtual machine and the third type virtual machine to perform resource configuration. The configuration file specifically includes configuration items related to various resources.

[0100] Specifically, for the configuration of the third-class virtual machine, Nginx configuration can be sent in batches, each third-class virtual machine can be configured with mutual trust, and each configuration file can be automatically updated through a script. In stress testing, a small page test is usually used to test the number of new connections, and a large page test is used to test throughput. Therefore, stress tests of different protocol items require batch sending of commands to replace the original configuration files of the third-class virtual machine and restart the Nginx service.

[0101] The configuration of the first type of virtual machines can be sent in batches. The first type of virtual machines need to configure environment variables and install test tools. The configuration file (i.e., resource configuration script) sent by the control machine can realize batch configuration of the first type of virtual machines with one click.

[0102] In this application, after the configuration is completed, the stress test can be performed.

[0103] The beneficial effects of this embodiment are: realizing automatic configuration and distribution of first-class virtual machines, second-class virtual machines and third-class virtual machines, realizing automatic configuration of various types of virtual machines, solving the problems of complex resource dependence, large number of manual configuration items, and complicated stress testing process during stress testing, greatly liberating manpower and improving testing efficiency.

[0104] In one of the embodiments, the stress testing method may further include: sending back and summarizing the test results.

[0105] Specifically, after the control machine detects that the network performance index has reached the optimal value, it pulls the log to the control machine, and automatically generates a performance index comparison chart (referring to the comparison chart of network performance index obtained each time) based on the concurrency number and the scale (such as the number) of the first-class virtual machines. At the same time, the stress testing tool logs of each first-class virtual machine in the virtual machine cluster are pulled, and key data such as QPS (Queries Per Second) and latency are analyzed for summary display.

[0106] In one embodiment, Figure 3 As shown, a stress testing system is provided, including a control machine, a first type virtual machine and a cloud computing platform, the control machine is connected to the first type virtual machine and the cloud computing platform respectively, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second type virtual machine, and the cloud computing platform is also provided with at least one third type virtual machine, wherein,

[0107] The first type of virtual machine is used to send a data request to the second type of virtual machine;

[0108] The second type of virtual machine is used to distribute data requests to the third type of virtual machine for processing;

[0109] The control machine is used to obtain the current network performance index value of the second type of virtual machine, and when the current network performance index value is greater than the previous network performance index value, increase the concurrency number of the first type of virtual machine and re-acquire a new network performance index value;

[0110] The control machine is also used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold.

[0111] Specifically, the first-class virtual machine here is a virtual machine cluster. Since the concurrency pressure of a single first-class virtual machine is insufficient and will become a performance bottleneck, the pressure is provided by the virtual machine cluster. In order to obtain accurate test data, it is necessary to eliminate the performance interference of the first-class virtual machine itself, first horizontally expand the number of concurrency of a single first-class virtual machine, and then gradually expand the scale of the virtual machine cluster (that is, the number of first-class virtual machines), and gradually explore and obtain the peak value of network performance indicators.

[0112] In this application, the first type of virtual machine is a virtual machine that is automatically created and scheduled by the cloud computing platform. The first type of virtual machine exclusively occupies the computing node, and its network is connected to the load balancing management network. The first type of virtual machine is used to send data requests to the second type of virtual machine, and exert pressure on the second type of virtual machine by sending data requests.

[0113] The second type of virtual machine is used to distribute the concurrent traffic of the first type of virtual machine to each third type of virtual machine for data processing according to a specified policy.

[0114] The control machine, as the control plane, is the control center of the entire system. The control machine and the control node management network are connected, and are responsible for resource creation and scheduling, configuration distribution, stress detection, and performance collection and transmission. Among them, resource creation and scheduling specifically refers to the creation of resources such as load balancing, third-class virtual machines, and first-class virtual machines. Configuration distribution refers to the distribution of configuration files for various virtual machines. Stress detection refers to monitoring the stress of first-class virtual machines, adjusting the number of concurrency or elastic expansion based on the stress. Performance collection and transmission refers to the distribution of performance scripts, the collection and aggregation of performance resources, and performance comparison.

[0115] Please refer to Figure 4 , Figure 4 In one embodiment, the network diagram of the stress testing system. The network diagram of the stress testing system includes load balancing resource pool members, a control machine, a second-class virtual machine, a stress machine cluster, and a load balancing management network, wherein the stress machine is a first-class virtual machine in this application. Vm1, Vm2, Vm3, and Vm4 in the load balancing resource pool members are respective third-class virtual machines. Geneve and VLAN are two different network technologies. Geneve is a network virtualization protocol designed to provide network encapsulation in a virtualized environment. VLAN (Virtual Local Area Network) is a technology that logically divides a physical network into multiple broadcast domains.

[0116] Further, the second type virtual machine (primary) refers to the primary virtual machine, and the second type virtual machine (standby) refers to the standby virtual machine. The pressure cluster refers to a virtual machine cluster composed of various first type virtual machines. Computer refers to a computing node.

[0117] Specifically, after the load balancing is created, the primary and backup virtual machines of the second type of virtual machine will be automatically created. The second type of virtual machine actually carries the load balancing service and deploys the haproxy service to forward traffic to the outside. The control machine manages and configures the second type of virtual machine through the load balancing management network. The second type of virtual machine is the exclusive computing node of the machine to be tested. In this stress test system, the actual stress test object is the primary virtual machine of the second type of virtual machine.

[0118] Create multiple groups of members under the load balancing resource pool. The members here are third-class virtual machines. Each group of members exclusively occupies a computing node. Its network is connected to the load balancing network. Nginx service is started inside the member. During the pressure cluster pressure process, the second-class virtual machine will distribute the pressure machine concurrent traffic to each third-class virtual machine according to the specified strategy.

[0119] In one embodiment, Figure 5 As shown, a stress testing device is provided, which is applied to a control machine, the control machine is connected to a first type of virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second type of virtual machine, the cloud computing platform is also provided with at least one third type of virtual machine, the first type of virtual machine is used to send a data request to the second type of virtual machine, the second type of virtual machine is used to distribute the data request to the third type of virtual machine for processing, and the device includes:

[0120] An acquisition module 51 is used to acquire the current network performance indicator value of the second type of virtual machine;

[0121] An increasing module 52 is used to increase the concurrency number of the first type of virtual machines and re-acquire a new network performance index value when the current network performance index value is greater than the previous network performance index value;

[0122] The output module 53 is used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to the preset threshold.

[0123] In one embodiment, the adding module 52 can increase the concurrency of the first type of virtual machines according to a preset gradient when the current network performance index value is greater than the previous network performance index value, and re-acquire a new network performance index value after increasing the concurrency. The first type of virtual machine is a virtual machine cluster. The adding module 52 can also expand the virtual machine cluster when the resource utilization rate of the first type of virtual machine is greater than a preset threshold, and obtain the network performance index value of the second type of virtual machine after expansion. When the network performance index value of the second type of virtual machine after expansion is less than or equal to the previous network performance index value, determine the test result according to the network performance index value of the second type of virtual machine before expansion. When the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, return to the step of expanding the virtual machine cluster and obtaining the network performance index value of the second type of virtual machine after expansion.

[0124] In one of the embodiments, the current network performance indicator value of the second type of virtual machine includes any one or more of the following: the number of newly created connections, the maximum number of connections, and the throughput.

[0125] In one embodiment, the acquisition module 51 may also extract parameters in the startup instruction in response to the stress test startup instruction, and send a resource creation request to the cloud computing platform according to the parameters, so that the cloud computing platform creates the second type virtual machine and the third type virtual machine according to the resource creation request, and the parameters include any one or more of the following parameters:

[0126] Load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machines.

[0127] In one of the embodiments, a load balancing service is running on the second type of virtual machine, and the second type of virtual machine includes a main virtual machine. The acquisition module 51 can also modify the Socket configuration items of the load balancing service according to the load balancing specifications, and restart the load balancing service, obtain the node where the main virtual machine of the second type of virtual machine is located after the restart, and upload the monitoring script of the current network performance indicator value to the node where the main virtual machine is located to monitor the current network performance indicator value of the main virtual machine.

[0128] In one of the embodiments, the acquisition module 51 can also monitor the resource creation progress of the cloud computing platform. When it is monitored that the resource creation is completed, a configuration file is sent to the first type virtual machine and the third type virtual machine to control the resource configuration of the first type virtual machine and the third type virtual machine.

[0129] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement the stress testing method.

[0130] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining a current network performance index value of a second type of virtual machine; when the current network performance index value is greater than a previous network performance index value, increasing the concurrency of a first type of virtual machine, and re-obtaining a new network performance index value; when the new network performance index value is less than or equal to the previous network performance index value, obtaining a resource utilization rate of the first type of virtual machine; when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold, determining a test result of a stress test according to the new network performance index value.

[0131] In one of the embodiments, when the processor executes a computer program to implement the above-mentioned step of increasing the concurrency of the first type of virtual machine and re-acquiring a new network performance index value when the current network performance index value is greater than the previous network performance index value, the following steps are specifically implemented: when the current network performance index value is greater than the previous network performance index value, the concurrency of the first type of virtual machine is increased according to a preset gradient, and a new network performance index value is re-acquired after the concurrency is increased, and the first type of virtual machine is a virtual machine cluster. When the processor executes the computer program, the following steps are specifically implemented: when the resource utilization rate of the first type of virtual machine is greater than a preset threshold, the virtual machine cluster is expanded, and the network performance index value of the second type of virtual machine after expansion is obtained; when the network performance index value of the second type of virtual machine after expansion is less than or equal to the previous network performance index value, the test result is determined according to the network performance index value of the second type of virtual machine before expansion; when the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, the step of returning to expanding the virtual machine cluster and obtaining the network performance index value of the second type of virtual machine after expansion is returned.

[0132] In one of the embodiments, the current network performance indicator value of the second type of virtual machine includes any one or more of the following: the number of newly created connections, the maximum number of connections, and the throughput.

[0133] In one of the embodiments, when the processor executes the computer program, it specifically implements the following steps: responding to a startup instruction of the stress test, extracting parameters in the startup instruction, and sending a resource creation request to the cloud computing platform according to the parameters, so that the cloud computing platform creates a second type of virtual machine and a third type of virtual machine according to the resource creation request, and the parameters include any one or more of the following parameters: load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machine.

[0134] In one of the embodiments, a load balancing service is running on the second type of virtual machine, and the second type of virtual machine includes a main virtual machine. When the processor executes the computer program, the following steps are specifically implemented: modify the Socket configuration item of the load balancing service according to the load balancing specification, restart the load balancing service, obtain the node where the main virtual machine of the second type of virtual machine after the restart is located, and upload the monitoring script of the current network performance index value to the node where the main virtual machine is located to monitor the current network performance index value of the main virtual machine.

[0135] In one of the embodiments, when the processor executes the computer program, it specifically implements the following steps: monitoring the resource creation progress of the cloud computing platform, and when monitoring that the resource creation is completed, sending a configuration file to the first type virtual machine and the third type virtual machine to control the first type virtual machine and the third type virtual machine to perform resource configuration.

[0136] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a current network performance index value of a second type of virtual machine, when the current network performance index value is greater than a previous network performance index value, increasing the concurrency of a first type of virtual machine, and re-obtaining a new network performance index value; when the new network performance index value is less than or equal to the previous network performance index value, obtaining a resource utilization rate of the first type of virtual machine; when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold, determining a test result of a stress test according to the new network performance index value.

[0137] In one of the embodiments, when a computer program is executed by a processor to implement the above-mentioned step of increasing the concurrency of the first type of virtual machine and re-acquiring a new network performance index value when the current network performance index value is greater than the previous network performance index value, the following steps are specifically implemented: when the current network performance index value is greater than the previous network performance index value, the concurrency of the first type of virtual machine is increased according to a preset gradient, and a new network performance index value is re-acquired after the concurrency is increased, and the first type of virtual machine is a virtual machine cluster. When the computer program is executed by the processor, the following steps are specifically implemented: when the resource utilization rate of the first type of virtual machine is greater than a preset threshold, the virtual machine cluster is expanded, and the network performance index value of the second type of virtual machine after expansion is obtained; when the network performance index value of the second type of virtual machine after expansion is less than or equal to the previous network performance index value, the test result is determined according to the network performance index value of the second type of virtual machine before expansion; when the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, the step of expanding the virtual machine cluster and obtaining the network performance index value of the second type of virtual machine after expansion is returned.

[0138] In one of the embodiments, the current network performance indicator value of the second type of virtual machine includes any one or more of the following: the number of newly created connections, the maximum number of connections, and the throughput.

[0139] In one of the embodiments, when the computer program is executed by the processor, the following steps are specifically implemented: in response to a startup instruction of a stress test, parameters in the startup instruction are extracted, and a resource creation request is sent to the cloud computing platform according to the parameters, so that the cloud computing platform creates a second type of virtual machine and a third type of virtual machine according to the resource creation request, and the parameters include any one or more of the following parameters: load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machine.

[0140] In one of the embodiments, a load balancing service is running on the second type of virtual machine, and the second type of virtual machine includes a main virtual machine. When the computer program is executed by the processor, the following steps are specifically implemented: modify the Socket configuration item of the load balancing service according to the load balancing specification, restart the load balancing service, obtain the node where the main virtual machine of the second type of virtual machine after the restart is located, and upload the monitoring script of the current network performance index value to the node where the main virtual machine is located to monitor the current network performance index value of the main virtual machine.

[0141] In one of the embodiments, when the computer program is executed by the processor, the following steps are specifically implemented: monitoring the resource creation progress of the cloud computing platform, and when monitoring that the resource creation is completed, sending configuration files to the first type of virtual machine and the third type of virtual machine to control the first type of virtual machine and the third type of virtual machine to perform resource configuration.

[0142] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the above-mentioned computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0144] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A stress testing method, characterized in that: The method is applied to a control machine, the control machine is connected to a first-class virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second-class virtual machine, the cloud computing platform is also provided with at least one third-class virtual machine, the first-class virtual machine is used to send a data request to the second-class virtual machine, the second-class virtual machine is used to distribute the data request to the third-class virtual machine for processing, the method includes: Obtaining the current network performance indicator value of the second type of virtual machine; When the current network performance index value is greater than the previous network performance index value, increasing the concurrency number of the first type of virtual machines and re-obtaining a new network performance index value; When the new network performance index value is less than or equal to the previous network performance index value, the resource utilization rate of the first type of virtual machine is obtained; when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold, the test result of the stress test is determined according to the new network performance index value.

2. The method according to claim 1, characterized in that When the current network performance index value is greater than the previous network performance index value, increasing the concurrency number of the first type of virtual machines and re-obtaining a new network performance index value, including: When the current network performance index value is greater than the previous network performance index value, increasing the concurrency of the first type of virtual machines according to a preset gradient, and reacquiring the new network performance index value after increasing the concurrency; The first type of virtual machine is a virtual machine cluster, and the method further includes: When the resource usage rate of the first type of virtual machine is greater than the preset threshold, the virtual machine cluster is expanded, and the network performance indicator value of the second type of virtual machine after the expansion is obtained; When the network performance index value of the second type of virtual machine after the capacity expansion is less than or equal to the previous network performance index value, determining the test result according to the network performance index value of the second type of virtual machine before the capacity expansion; When the network performance index value of the second type of virtual machine after expansion is greater than the previous network performance index value, return to the step of expanding the virtual machine cluster to obtain the network performance index value of the second type of virtual machine after expansion.

3. The method according to claim 1, characterized in that The current network performance indicator value of the second type of virtual machine includes any one or more of the following: The number of new connections, maximum number of connections, and throughput.

4. The method according to claim 1, characterized in that: The method further comprises: In response to a start instruction of the stress test, extract parameters in the start instruction, and send a resource creation request to the cloud computing platform according to the parameters, so that the cloud computing platform creates the second type of virtual machine and the third type of virtual machine according to the resource creation request, wherein the parameters include any one or more of the following parameters: Load balancing specifications, network type, listener protocol type, and specifications of the third type of virtual machine.

5. The method according to claim 4, characterized in that A load balancing service is running on the second type of virtual machine, the second type of virtual machine includes a master virtual machine, and the method further includes: Modify the Socket configuration item of the load balancing service according to the load balancing specification, and restart the load balancing service; Obtain the node where the master virtual machine of the second type virtual machine is located after restart, and upload the monitoring script of the current network performance index value to the node where the master virtual machine is located to monitor the current network performance index value of the master virtual machine.

6. The method according to claim 4, characterized in that The method further comprises: Monitoring the progress of resource creation on the cloud computing platform; When it is monitored that the resource creation is completed, a configuration file is sent to the first type virtual machine and the third type virtual machine to control the first type virtual machine and the third type virtual machine to perform resource configuration.

7. A pressure testing system, characterized in that: It includes a control machine, a first type of virtual machine and a cloud computing platform, wherein the control machine is connected to the first type of virtual machine and the cloud computing platform respectively, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second type of virtual machine, and the cloud computing platform is further provided with at least one third type of virtual machine, wherein: The first type of virtual machine is used to send a data request to the second type of virtual machine; The second type of virtual machine is used to distribute the data request to the third type of virtual machine for processing; The control machine is used to obtain the current network performance index value of the second type of virtual machine, and when the current network performance index value is greater than the previous network performance index value, increase the concurrency number of the first type of virtual machine and re-acquire a new network performance index value; The control machine is also used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold.

8. A pressure testing device, characterized in that: The device is applied to a control machine, the control machine is connected to a first-class virtual machine, the control machine is also connected to a cloud computing platform, the cloud computing platform is provided with a load balancing service component, the load balancing service component is provided with a second-class virtual machine, the cloud computing platform is also provided with at least one third-class virtual machine, the first-class virtual machine is used to send a data request to the second-class virtual machine, the second-class virtual machine is used to distribute the data request to the third-class virtual machine for processing, and the method includes: An acquisition module, used to obtain the current network performance indicator value of the second type of virtual machine; An adding module, used for increasing the concurrency number of the first type of virtual machines and re-obtaining a new network performance index value when the current network performance index value is greater than the previous network performance index value; The output module is used to obtain the resource utilization rate of the first type of virtual machine when the new network performance index value is less than or equal to the previous network performance index value, and to determine the test result of the stress test according to the new network performance index value when the resource utilization rate of the first type of virtual machine is less than or equal to a preset threshold.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.