CN115277506A - Load balancing equipment testing method and system - Google Patents

Load balancing equipment testing method and system Download PDF

Info

Publication number
CN115277506A
CN115277506A CN202210871758.7A CN202210871758A CN115277506A CN 115277506 A CN115277506 A CN 115277506A CN 202210871758 A CN202210871758 A CN 202210871758A CN 115277506 A CN115277506 A CN 115277506A
Authority
CN
China
Prior art keywords
load balancing
target
algorithm
flow
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210871758.7A
Other languages
Chinese (zh)
Other versions
CN115277506B (en
Inventor
孙艳杰
王信大
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202210871758.7A priority Critical patent/CN115277506B/en
Publication of CN115277506A publication Critical patent/CN115277506A/en
Application granted granted Critical
Publication of CN115277506B publication Critical patent/CN115277506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0882Utilisation of link capacity
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Abstract

The disclosure relates to a load balancing device testing method, a load balancing device testing system, an electronic device and a computer readable medium. The method comprises the following steps: generating target flow based on a target load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; and generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm. The load balancing equipment testing method, the load balancing equipment testing system, the electronic equipment and the computer readable medium can be used for automatically testing the load balancing equipment, solve the technical problem that the load balancing equipment can only be tested by a manual method in the prior art, and save the testing cost.

Description

Load balancing equipment testing method and system
Technical Field
The present disclosure relates to the field of computer information processing, and in particular, to a method and a system for testing a load balancing device, an electronic device, and a computer readable medium.
Background
The server load balancing is built on the existing network structure, and provides a cheap, effective and transparent method for expanding the bandwidth of network equipment and servers, increasing the throughput, strengthening the network data processing capacity and improving the flexibility and the usability of the network. Load Balance means that the Load Balance is shared by a plurality of operation units to be executed, such as a Web server, an FTP server, an enterprise key application server and other key task servers, so as to jointly complete work tasks.
With the continuous development of network technology, a single server is limited by the processing capacity of a physical memory and a CPU, the network requirement cannot be increased continuously, once the server fails, the server cannot be guaranteed to provide services continuously, a load balancer can expand the bandwidth of the server for providing a transparent, economical and efficient method, the throughput of the network can be effectively improved, the network has high availability and flexibility, and the problems of server overload, high request delay and single-point failure caused by high network traffic are solved. The load balancing algorithm is used as a core function of the load balancer, and a method capable of automatically analyzing the balancing effect of the server is needed in the iteration of load balancing software so as to achieve the purpose of automatically verifying the function.
The above information disclosed in this background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not constitute prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
In view of this, the present application provides a method, a system, an electronic device, and a computer readable medium for testing a load balancing device, which can perform an automated test on the load balancing device, solve the technical problem that the test can only be performed by a manual method in the prior art, and save the test cost.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the present application, a method for testing a load balancing device is provided, where the method includes: generating target flow based on a target load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; and generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm.
In an exemplary embodiment of the present application, generating target traffic based on a target load balancing algorithm includes: determining the target load balancing algorithm from a plurality of load balancing algorithms; generating target flow according to the target load balancing algorithm and the number of the background servers; and sending the target traffic to the load balancing equipment.
In an exemplary embodiment of the present application, sending the target traffic to the load balancing device includes: opening a virtual VIP port and a Vport in the load balancing device; sending the target traffic into a virtual VIP port and a Vport of the load balancing device.
In an exemplary embodiment of the present application, forwarding, by a load balancing device, the target traffic to a plurality of background servers includes: and the load balancing equipment forwards the target flow to a plurality of background servers according to a built-in algorithm.
In an exemplary embodiment of the present application, the generating, by the plurality of background servers, the state information according to the target traffic includes: the plurality of background servers acquire the target flow; filtering the target flow to extract the local flow; and generating the state information according to the local flow.
In an exemplary embodiment of the present application, generating the state information according to the local traffic includes: and when the first data packet in the local flow is acquired, generating the state information according to the current system service connection number, the local address and the local port.
In an exemplary embodiment of the present application, generating a test result of the load balancing device according to the state information corresponding to the plurality of backend servers and the target load balancing algorithm includes: analyzing the state information corresponding to the background servers to generate background server addresses and port information; counting the distribution information of the background servers according to the addresses and the port information of the background servers; and comparing the distribution information with the target load balancing algorithm to generate a test result of the load balancing equipment.
In an exemplary embodiment of the present application, comparing the distribution information with the target load balancing algorithm to generate a test result of the load balancing device includes: when the target load balancing algorithm is a polling algorithm, extracting a response sequence of the background server from the distribution information; and comparing the response sequence with a strategy corresponding to a polling algorithm to generate a test result of the load balancing equipment.
In an exemplary embodiment of the present application, comparing the distribution information with the target load balancing algorithm to generate a test result of the load balancing device includes: when the target load balancing algorithm is a connection algorithm, extracting the connection number and the flow information of the background server from the distribution information; and comparing the connection number and the flow information of the background server with the strategy corresponding to the connection algorithm to generate a test result of the load balancing equipment.
According to an aspect of the present application, a load balancing device testing system is provided, which includes: the client is used for generating target flow based on a target load balancing algorithm; generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm; the load balancing equipment is used for forwarding the target traffic to a plurality of background servers; and the background servers are used for generating state information according to the target flow.
According to an aspect of the present application, an electronic device is provided, the electronic device including: one or more processors; storage means for storing one or more programs; when executed by one or more processors, cause the one or more processors to implement a method as above.
According to an aspect of the application, a computer-readable medium is proposed, on which a computer program is stored which, when being executed by a processor, carries out the method as above.
According to the load balancing device testing method, the load balancing device testing system, the electronic device and the computer readable medium, target flow is generated based on a target load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the mode that the test result of the load balancing equipment is generated according to the state information corresponding to the background servers and the target load balancing algorithm, automatic test can be performed on the load balancing equipment, the technical problem that the test can only be performed through a manual method in the prior art is solved, and the test cost is saved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The above and other objects, features and advantages of the present application will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings. The drawings described below are only some embodiments of the present application, and other drawings may be derived from those drawings by those skilled in the art without inventive effort.
FIG. 1 is a block diagram illustrating a load balancing device test system in accordance with an exemplary embodiment.
Fig. 2 is a flow chart illustrating a method for load balancing device testing according to an example embodiment.
Fig. 3 is a flow chart illustrating a method of load balancing device testing in accordance with another exemplary embodiment.
Fig. 4 is a flow chart illustrating a method for load balancing device testing in accordance with another exemplary embodiment.
Fig. 5 is a flowchart illustrating a method of load balancing device testing, according to another example embodiment.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 7 is a block diagram illustrating a computer-readable medium in accordance with an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, systems, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the present concepts. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be appreciated by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present application and are, therefore, not intended to limit the scope of the present application.
The inventor of the present application finds that, in the prior art, by counting the number of newly established connections per second at a server, a client manually logs in to view the newly established connections per second by using a browser or respectively connects the servers to view the newly established connections per second. For example: the polling algorithm is to analyze whether the newly-built connection number of each background server is kept consistent or not and keep the connection number within a certain deviation value.
The disadvantages of the existing solutions mainly include the following aspects:
the statistical information is observed manually, and the inaccurate statistical data can not always accurately judge whether the connection result is completely consistent with the algorithm.
Each test requires manual intervention, which wastes a great deal of manpower to test.
The analysis is carried out depending on the statistics of the server, and the server type with poor expansibility and load cannot meet the requirement of automatic test.
In order to solve the bottleneck problem in the prior art, the application provides a method and a system for testing load balancing equipment, which solve the problem of automatic testing of the algorithm of the load balancer and make the testing of the load balancing algorithm of the load balancer more convenient and easier to use. The content of the present application is described in detail below with the aid of specific examples.
Fig. 1 is a system block diagram illustrating a method and system for testing load balancing devices according to an exemplary embodiment.
As shown in fig. 1, system architecture 10 may include clients 101, 102, 103, network 104 and load balancing device 105, backend servers 106, 107, 108, 109. The network 104 is used between the clients 101, 102, 103 and the load balancing device 105; the load balancing device 105 and the backend servers 106, 107, 108, 109 provide the medium of the communication link. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
Users can use clients 101, 102, 103 to interact with backend servers 106, 107, 108, 109, through network 104, load balancing device 105, to receive or send messages, etc. The clients 101, 102, 103 may have various communication client applications installed thereon, such as a traffic processing application, a web browser application, a traffic statistics application, an instant messaging tool, a mailbox client, social platform software, and the like.
Clients 101, 102, 103 may be a variety of electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablets, laptop and desktop computers, and the like.
The clients 101, 102, 103 may generate target traffic, for example, based on a target load balancing algorithm; the load balancing device 105 may, for example, be used to forward the target traffic into a plurality of backend servers; background servers 106, 107, 108, 109 may generate state information, for example, from the target traffic; the clients 101, 102, 103 may generate the test result of the load balancing device according to the state information corresponding to the plurality of background servers and the target load balancing algorithm, for example.
The load balancing device 105 and the backend servers 106, 107, 108, and 109 may each be a server of one entity, and may also be composed of multiple servers, for example, it should be noted that the load balancing device testing method provided in the embodiment of the present application may be executed by the clients 101, 102, and 103, the load balancing device 105, and the backend servers 106, 107, 108, and 109.
According to the load balancing equipment test system, target flow is generated through a target-based load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the mode that the test result of the load balancing equipment is generated according to the state information corresponding to the background servers and the target load balancing algorithm, automatic test can be performed on the load balancing equipment, the technical problem that the test can only be performed through a manual method in the prior art is solved, and the test cost is saved.
Fig. 2 is a flow chart illustrating a method for load balancing device testing according to an example embodiment. The load balancing device testing method 20 includes at least steps S202 to S208.
As shown in fig. 2, in S202, a target traffic is generated based on a target load balancing algorithm. The target load balancing algorithm may be determined by a plurality of load balancing algorithms; generating target flow according to the target load balancing algorithm and the number of background servers; and sending the target traffic to the load balancing equipment.
More specific configurable load balancing algorithms may include: a polling algorithm, a weighted polling algorithm, a minimum connection algorithm, a weighted minimum connection algorithm, a minimum flow algorithm, a weighted minimum flow algorithm; the type of the sending flow can also support HTTP, HTTP, RADIUS and DNS protocols; and sending request rate, and setting according to the number of the actual servers.
Wherein sending the target traffic to the load balancing device comprises: opening a virtual VIP port and a Vport in the load balancing device; sending the target traffic into a virtual VIP port and a Vport of the load balancing device.
In S204, the load balancing device forwards the target traffic to a plurality of background servers. The load balancing device may forward the target traffic to a plurality of backend servers, e.g., according to a built-in algorithm.
More specifically, the server load balancer may provide a virtual vip and a port vport to the outside, and the client sends a request of a specified type and continuously sends traffic of which the destination address and the port are the vip and the vport according to the configured sending rate. The load balancer can convert the destination address and the port of the traffic into the address and the port of the background server so as to achieve the effect of load balancing.
In S206, the plurality of background servers generate state information according to the target traffic. The plurality of background servers may, for example, obtain the target traffic; filtering the target flow to extract the local flow; and generating the state information according to the local flow.
Wherein generating the state information according to the local traffic comprises: and when the first data packet in the local flow is acquired, generating the state information according to the current system service connection number, the local address and the local port.
In S208, a test result of the load balancing device is generated according to the state information corresponding to the plurality of background servers and the target load balancing algorithm. Analyzing the state information corresponding to the background servers to generate background server addresses and port information; counting the distribution information of the background servers according to the addresses and the port information of the background servers; and comparing the distribution information with the target load balancing algorithm to generate a test result of the load balancing equipment.
In one embodiment, when the target load balancing algorithm is a polling algorithm, extracting the response sequence of the background server from the distribution information; and comparing the response sequence with a strategy corresponding to a polling algorithm to generate a test result of the load balancing equipment.
In one embodiment, when the target load balancing algorithm is a connection algorithm, extracting connection number and flow information of a background server from the distribution information; and comparing the connection number and the flow information of the background server with the strategy corresponding to the connection algorithm to generate a test result of the load balancing equipment.
According to the load balancing equipment testing method, target flow is generated through a target-based load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the mode that the test result of the load balancing equipment is generated according to the state information corresponding to the background servers and the target load balancing algorithm, automatic test can be performed on the load balancing equipment, the technical problem that the test can only be performed through a manual method in the prior art is solved, and the test cost is saved.
It should be clearly understood that this application describes how to make and use particular examples, but the principles of this application are not limited to any details of these examples. Rather, these principles can be applied to many other embodiments based on the teachings of the present disclosure.
Fig. 3 is a flow chart illustrating a method of load balancing device testing in accordance with another exemplary embodiment. The flow 30 shown in fig. 3 is a detailed description of the flow of the client.
As shown in fig. 3, in S302, the target load balancing algorithm is determined from a plurality of load balancing algorithms.
In S304, a target traffic is generated according to the target load balancing algorithm and the number of background servers. The standardized request tool can be used for continuously sending a certain number of requests to the virtual IP of the load balancing equipment, and the sending number per second can be set according to the number of servers and the performance of the load balancing equipment.
In one embodiment, the number of server load balancers is 4, the client can be set to 4000cps per second, corresponding to 1000cps for each real service.
In S306, the target traffic is sent to the load balancing device.
In S308, a test result of the load balancing device is generated according to the state information corresponding to the plurality of background servers and the target load balancing algorithm. And receiving the UDP information packet fed back by the background server for analysis, comparing the UDP information packet with the load balancing algorithm type model tested at this time, and judging whether the load balancing requirement is met.
In one embodiment, the client receives a UDP message sent by the server, analyzes data information and analyzes the ip and port information of the server in real time, and determines the statistical distribution times of the server according to the content of the feedback information.
More specifically, when the load balancing algorithm is a polling algorithm, whether the information responded by the server comes one by one or not is judged, and whether the information receiving times per second are consistent or the deviation is less than or equal to 1 or not is judged. More specifically, when the load balancing algorithm is the minimum traffic algorithm or the minimum connection algorithm, the received connection number and traffic information of each server need to be compared, and whether the newly received server is the minimum connection or the minimum traffic is determined.
Fig. 4 is a flow chart illustrating a method for load balancing device testing in accordance with another exemplary embodiment. The flow 40 shown in fig. 4 is a detailed description of the flow of the backend server.
As shown in fig. 4, in S402, the plurality of background servers obtain the target traffic.
In S404, the target traffic is filtered to extract local traffic. The real-time copy captures the specified flow and feeds back the reverse information. The method comprises the steps of performing connection and flow statistics by capturing flow in a network, and replying a UDP information message to a client address when receiving a first message of each connection, wherein the message carries the address and the port of the server. Connection and traffic information may also be sent periodically, e.g., every second.
In S406, when the first data packet in the local traffic is acquired, the state information is generated according to the current system service connection number, the local address, and the local port.
Fig. 5 is a flow chart illustrating a method for load balancing device testing in accordance with another exemplary embodiment. The flow 50 shown in fig. 5 is a detailed description of the flow of the load balancing apparatus test system.
As shown in fig. 5, in S502, the client generates target traffic based on a target load balancing algorithm.
In S504, the client sends the target traffic to the load balancing device.
In S506, the load balancing device forwards the target traffic to the background server according to a built-in algorithm.
In S508, the background server generates state information according to the target traffic.
In S510, the backend server sends the state information to the client.
In S512, the client generates a test result of the load balancing device according to the state information corresponding to the plurality of background servers and the target load balancing algorithm.
More specifically, in the application, the server may be deployed in an installation package manner, and the server sends a message captured in real time and feeds back information to the client to feed back which server the load is distributed to in a balanced manner. The server is deployed in a standard server installation mode to automatically test the load balancing algorithm, the application range is wide, and professional tester equipment is not required. The server side provides a basis for verifying a minimum connection algorithm and a minimum flow algorithm for the client side in a mode of counting the number of connections at regular time and sending the number to the client side.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. When executed by the CPU, performs the functions defined by the methods provided herein. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to exemplary embodiments of the present application, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed, for example, synchronously or asynchronously in multiple modules.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
An electronic device 600 according to this embodiment of the present application is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 that couples various system components including the memory unit 620 and the processing unit 610, a display unit 640, and the like.
Wherein the storage unit stores program code that can be executed by the processing unit 610, such that the processing unit 610 performs the steps according to various exemplary embodiments of the present application described in the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 2, 3, 4, 5.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM) 6201 and/or a cache memory unit 6202, and may further include a read-only memory unit (ROM) 6203.
The memory unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 600' (e.g., keyboard, pointing device, bluetooth device, etc.), such that a user can communicate with devices with which the electronic device 600 interacts, and/or any device (e.g., router, modem, etc.) with which the electronic device 600 can communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 650. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. The network adapter 660 may communicate with the other modules of the electronic device 600 via the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In general, the load balancing test system of the present disclosure is mainly divided into three modules: the system comprises a client flow generation module, a server module and a client information receiving module. And the client flow generation module is mainly used for generating the request flow. The module uses a standardized request tool to continuously send a certain number of requests to the virtual IP of the load balancing equipment, and the sending number per second can be set according to the number of servers and the performance of the load balancing equipment. Such as: the number of server load balancers is 4, the client can be set to 4000cps per second, and 1000cps should be allocated for each real service. And the server module is deployed on each server in the form of an installation package and is mainly used for copying and capturing specified flow and feeding back reverse information in real time. The module performs connection and flow statistics by capturing the flow in the network, and replies a UDP information message to the client address when receiving the first message of each connection, wherein the message carries the address and the port of the server. The module can send connection and flow information regularly every second. And the client information receiving module is used for receiving the UDP information packet fed back by the server module for analysis, comparing the UDP information packet with the load balancing algorithm type model tested at this time, and judging whether the load balancing requirement is met. The overall flow of the test system is as follows: configuring a client module traffic generation model, comprising: the test algorithm type is that the test system supports verification algorithms including a polling algorithm, a weighted polling algorithm, a minimum connection algorithm, a weighted minimum connection algorithm, a minimum flow algorithm and a weighted minimum flow algorithm; the flow type is sent, and the test system supports HTTP, HTTP, RADIUS and DNS protocols; and sending request rate, and setting according to the number of the actual servers. The server load balancer provides a virtual vip and a port vport for the outside, and the client sends a request of a specified type and continuously sends the traffic of which the destination address and the port are the vip and the vport according to the configured sending rate. The load balancer can convert the destination address and the port of the traffic into the addresses and the ports of the background servers rs1, rs2, rs3 and rs4 so as to achieve the effect of load balancing, and the load balancer forwards the traffic sent by the client to the background real server according to a preset algorithm. The server module captures and copies all the traffic, filters the traffic sent to the local service protocol and port, receives the traffic forwarded by the load balancer in real time, stores the connection number and the traffic of the system service and the local address and port in the client and sends the system service and the local address and port to the client when receiving the first data packet of each connection. And the client information receiving module receives the UDP message sent by the server, analyzes the data information and analyzes the ip and port information of the server in real time, and determines the statistical distribution times of the server according to the content of the feedback information. For example: and (4) a polling algorithm, namely judging whether the information responded by the server comes one by one, and whether the times of receiving the information per second are consistent or the deviation is less than or equal to 1. If the minimum flow algorithm or the minimum connection algorithm is selected, the received connection number and flow information of each server need to be compared, and whether the newly received connected server is the server with the minimum connection or the server with the minimum flow is judged.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present application.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: generating target flow based on a target load balancing algorithm; the load balancing equipment forwards the target traffic to a plurality of background servers; the plurality of background servers generate state information according to the target flow; and generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present application.
Exemplary embodiments of the present application are specifically illustrated and described above. It is to be understood that the application is not limited to the details of construction, arrangement, or method of implementation described herein; on the contrary, the intention is to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method for testing load balancing equipment is characterized by comprising the following steps:
generating target flow based on a target load balancing algorithm;
the load balancing equipment forwards the target traffic to a plurality of background servers;
the plurality of background servers generate state information according to the target flow;
and generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm.
2. The method of claim 1, wherein generating target traffic based on a target load balancing algorithm comprises:
determining the target load balancing algorithm from a plurality of load balancing algorithms;
generating target flow according to the target load balancing algorithm and the number of background servers;
and sending the target traffic to the load balancing equipment.
3. The method of claim 2, wherein sending the target traffic to the load balancing device comprises:
opening a virtual VIP port and a Vport in the load balancing device;
sending the target traffic into a virtual VIP port and a Vport of the load balancing device.
4. The method of claim 1, wherein the load balancing device forwarding the target traffic to a plurality of background servers comprises:
and the load balancing equipment forwards the target flow to a plurality of background servers according to a built-in algorithm.
5. The method of claim 1, wherein the plurality of backend servers generating state information from the target traffic comprises:
the plurality of background servers acquire the target flow;
filtering the target flow to extract the local flow;
and generating the state information according to the local flow.
6. The method of claim 5, wherein generating the state information from the native traffic comprises:
and when the first data packet in the local flow is acquired, generating the state information according to the current system service connection number, the local address and the local port.
7. The method of claim 1, wherein generating the test result of the load balancing device according to the state information corresponding to the plurality of background servers and the target load balancing algorithm comprises:
analyzing the state information corresponding to the background servers to generate background server addresses and port information;
counting the distribution information of the background servers according to the addresses and the port information of the background servers;
and comparing the distribution information with the target load balancing algorithm to generate a test result of the load balancing equipment.
8. The method of claim 7, wherein comparing the allocation information to the target load balancing algorithm to generate a test result for the load balancing device comprises:
when the target load balancing algorithm is a polling algorithm, extracting a response sequence of the background server from the distribution information;
and comparing the response sequence with a strategy corresponding to a polling algorithm to generate a test result of the load balancing equipment.
9. The method of claim 7, wherein comparing the allocation information to the target load balancing algorithm to generate a test result for the load balancing device comprises:
when the target load balancing algorithm is a connection algorithm, extracting the connection number and the flow information of the background server from the distribution information;
and comparing the connection number and the flow information of the background server with the strategy corresponding to the connection algorithm to generate a test result of the load balancing equipment.
10. A load balancing device test system, comprising:
the client is used for generating target flow based on a target load balancing algorithm; generating a test result of the load balancing equipment according to the state information corresponding to the background servers and the target load balancing algorithm;
the load balancing equipment is used for forwarding the target traffic to a plurality of background servers;
and the background servers are used for generating state information according to the target flow.
CN202210871758.7A 2022-07-23 2022-07-23 Load balancing equipment testing method and system Active CN115277506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210871758.7A CN115277506B (en) 2022-07-23 2022-07-23 Load balancing equipment testing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210871758.7A CN115277506B (en) 2022-07-23 2022-07-23 Load balancing equipment testing method and system

Publications (2)

Publication Number Publication Date
CN115277506A true CN115277506A (en) 2022-11-01
CN115277506B CN115277506B (en) 2023-05-23

Family

ID=83770799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210871758.7A Active CN115277506B (en) 2022-07-23 2022-07-23 Load balancing equipment testing method and system

Country Status (1)

Country Link
CN (1) CN115277506B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101477008B1 (en) * 2014-04-08 2014-12-29 주식회사 파이오링크 Method, apparatus, system and computer-readable recording medium for testing load balancing device
US20150081762A1 (en) * 2013-09-13 2015-03-19 Aol Inc. Systems and methods for distributing network traffic between servers based on elements in client packets
CN108667692A (en) * 2018-07-06 2018-10-16 厦门网宿有限公司 A kind of performance test methods and system of distributed caching equipment load balance
CN109981419A (en) * 2019-04-11 2019-07-05 苏州浪潮智能科技有限公司 Test method, device, system, equipment and the storage medium of load balancing characteristic
CN110381043A (en) * 2019-07-08 2019-10-25 杭州迪普科技股份有限公司 Server health detecting method, device, electronic equipment based on SSL
CN111130936A (en) * 2019-12-24 2020-05-08 杭州迪普科技股份有限公司 Method and device for testing load balancing algorithm
CN112559129A (en) * 2020-12-16 2021-03-26 西安电子科技大学 Device and method for testing load balancing function and performance of virtualization platform
CN112866338A (en) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 Server state detection method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150081762A1 (en) * 2013-09-13 2015-03-19 Aol Inc. Systems and methods for distributing network traffic between servers based on elements in client packets
KR101477008B1 (en) * 2014-04-08 2014-12-29 주식회사 파이오링크 Method, apparatus, system and computer-readable recording medium for testing load balancing device
CN108667692A (en) * 2018-07-06 2018-10-16 厦门网宿有限公司 A kind of performance test methods and system of distributed caching equipment load balance
CN109981419A (en) * 2019-04-11 2019-07-05 苏州浪潮智能科技有限公司 Test method, device, system, equipment and the storage medium of load balancing characteristic
CN110381043A (en) * 2019-07-08 2019-10-25 杭州迪普科技股份有限公司 Server health detecting method, device, electronic equipment based on SSL
CN111130936A (en) * 2019-12-24 2020-05-08 杭州迪普科技股份有限公司 Method and device for testing load balancing algorithm
CN112559129A (en) * 2020-12-16 2021-03-26 西安电子科技大学 Device and method for testing load balancing function and performance of virtualization platform
CN112866338A (en) * 2020-12-31 2021-05-28 杭州迪普科技股份有限公司 Server state detection method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
于天放;芮兰兰;邱雪松;: "基于软件定义网络的服务器集群负载均衡技术研究", 电子与信息学报 *
幸福;杨峰;燕霄翔;王文志;: "Linux服务器下多网口负载均衡算法的研究", 计算机工程与应用 *
张晏刚;王首珏;葛伟炬;: "基于虚拟IP的网络服务器负载均衡设计与应用", 中国数字医学 *
陈泰安;: "一种改进的动态反馈负载均衡算法", 电子设计工程 *

Also Published As

Publication number Publication date
CN115277506B (en) 2023-05-23

Similar Documents

Publication Publication Date Title
US9459987B2 (en) Method and system for comparing different versions of a cloud based application in a production environment using segregated backend systems
CN108173938B (en) Server load distribution method and device
US20150278523A1 (en) Method and system for testing cloud based applications and services in a production environment using segregated backend systems
CN113726607B (en) Network detection method and device, electronic equipment and storage medium
CN111800501B (en) Method and device for processing service request, storage medium and electronic equipment
CN113364804B (en) Method and device for processing flow data
CN108093036B (en) Method and device for acquiring resources
CN113691589A (en) Message transmission method, device and system
US10015086B2 (en) Multi GTM based routing to avoid latencies
US11516138B2 (en) Determining network flow direction
CN111010453B (en) Service request processing method, system, electronic device and computer readable medium
Hernández-Orallo et al. Web server performance analysis using histogram workload models
CN115277506B (en) Load balancing equipment testing method and system
CN112994934B (en) Data interaction method, device and system
CN113179317B (en) Test system and method for content rewriting device
CN114449523B (en) Flow filtering method, device, equipment and medium for satellite measurement and control system
CN112260903B (en) Link monitoring method and device
CN115022333A (en) Message forwarding method and device of load balancing equipment and electronic equipment
CN117882357A (en) Detecting and quantifying delay components when accessing cloud services
US20210337041A1 (en) Orchestrated proxy service
CN114650271B (en) Global load DNS neighbor site learning method and device
CN112436951A (en) Method and device for predicting flow path
CN113691462A (en) Response method and device of Internet group management protocol
CN115250254A (en) Netflow message distribution processing method and device
CN117061246A (en) Internet of things risk safety management and control system and Internet of things safety supervision method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant