Load balancing test method and device, electronic equipment and storage medium

By generating load balancing test requests on the client side, the switch forwards them to the proxy node. The target test script is used for data forwarding and detection, which solves the overall reliability problem of load balancing server testing and improves testing flexibility and throughput.

CN121887683APending Publication Date: 2026-04-17PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2026-01-20
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In large-scale, highly available, and highly complex scenarios, existing technologies cannot easily and quickly conduct comprehensive and reliable testing of load balancing servers.

Method used

The client generates a load balancing test request, which is then forwarded by the switch to the load balancing agent node. The target test script is used to forward the data, and CPU utilization, memory usage, connection pool status information, and request processing latency information are detected to determine the load balancing test results.

Benefits of technology

It enables simple, fast, comprehensive and reliable testing of load balancing servers, improves testing flexibility, fully unleashes the maximum throughput capacity of load balancing agent nodes, and achieves high-precision traffic injection and control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121887683A_ABST
    Figure CN121887683A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data testing and the field of smart medical treatment and financial science and technology, and provides a load balancing testing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: generating a load balancing testing request based on a testing module of a client; forwarding the load balancing test request to a load balancing proxy node based on a switch; determining a target test script from the load balancing agent node according to the load balancing test request; performing data forwarding processing on the client and the communication test instrument based on the load balancing agent node according to the target test script, and detecting on the load balancing agent node to obtain a CPU utilization rate, a memory occupancy rate, connection pool state information and request processing delay information; and determining a load balancing test result according to the CPU utilization rate, the memory occupancy rate, the connection pool state information and the request processing delay information. Through the technical scheme, comprehensive and reliable test processing can be performed on the load balancing server simply, conveniently and quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to, but is not limited to, the field of data testing technology, and particularly to a load balancing method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the continuous development of the insurance and smart healthcare industries, business operation systems are increasingly being used to manage and process related data. Due to the massive volume of data in these systems, cloud service providers often need to utilize load balancing servers for data management and distribution. Compared to Layer 4 load balancing, Layer 7 load balancing can parse request content and achieve more intelligent and refined traffic scheduling. However, during the testing of load balancing servers, different clients and servers have different configurations, leading to testing limitations in large-scale, high-availability, and highly complex scenarios, making it difficult to conduct comprehensive and reliable testing of load balancing servers quickly and easily. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] To address the problems mentioned in the background section, this application provides a load balancing testing method, apparatus, electronic device, and computer-readable storage medium, which can easily and quickly perform comprehensive and reliable testing on load balancing servers.

[0005] In a first aspect, embodiments of this application provide a load balancing testing method applied to a load balancing testing system. The load balancing testing system includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, the switch, the load balancing proxy node, and the communication testing instrument are sequentially connected via data connection. The load balancing testing method includes: The test module of the client generates a load balancing test request; The switch forwards the load balancing test request to the load balancing proxy node. The target test script is determined from the load balancing proxy node according to the load balancing test request; Based on the load balancing proxy node, the client and the communication test instrument are forwarded according to the target test script, and CPU utilization, memory usage, connection pool status information and request processing latency information are detected on the load balancing proxy node. The load balancing test results are determined based on the CPU utilization, memory usage, connection pool status information, and request processing latency information.

[0006] Secondly, embodiments of this application also provide a load balancing testing device. The load balancing testing system includes the load balancing testing device, which comprises a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, the switch, the load balancing proxy node, and the communication testing instrument are sequentially connected for data transfer. The load balancing testing device includes: A construction unit is used to generate load balancing test requests based on the client's test module; The forwarding unit is used to forward the load balancing test request to the load balancing proxy node based on the switch; A filtering unit is used to determine a target test script from the load balancing proxy node based on the load balancing test request; The testing unit is used to forward data between the client and the communication testing instrument based on the target test script according to the load balancing proxy node, and to detect CPU utilization, memory usage, connection pool status information and request processing latency information on the load balancing proxy node. A creation unit is used to determine the load balancing test results based on the CPU utilization, the memory usage, the connection pool status information, and the request processing latency information.

[0007] Thirdly, embodiments of this application also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the load balancing test method described in the first aspect above.

[0008] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions for performing the load balancing test method described in the first aspect above.

[0009] The load balancing testing method according to the embodiments provided in this application has at least the following beneficial effects: During the load balancing test, a load balancing test request is first generated by the client-side test module; then, the load balancing test request is forwarded to the load balancing proxy node via a switch; next, the load balancing proxy node forwards data between the client and the communication test instrument according to the target test script, and CPU utilization, memory usage, connection pool status information, and request processing latency information are detected on the load balancing proxy node; finally, the load balancing test result is determined based on the CPU utilization, memory usage, connection pool status information, and request processing latency information. Through the above technical solution, the client-side test module can generate load balancing test requests, which can greatly improve test flexibility; the communication test instrument allows the maximum throughput capacity of the load balancing proxy node to be fully released, achieving high-precision traffic injection and control, without being limited by the number of physical ports and bandwidth of a single machine, thus enabling simple and quick comprehensive and reliable testing of the load balancing server. Attached Figure Description

[0010] The accompanying drawings are used to provide a further understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0011] Figure 1 This is a flowchart illustrating a load balancing test method provided in one embodiment of this application; Figure 2 yes Figure 1 A schematic diagram of a specific implementation of step S100; Figure 3 yes Figure 1 A schematic diagram of a specific implementation method of step S200; Figure 4 yes Figure 1 A schematic diagram of a specific implementation of step S300; Figure 5 yes Figure 1 A schematic diagram of a specific implementation of step S400; Figure 6 yes Figure 1 A flowchart illustrating another specific implementation of step S400; Figure 7 yes Figure 1 A schematic diagram of a specific implementation of step S500; Figure 8 This is a schematic diagram of a load balancing test apparatus provided in one embodiment of this application; Figure 9This is a schematic diagram of an electronic device provided in one embodiment of this application. Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0013] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0014] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0015] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0016] AI is a new technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. Artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. Artificial intelligence can simulate the information processes of human consciousness and thought. Furthermore, artificial intelligence utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results—the theories, methods, technologies, and application systems available for use.

[0017] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0018] Artificial intelligence, or AI, is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0019] The servers involved in artificial intelligence technology can be standalone servers or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0020] This application provides a load balancing testing method, apparatus, electronic device, and computer-readable storage medium. During load balancing testing, a load balancing test request is first generated by a client-side test module. Then, the load balancing test request is forwarded to a load balancing proxy node via a switch. Next, the load balancing proxy node processes data forwarding between the client and a communication testing instrument according to the target test script. CPU utilization, memory usage, connection pool status information, and request processing latency information are detected on the load balancing proxy node. Finally, the load balancing test result is determined based on these metrics. This technical solution allows the client-side test module to generate load balancing test requests, significantly improving testing flexibility. The communication testing instrument enables the maximum throughput capacity of the load balancing proxy node to be fully utilized, achieving high-precision traffic injection and control, without being limited by the number of physical ports or bandwidth of a single machine. This allows for convenient and rapid comprehensive and reliable testing of the load balancing server.

[0021] The load balancing testing method provided in this application relates to the field of data testing technology. This load balancing testing method can be applied to a terminal or a server, and can also be software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0022] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0023] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0024] The embodiments of this application will be further described below with reference to the accompanying drawings.

[0025] like Figure 1 As shown, Figure 1This is a flowchart illustrating a load balancing testing method provided in one embodiment of this application. The load balancing testing method is applied to a load balancing testing system, which includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, switch, load balancing proxy node, and communication testing instrument are sequentially connected for data exchange. The load balancing testing method includes the following steps: Step S100: The client-side test module generates a load balancing test request.

[0026] The load balancing testing method provided in this application is applied to a load balancing testing system, which includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, switch, load balancing proxy node, and communication testing instrument are sequentially connected via data. Through this network architecture, the client can connect to the switch, the switch can connect to the load balancing proxy node, and the load balancing proxy node can connect to the communication testing instrument. Therefore, the client can transmit data between the switch, the load balancing proxy node, and the communication testing instrument. During data transmission between the client and the communication testing instrument, relevant parameters of the load balancing proxy node can be tested to achieve load balancing testing of the load balancing proxy node.

[0027] It is worth noting that during the load balancing test, a load balancing test request can first be generated based on the client-side test module to prepare for subsequent load balancing tests. In the process of generating the load balancing test request based on the client-side test module, the client first receives the load balancing test parameters, and the test module parses and processes these parameters to obtain the load balancing test script. Then, the load balancing test script undergoes data format conversion to obtain the load balancing test data packet. Finally, the load balancing test data packet can be used as the load balancing test request to prepare for subsequent load balancing tests. Throughout the process of receiving load balancing test parameters based on the client, relevant laws, regulations, and standards are followed. Furthermore, when this application embodiment needs to obtain sensitive personal information from users, it will obtain the user's individual permission or consent through pop-ups or redirection to a confirmation page. Only after explicitly obtaining the user's individual permission or consent will the necessary user-related data for the normal operation of this application embodiment be obtained.

[0028] For example, in the insurance business, a load balancing test request can be generated in the test module on the computer to test the load balancing proxy node in the load balancing test system; or, in the smart healthcare field, a load balancing test request can be generated in the router's test module to test the load balancing proxy node in the load balancing test system.

[0029] It is worth noting that the client in this application embodiment can be a personal computing device, a smart and IoT device, a dedicated terminal device, a network infrastructure device, and a virtualization and software client; wherein, personal computing devices can include desktop computers, laptops, tablets, and smartphones; smart and IoT devices can include smart wearable devices, smart home devices, security monitoring devices, and vehicle systems; dedicated terminal devices can include network printers and industrial control terminals; network infrastructure devices can include routers and switches; and virtualization and software clients can include virtual machines and container instances.

[0030] It is worth noting that the testing module in this application embodiment is a Hypertext Transfer Protocol (HTTP) performance benchmarking tool, primarily used to evaluate the performance of a network server under high-concurrency scenarios. The testing module can generate high-concurrency loads on the target HTTP service in a single-machine multi-core CPU environment through multi-threading and asynchronous event-driven mechanisms, thereby testing key performance indicators such as server response time, throughput, and concurrent processing capabilities. The testing module can be used for basic performance testing, high-concurrency stress testing, long-term stability testing, and custom business scenarios. Its advantage lies in simulating ultra-high concurrency with extremely low resource consumption, making it suitable for developers and test engineers to quickly assess the performance limits of network services.

[0031] like Figure 2 As shown, the client-side test module generates load balancing test requests, which may include the following steps: Step S110: Based on the load balancing test parameters received by the client, and based on the test module parsing and processing the load balancing test parameters, a load balancing test script is obtained. Step S120: Perform data format conversion on the load balancing test script to obtain the load balancing test data packet; Step S130: Use the load balancing test data packet as a load balancing test request.

[0032] For steps S110 to S130, during the process of generating a load balancing test request based on the client-side test module, the client first receives the load balancing test parameters, and the test module parses and processes these parameters to obtain the load balancing test script. Next, the load balancing test script undergoes data format conversion to obtain the load balancing test data packet. Finally, the load balancing test data packet can be used as the load balancing test request. This technical solution allows for a simple and quick way to generate a load balancing test request based on the load balancing test parameters.

[0033] It is worth noting that load balancing test parameters can be received through the client, and then the load balancing test script can be obtained by parsing and processing these parameters using the test module. These load balancing test parameters can be control parameters input by the user to the client. After the user inputs the load balancing test parameters on the client, the test module can parse and process them to obtain the load balancing test script. Users can set and process the load balancing test parameters according to their actual needs, making the load balancing test process more flexible and convenient.

[0034] It is worth noting that the load balancing test script is converted into a data format to obtain a load balancing test data packet. This data packet is well adapted to data transmission, which is beneficial for subsequent load balancing testing.

[0035] For example, in the insurance business, load balancing test parameters can be received from the client, and then the test module can parse and process these parameters to obtain a load balancing test script. Next, the load balancing test script undergoes data format conversion to obtain a load balancing test data packet. Finally, this load balancing test data packet can be used as a load balancing test request to prepare for subsequent load balancing tests in the insurance business. Alternatively, in the smart healthcare field, load balancing test parameters can be received from the client, and then the test module can parse and process these parameters to obtain a load balancing test script. Next, the load balancing test script undergoes data format conversion to obtain a load balancing test data packet, which can then be used as a load balancing test request to prepare for subsequent load balancing tests in the healthcare field.

[0036] Step S200: Forward the load balancing test request to the load balancing agent node based on the switch.

[0037] The load balancing testing method provided in this application allows the load balancing test request to be forwarded to the load balancing proxy node via a switch after the client-based test module generates the load balancing test request, thus preparing for subsequent load balancing tests.

[0038] It is worth noting that the switch and the load balancing agent node are connected, so the switch can forward the received load balancing test request to the load balancing agent node. In the process of the switch forwarding the load balancing test request to the load balancing agent node, the switch can extract the request forwarding mark information from the load balancing test request, and then send the load balancing test request to the load balancing agent node according to the request forwarding mark information.

[0039] It is worth noting that the request forwarding tag information can be extracted from the load balancing test request through the switch; subsequently, based on the request forwarding tag information, the load balancing test request can be accurately sent to the load balancing agent node using the switch, in preparation for subsequent load balancing tests.

[0040] It's worth noting that a switch is a network connection device operating at the data link layer, used for efficiently forwarding data frames within a local area network (LAN). Switches can automatically establish a mapping table between ports and hardware addresses; they send data to the target port based on the hardware address table, and can independently form a collision domain on each port, improving network performance. Switches can achieve precise targeted transmission through hardware address identification, making them a fundamental device for building efficient LANs. Load balancing proxy nodes can handle Hypertext Transfer Protocol (HTTP) requests, receiving client requests and forwarding them to backend application servers; they can distribute traffic to multiple backend servers, improving system performance and availability; they can also efficiently process static files such as images and videos. Load balancing proxy nodes feature an event-driven architecture, low memory footprint, high stability, modular design, and rich functionality.

[0041] like Figure 3 As shown, forwarding load balancing test requests to the load balancing proxy node based on the switch can include the following steps: Step S210: The switch extracts the request forwarding tag information from the load balancing test request; Step S220: Based on the request forwarding tag information, use the switch to send the load balancing test request to the load balancing agent node.

[0042] For steps S210 to S220, during the process of forwarding the load balancing test request to the load balancing agent node based on the switch, the request forwarding tag information can be extracted from the load balancing test request through the switch; then, based on the request forwarding tag information, the load balancing test request can be accurately sent to the load balancing agent node using the switch, in preparation for subsequent load balancing tests.

[0043] It is worth noting that the request forwarding tag information is used to characterize the address information of data forwarding. Therefore, after determining the request forwarding tag information from the load balancing test request forwarding, the load balancing test request can be sent to the load balancing agent node by the switch according to the request forwarding tag information, in order to prepare for the subsequent load balancing test.

[0044] Step S300: Determine the target test script from the load balancing agent node based on the load balancing test request.

[0045] The load balancing test method provided in this application, after forwarding the load balancing test request to the load balancing proxy node based on the switch, can determine the target test script from the load balancing proxy node according to the load balancing test request. Subsequently, the load balancing proxy node can perform data forwarding processing between the client and the communication test instrument according to the target test script to realize the load balancing test processing of the load balancing proxy node.

[0046] It is worth noting that in the process of determining the target test script from the load balancing agent node based on the load balancing test request, the test script tagging information is first determined from the load balancing test request; then, the test script tagging information is matched with multiple test scripts in the load balancing agent node to determine the target test script; through the above settings, the determination of the target test script can be made simpler and faster, so that the subsequent load balancing test can be more reliable.

[0047] like Figure 4 As shown, determining the target test script from the load balancing proxy node based on the load balancing test request may include the following steps: Step S310: Determine the test script tagging information from the load balancing test request; Step S320: Match the test script tagging information with multiple test scripts in the load balancing agent node to determine the target test script.

[0048] For steps S310 to S320, in the process of determining the target test script from the load balancing agent node according to the load balancing test request, the test script marking information is first determined from the load balancing test request; then the test script marking information is matched with multiple test scripts in the load balancing agent node to determine the target test script; through the above technical solution, the determination of the target test script can be more accurate.

[0049] It is worth noting that the test script tagging information is unique globally. Therefore, by determining the test script tagging information from the load balancing test request, the corresponding target test script can be determined from multiple test scripts based on the test script tagging information.

[0050] For example, in the insurance business domain, test script tagging information is first determined from load balancing test requests in the insurance business domain; then, the test script tagging information is matched with multiple test scripts in the load balancing proxy node to determine the target test script for the insurance business system. Alternatively, in the smart healthcare domain, test script tagging information is first determined from load balancing test requests in the smart healthcare domain; then, the test script tagging information is matched with multiple test scripts in the load balancing proxy node to determine the target test script for the smart healthcare system.

[0051] Step S400: Based on the load balancing proxy node, the client and the communication test instrument are forwarded to each other according to the target test script, and the CPU utilization, memory usage, connection pool status information and request processing latency information are detected on the load balancing proxy node.

[0052] The load balancing testing method provided in this application, after determining the target test script from the load balancing proxy node according to the load balancing test request, can forward data between the client and the communication test instrument based on the target test script through the load balancing proxy node. Furthermore, it detects CPU utilization, memory usage, connection pool status information, and request processing latency information on the load balancing proxy node. With these data, the load balancing test results can be determined, making the load balancing testing process more comprehensive and accurate.

[0053] It is worth noting that during the process of forwarding data between the client and the communication test instrument based on the target test script using the load balancing proxy node, the target test script can be analyzed and processed by the load balancing proxy node to obtain the distributed data traffic packets and the corresponding distribution address information. Then, the load balancing proxy node forwards the distributed data traffic packets received from the client to the test port in the communication test instrument corresponding to the distribution address information. Next, in response to the distributed data traffic packets, the load balancing proxy node receives test feedback data packets from the test port corresponding to the distribution address information. Finally, the load balancing proxy node forwards the test feedback data packets to the client. Through these technical means, comprehensive and reliable load balancing test processing can be achieved.

[0054] It is worth noting that the communication testing instrument adopts a professional hardware platform, overcoming the limitations of pure software testing in terms of latency accuracy and traffic accuracy. It recreates real-world application environments in the laboratory, such as the signal propagation characteristics of smart homes and traffic models in intelligent computing centers. It supports parallel testing of multiple devices, shortening the testing cycle and improving R&D efficiency. Based on the communication testing instrument, the maximum throughput capacity of the load balancing proxy node can be fully released, achieving high-precision traffic injection and control, without being limited by the number of physical ports and bandwidth of a single machine. This allows for simple and quick comprehensive and reliable testing of the load balancing server.

[0055] like Figure 5 As shown, the process of forwarding data between the client and the communication test instrument based on the target test script by the load balancing proxy node can include the following steps: Step S410: Analyze and process the target test script based on the load balancing agent node to obtain the distributed data traffic packets and the distribution address information corresponding to the distributed data traffic packets; Step S420: Based on the load balancing agent node, the distributed data traffic packets received from the client are forwarded to the test port in the communication test instrument corresponding to the distributed address information; Step S430: In response to the distribution of data traffic packets, the load balancing proxy node receives test feedback data packets from the test port corresponding to the distribution address information. Step S440: The test feedback data packet is forwarded to the client based on the load balancing agent node.

[0056] For steps S410 to S440, during the process of data forwarding between the client and the communication test instrument based on the target test script by the load balancing proxy node, the target test script can be analyzed and processed by the load balancing proxy node to obtain the distributed data traffic packets and the corresponding distribution address information. Then, the distributed data traffic packets received from the client are forwarded by the load balancing proxy node to the test port in the communication test instrument corresponding to the distribution address information. Next, in response to the distributed data traffic packets, the test feedback data packets are received from the test port corresponding to the distribution address information using the load balancing proxy node. Finally, the test feedback data packets are forwarded to the client by the load balancing proxy node. Through the above technical means, comprehensive and reliable load balancing test processing can be achieved.

[0057] It's important to note that there's a one-to-one correspondence between the distributed data traffic packets and the distribution address information. This allows the distributed data traffic packets received from the client to be forwarded to the corresponding test port based on the distribution address information. Subsequently, in response to the distributed data traffic packets, the load balancing proxy node receives test feedback data packets from the test port corresponding to the distribution address information. Then, the load balancing proxy node forwards the test feedback data packets to the client, completing a full data transmission process. Further analysis and processing of the test feedback data packets enables load balancing testing.

[0058] It is worth noting that communication testing instruments can fully unleash the maximum throughput capacity of load balancing agent nodes, enabling high-precision traffic injection and control, without being limited by the number of physical ports and bandwidth of a single machine. This allows for simple and quick comprehensive and reliable testing of load balancing servers.

[0059] like Figure 6 As shown, detecting CPU utilization, memory usage, connection pool status information, and request processing latency information on the load balancing proxy node can include the following steps: Step S450: Collect CPU time slice difference, memory bytes, number of communication connections and time interval information on the load balancing agent node respectively; Step S460: Convert and calculate the CPU time slice difference, memory bytes, number of communication connections, and time interval information respectively to obtain the CPU utilization rate corresponding to the CPU time slice difference, the memory occupancy rate corresponding to the number of memory bytes, the connection pool status information corresponding to the number of communication connections, and the request processing delay information corresponding to the time interval information.

[0060] For steps S450 to S460, during the process of detecting CPU utilization, memory usage, connection pool status information, and request processing latency information on the load balancing agent node, the CPU time slice difference, memory bytes, number of communication connections, and time interval information are first collected on the load balancing agent node. Then, the CPU time slice difference, memory bytes, number of communication connections, and time interval information are converted and calculated to obtain the CPU utilization corresponding to the CPU time slice difference, the memory usage corresponding to the memory bytes, the connection pool status information corresponding to the number of communication connections, and the request processing latency information corresponding to the time interval information. Through the above technical means, the determination of CPU utilization, memory usage, connection pool status information, and request processing latency information can be more accurate, thereby making the load balancing test more comprehensive and accurate.

[0061] It is worth noting that CPU utilization can be determined based on CPU time slice difference, memory usage can be determined based on memory bytes, connection pool status information can be determined based on the number of communication connections, and request processing latency information can be determined based on time interval information.

[0062] Step S500: Determine the load balancing test results based on CPU utilization, memory usage, connection pool status information, and request processing latency information.

[0063] The load balancing testing method provided in this application, based on the load balancing proxy node performing data forwarding processing between the client and the communication testing instrument according to the target test script, and after detecting CPU utilization, memory usage, connection pool status information, and request processing latency information on the load balancing proxy node, can determine the load balancing test result based on CPU utilization, memory usage, connection pool status information, and request processing latency information; through the above technical solution, the determination of the load balancing test result can be more comprehensive and accurate.

[0064] It is worth noting that CPU utilization represents the busyness of central processing unit resources, that is, the proportion of time the CPU is in a non-idle state within a specific time period; memory utilization represents the usage of system physical memory or virtual memory; connection pool status information represents the maintenance and usage of pre-established connections between applications and databases / services; and request processing latency information represents the time interval from when the client initiates a request to when it receives a complete response.

[0065] like Figure 7 As shown, determining the load balancing test results based on CPU utilization, memory usage, connection pool status information, and request processing latency information can include the following steps: Step S510: Compare the CPU utilization rate with the preset utilization rate threshold to obtain the first comparison result; Step S520: Compare the memory usage rate with a preset usage rate threshold to obtain a second comparison result; Step S530: Compare the connection pool status information with the preset number of connection pool connections to obtain a third comparison result; Step S540: Compare the request processing delay information with the preset processing delay to obtain the fourth comparison result; Step S550: Based on the first comparison result, the second comparison result, the third comparison result, and the fourth comparison result, determine the load balancing test result.

[0066] For steps S510 to S550, in determining the load balancing test result based on CPU utilization, memory usage, connection pool status information, and request processing latency information, the CPU utilization is first compared with a preset utilization threshold to obtain a first comparison result; then, the memory usage is compared with a preset usage threshold to obtain a second comparison result; next, the connection pool status information is compared with a preset number of connection pool connections to obtain a third comparison result; then, the request processing latency information is compared with a preset processing latency to obtain a fourth comparison result; finally, the load balancing test result is determined based on the first, second, third, and fourth comparison results. This technical solution makes the confirmation of load balancing test results more comprehensive and accurate.

[0067] It is worth noting that the utilization threshold, occupancy threshold, number of connections in the connection pool, and processing latency can all be set according to actual needs, making load balancing testing more flexible.

[0068] In addition, such as Figure 8 As shown, one embodiment of this application also provides a load balancing testing device 10. The load balancing testing system includes the load balancing testing device 10, which includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, switch, load balancing proxy node, and communication testing instrument are sequentially connected for data transmission. The load balancing testing device 10 includes: Building unit 100 is used to generate load balancing test requests based on the client-side test module; Forwarding unit 200 is used to forward load balancing test requests to load balancing agent nodes based on the switch; The filtering unit 300 is used to determine the target test script from the load balancing agent node based on the load balancing test request; Test unit 400 is used to forward data between the client and the communication test instrument based on the target test script through the load balancing agent node, and to detect CPU utilization, memory usage, connection pool status information and request processing latency information on the load balancing agent node. Create unit 500 to determine the load balancing test results based on CPU utilization, memory usage, connection pool status information, and request processing latency information.

[0069] The specific implementation of the load balancing test device 10 is basically the same as the specific embodiment of the load balancing test method described above, and will not be repeated here.

[0070] In addition, such as Figure 9 As shown, one embodiment of this application also provides an electronic device 700, which includes: a memory 720, a processor 710, and a computer program stored on the memory 720 and executable on the processor 710.

[0071] The processor 710 and memory 720 can be connected via a bus or other means.

[0072] The non-transient software program and instructions required to implement the load balancing test method of the above embodiments are stored in the memory 720. When executed by the processor 710, the load balancing test method of each of the above embodiments is executed.

[0073] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0074] Furthermore, one embodiment of this application provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor 710 or a controller, for example, by a processor 710 in the above-described device embodiment, which enables the processor 710 to perform the load balancing test method in the above-described embodiment.

[0075] The above embodiments can be used in combination, and modules with the same name in different embodiments may be the same or different.

[0076] The foregoing has described specific embodiments of this application; other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than those shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily have to follow the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0077] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and computer-readable storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0078] The apparatus, device, computer-readable storage medium and method provided in the embodiments of this application are corresponding. Therefore, the apparatus, device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, device and computer storage medium will not be described again here.

[0079] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program a digital system themselves to "integrate" it onto a PLD, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compiler used when writing program development code. The original code before compilation must also be written in a specific programming language, which is called a Hardware Description Language (HDL). There is not just one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using the aforementioned hardware description languages ​​and programming it into an integrated circuit, the hardware circuit that implements the logic method flow can be easily obtained.

[0080] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0081] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0082] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, in implementing the embodiments of this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0083] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0085] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0087] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0088] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0089] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0090] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0091] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0092] The embodiments of this application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. The embodiments of this application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules can reside in local and remote computer storage media, including storage devices.

[0093] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0094] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.

Claims

1. A load balancing test method, characterized by, Applied to load balancing test systems, the The load balancing testing system includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, the switch, the load balancing proxy node, and the communication testing instrument are sequentially connected for data transfer. The load balancing testing method includes: The test module of the client generates a load balancing test request; The switch forwards the load balancing test request to the load balancing proxy node. The target test script is determined from the load balancing proxy node according to the load balancing test request; Based on the load balancing proxy node, the client and the communication test instrument are forwarded according to the target test script, and CPU utilization, memory usage, connection pool status information and request processing latency information are detected on the load balancing proxy node. The load balancing test results are determined based on the CPU utilization, memory usage, connection pool status information, and request processing latency information.

2. The load balancing test method according to claim 1, characterized in that, The test module based on the client generates a load balancing test request, including: The load balancing test parameters are received by the client, and the load balancing test parameters are parsed and processed by the test module to obtain the load balancing test script. The load balancing test script is processed to convert its data format, resulting in a load balancing test data packet. The load balancing test data packet is used as the load balancing test request.

3. The load balancing test method according to claim 1, characterized in that, The step of forwarding the load balancing test request to the load balancing proxy node based on the switch includes: The switch extracts request forwarding tag information from the load balancing test request; Based on the request forwarding tag information, the switch sends the load balancing test request to the load balancing proxy node.

4. The load balancing test method according to claim 1, characterized in that, The step of determining the target test script from the load balancing proxy node according to the load balancing test request includes: Determine the test script tagging information from the load balancing test request; The test script tagging information is matched with multiple test scripts in the load balancing agent node to determine the target test script.

5. The load balancing test method according to claim 1, characterized in that, The process of forwarding data between the client and the communication testing instrument based on the load balancing proxy node according to the target test script includes: Based on the load balancing proxy node, the target test script is analyzed and processed to obtain the distributed data traffic packet and the distribution address information corresponding to the distributed data traffic packet; The load balancing proxy node will forward the distributed data traffic packets received from the client to the test port in the communication test instrument corresponding to the distributed address information. In response to the distributed data traffic packet, the load balancing proxy node receives a test feedback data packet from the test port corresponding to the distributed address information. The test feedback data packet is forwarded to the client based on the load-balanced proxy node.

6. The load balancing test method according to claim 1, characterized in that, The detection of CPU utilization, memory usage, connection pool status information, and request processing latency information on the load balancing proxy node includes: On the load balancing agent node, CPU time slice difference, memory bytes, number of communication connections, and time interval information are collected respectively. The CPU time slice difference, the number of memory bytes, the number of communication connections, and the time interval information are converted and calculated to obtain the CPU utilization rate corresponding to the CPU time slice difference, the memory occupancy rate corresponding to the number of memory bytes, the connection pool status information corresponding to the number of communication connections, and the request processing delay information corresponding to the time interval information.

7. The load balancing test method according to claim 1, characterized in that, Determining the load balancing test results based on the CPU utilization, memory usage, connection pool status information, and request processing latency information includes: The CPU utilization rate is compared with a preset utilization rate threshold to obtain a first comparison result; The memory occupancy rate is compared with a preset occupancy rate threshold to obtain a second comparison result; The connection pool status information is compared with the preset number of connection pool connections to obtain a third comparison result; The request processing delay information is compared with the preset processing delay to obtain a fourth comparison result; The load balancing test result is determined based on the first comparison result, the second comparison result, the third comparison result, and the fourth comparison result.

8. A load balancing testing device, characterized in that, The load balancing testing system includes the load balancing testing device. The load balancing testing system includes a client, a switch, a load balancing proxy node, and a communication testing instrument. The client, the switch, the load balancing proxy node, and the communication testing instrument are sequentially connected via data connection. The load balancing testing device includes: A construction unit is used to generate load balancing test requests based on the client's test module; The forwarding unit is used to forward the load balancing test request to the load balancing proxy node based on the switch; A filtering unit is used to determine a target test script from the load balancing proxy node based on the load balancing test request; The testing unit is used to forward data between the client and the communication testing instrument based on the target test script according to the load balancing proxy node, and to detect CPU utilization, memory usage, connection pool status information and request processing latency information on the load balancing proxy node. A creation unit is used to determine the load balancing test results based on the CPU utilization, the memory usage, the connection pool status information, and the request processing latency information.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the load balancing test method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the load balancing test method according to any one of claims 1 to 7.