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

Load balancing equipment testing method and system Download PDF

Info

Publication number
CN115277506B
CN115277506B CN202210871758.7A CN202210871758A CN115277506B CN 115277506 B CN115277506 B CN 115277506B CN 202210871758 A CN202210871758 A CN 202210871758A CN 115277506 B CN115277506 B CN 115277506B
Authority
CN
China
Prior art keywords
load balancing
target
algorithm
flow
background servers
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210871758.7A
Other languages
Chinese (zh)
Other versions
CN115277506A (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present disclosure relates to a load balancing device testing method, system, electronic device, and computer readable medium. The method comprises the following steps: generating a target flow based on a target load balancing algorithm; the load balancing equipment forwards the target flow 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 plurality of background servers and the target load balancing algorithm. The load balancing equipment testing method, the system, the electronic equipment and the computer readable medium can automatically test 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 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, a system, an electronic device, and a computer readable medium for testing a load balancing device.
Background
Server load balancing is established on the existing network structure, and provides a cheap, effective and transparent method for expanding the bandwidth of network equipment and servers, increasing throughput, enhancing network data processing capacity and improving flexibility and usability of the network. Load balancing (Load balancing) means that the Load balancing is distributed to a plurality of operation units for execution, such as Web servers, FTP servers, enterprise key application servers, other key task servers, and the like, so as to jointly complete work tasks.
With the continuous development of network technology, a single server is limited by physical memory and processing capacity of a CPU (Central processing Unit), the continuous network demand cannot be met, once the server fails, the server cannot be guaranteed to continue to provide service, a load balancer can expand the bandwidth of the server for providing a transparent, economical and efficient method, the throughput of a network can be effectively improved, the network has stronger availability and flexibility, and the problems of server overload, high request delay and single point of failure caused by large network flow are solved. The load balancing algorithm is used as a core function of the load balancing software, and a method capable of automatically analyzing the balancing effect of the server is needed in the iteration of the load balancing software so as to achieve the purpose of automatic verification.
The above information disclosed in the background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the 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 automatically test the load balancing device, solve the technical problem that only manual testing can be performed in the prior art, and save testing cost.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned in part by the practice of the application.
According to an aspect of the present application, a load balancing device testing method is provided, which includes: generating a target flow based on a target load balancing algorithm; the load balancing equipment forwards the target flow 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 plurality of background servers and the target load balancing algorithm.
In one exemplary embodiment of the present application, generating a 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 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: starting a virtual VIP port and a virtual protocol (Vport) in the load balancing equipment; and sending the target traffic to a virtual VIP port and a Vport of the load balancing equipment.
In an exemplary embodiment of the present application, the load balancing device forwards the target traffic to a plurality of background servers, including: 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 plurality of background servers generates status information according to the target traffic, including: 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 status 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 background servers and the target load balancing algorithm includes: analyzing the state information corresponding to the plurality of background servers to generate background server addresses and port information; counting the distribution information of the plurality of 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 allocation information and 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 the response sequence of the background server from the allocation 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 allocation information and 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 connection number and flow information of a background server from the allocation information; and comparing the connection number and the flow information of the background server with strategies corresponding to a 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, the 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 state information corresponding to a plurality of background servers and the target load balancing algorithm; load balancing equipment, which is used for forwarding the target flow to a plurality of background servers; and the plurality of background servers are used for generating state information according to the target flow.
According to an aspect of the present application, there is provided an electronic device including: one or more processors; a storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the methods as described above.
According to an aspect of the present application, a computer-readable medium is presented, on which a computer program is stored, which program, when being executed by a processor, implements a method as described above.
According to the load balancing device testing method, the system, the electronic device and the computer readable medium, the target flow is generated through a target load balancing algorithm; the load balancing equipment forwards the target flow to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the state information corresponding to the plurality of background servers and the mode of generating the test result of the load balancing equipment by the target load balancing algorithm, the automatic test of the load balancing equipment can be performed, the technical problem that the load balancing equipment can only be tested by 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 obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a block diagram illustrating a load balancing device testing system, according to an example embodiment.
Fig. 2 is a flow chart illustrating a method of load balancing device testing, according to an example embodiment.
Fig. 3 is a flow chart illustrating a method of load balancing device testing according to another exemplary embodiment.
Fig. 4 is a flow chart illustrating a method of load balancing device testing according to another exemplary embodiment.
Fig. 5 is a flow chart illustrating a method of load balancing device testing according to another exemplary embodiment.
Fig. 6 is a block diagram of an electronic device, according to an example embodiment.
Fig. 7 is a block diagram of a computer-readable medium shown according to an example embodiment.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be embodied in many 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 the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar parts, 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 present application. One skilled in the relevant art will recognize, however, that the aspects of the application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, etc. 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 depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they 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 order of actual execution may be changed according to actual situations.
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 element. Thus, a first component discussed below could be termed a second component without departing from the teachings of the present application concept. As used herein, the term "and/or" includes any one of the associated listed items and all combinations of one or more.
Those skilled in the art will appreciate that the drawings are schematic representations of example embodiments, and that the modules or flows in the drawings are not necessarily required to practice the present application, and therefore, should not be taken to limit the scope of the present application.
The inventor of the application finds that in the prior art, the client can use a browser to manually log in and check or respectively connect with each server to check by counting the newly established connection number per second at the server. For example: the polling algorithm is to analyze whether each background server establishes a new connection number and keep the same or not, and keep the new connection number within a certain deviation value.
The drawbacks of the existing solutions mainly include the following:
the statistical information is observed manually, and the inaccuracy of the statistical data does not necessarily enable accurate judgment of whether the connection result is completely consistent with the algorithm.
Each test requires manual intervention, wasting a lot of manpower to perform the test.
The analysis is performed depending on statistics of the server, and the type of the server 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 an algorithm of a load balancing device and enable testing of the load balancing algorithm of the load balancing device to be more convenient and easy to use. The following describes the content of the present application in detail by means of specific examples.
Fig. 1 is a system block diagram of a load balancing device testing method, system, according to an example embodiment.
As shown in fig. 1, the system architecture 10 may include clients 101, 102, 103, a network 104 and load balancing devices 105, and background servers 106, 107, 108, 109. The network 104 is used between the clients 101, 102, 103 and the load balancing device 105; the media providing the communication links between the load balancing device 105 and the background servers 106, 107, 108, 109. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the background servers 106, 107, 108, 109, through the network 104, the load balancing device 105, using the clients 101, 102, 103, to receive or send messages, etc. Various communication client applications may be installed on clients 101, 102, 103, such as a traffic handling class application, a web browser application, a traffic statistics class application, an instant messaging tool, a mailbox client, social platform software, and the like.
The clients 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The clients 101, 102, 103 may generate target traffic, e.g., based on a target load balancing algorithm; the load balancing device 105 may be used, for example, to forward the target traffic to a plurality of backend servers; the background servers 106, 107, 108, 109 may, for example, generate status information from the target traffic; the clients 101, 102, 103 may generate test results of the load balancing device, for example, according to state information corresponding to the plurality of background servers and the target load balancing algorithm.
The load balancing device 105 and the background servers 106, 107, 108, 109 may be servers of one entity, and may also be, for example, a plurality of servers, and it should be noted that the load balancing device testing method provided in the embodiments of the present application may be executed by the clients 101, 102, 103, the load balancing device 105, and the background servers 106, 107, 108, 109.
According to the load balancing equipment testing system, the target flow is generated through a target load balancing algorithm; the load balancing equipment forwards the target flow to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the state information corresponding to the plurality of background servers and the mode of generating the test result of the load balancing equipment by the target load balancing algorithm, the automatic test of the load balancing equipment can be performed, the technical problem that the load balancing equipment can only be tested by a manual method in the prior art is solved, and the test cost is saved.
Fig. 2 is a flow chart illustrating a method of load balancing device testing, according to an example embodiment. The load balancing device testing method 20 at least includes 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 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.
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 traffic type is sent, and HTTP, HTTP, RADIUS and DNS protocols can be supported; the request rate is sent and set according to the number of actual servers.
Wherein sending the target traffic to the load balancing device comprises: starting a virtual VIP port and a virtual protocol (Vport) in the load balancing equipment; and sending the target traffic to a virtual VIP port and a Vport of the load balancing equipment.
In S204, the load balancing device forwards the target traffic to a plurality of backend servers. The load balancing device may forward the target traffic to a plurality of backend servers, for example, according to a built-in algorithm.
More specifically, the server load balancer can provide a virtual vip and a port vport for the outside, and the client sends a request of a specified type to continuously send traffic with destination addresses and ports vip and vport according to a configured sending rate. The load balancer can convert the flow destination address and port into the address and port of the background server so as to achieve the effect of load balancing.
In S206, the plurality of background servers generate status information according to the target traffic. The plurality of backend 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 status 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 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 plurality of background servers to generate background server addresses and port information; counting the distribution information of the plurality of 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 sequence of the background server response from the allocation 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, the connection number and the flow information of the background server are extracted from the allocation information; and comparing the connection number and the flow information of the background server with strategies corresponding to a connection algorithm to generate a test result of the load balancing equipment.
According to the load balancing equipment testing method, the target flow is generated based on a target load balancing algorithm; the load balancing equipment forwards the target flow to a plurality of background servers; the plurality of background servers generate state information according to the target flow; according to the state information corresponding to the plurality of background servers and the mode of generating the test result of the load balancing equipment by the target load balancing algorithm, the automatic test of the load balancing equipment can be performed, the technical problem that the load balancing equipment can only be tested by 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 according to 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. A standardized request tool may be used to continuously send a number of requests to the virtual IP of the load balancing device, the number of requests sent per second may be set according to the number of servers and the performance of the load balancing device.
In one embodiment, the number of server load balancers is 4, then the client may be set to 4000cps per second, which should be allocated 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, analyzing, comparing with the load balancing algorithm type model tested at the time, and judging whether the load balancing requirement is met.
In one embodiment, the client receives the UDP message sent by the server, parses the data information in real time, parses the server ip and the port information, and determines the number of times of server statistics allocation according to the feedback information content.
More specifically, when the load balancing algorithm is a polling algorithm, whether the information responded by the server comes one by one is judged, and whether the times of receiving the information per second is consistent or the deviation is less than or equal to 1. More specifically, when the load balancing algorithm is the minimum traffic algorithm or the minimum connection algorithm, the load balancing algorithm needs to be compared with the received connection number and traffic information of each server, and whether the newly connected server is the minimum connection or the minimum traffic is judged.
Fig. 4 is a flow chart illustrating a method of load balancing device testing according to another exemplary embodiment. The flow 40 shown in fig. 4 is a detailed description of the flow of the background server.
As shown in fig. 4, in S402, the plurality of backend servers acquire the target traffic.
In S404, the target traffic is filtered to extract the local traffic. The real-time replication captures the specified traffic and feeds back the reverse information. And carrying out connection and flow statistics by capturing the flow in the network, and replying a UDP message to the address of the client when receiving the 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, for example, on a regular basis 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 of load balancing device testing according to another exemplary embodiment. The flow 50 shown in fig. 5 is a detailed description of the flow of the load balancing device testing system.
As shown in fig. 5, in S502, the client generates a target traffic based on a target load balancing algorithm.
In S504, the client transmits 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 status information according to the target traffic.
In S510, the background server transmits the status 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 present application, a service end may be deployed in an installation package manner, and the service end uses a manner of capturing a message in real time and feeding back information to send to a client to feed back to which server is specifically allocated in a load balancing manner. The server is deployed in the installation mode of the standard server to carry out automatic test of the load balancing algorithm, so that the application range is wide, and professional tester equipment is not required to be applied. The server side adopts a mode of counting the number of connections regularly and sending the number to the client side to provide the basis for verifying the minimum connection algorithm and the minimum flow algorithm for the client side.
Those skilled in the art will appreciate that all or part of the steps implementing the above described embodiments are implemented as a computer program executed by a CPU. When executed by a CPU, performs the functions defined by the above methods provided herein. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic disk or an optical disk, etc.
Furthermore, it should be noted that the above-described figures are merely illustrative of the processes involved in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above figures do not indicate or limit the temporal order of these processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, for example, among a plurality of modules.
Fig. 6 is a block diagram of an electronic device, according to 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 merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 6, the electronic device 600 is in the form of a general purpose computing device. Components of 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 connecting the different system components (including the memory unit 620 and the processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs steps described in the present specification according to various exemplary embodiments of the present application. For example, the processing unit 610 may perform the steps as shown in fig. 2, 3, 4, 5.
The memory unit 620 may include readable media in the form of volatile memory units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage 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 or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing 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 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.), devices that enable a user to interact with the electronic device 600, and/or any devices (e.g., routers, modems, etc.) that the electronic device 600 can communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
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. The client flow generation module is mainly used for generating 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 device, wherein the sending number per second can be set according to the number of servers and the performance of the load balancing device. Such as: the number of server load balancers is 4, the client can be set to 4000cps per second, which should be allocated to 1000cps for each real service. The server module is deployed on each server in the form of an installation package and mainly copies and captures the specified flow and feedback reverse information in real time. The module performs connection and traffic statistics by capturing traffic in the network, and replies a UDP message to the client address when receiving the first message of each connection, the message carrying the address and port of the server. The module will send connection and traffic information at a regular time every second. And the client information receiving module receives the UDP information packet fed back by the server module, analyzes the UDP information packet, compares the UDP information packet with the load balancing algorithm type model tested at the time, and judges 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 the verified algorithm 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 test system supports HTTP, HTTP, RADIUS and DNS protocols; the request rate is sent and set according to the number of actual servers. The server load balancer provides a virtual vip and a port vport to the outside, and the client sends a request of a specified type to continuously send the traffic with destination addresses and ports vip and vport according to the configured sending rate. The load balancer can convert the flow destination address and port into the addresses and 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 flow sent by the client to the background real server according to a preset algorithm. The server module captures and replicates 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, and stores the connection number and traffic of the system service and the local address and port in the client and sends the client when receiving the first data packet of each connection. The client information receiving module receives the UDP message sent by the server, analyzes the data information and the server ip and port information in real time, and determines the statistical distribution times of the server according to the feedback information content. For example: and the polling algorithm judges whether the information responded by the server comes one by one and whether the times of receiving the information every second is consistent or the deviation is less than or equal to 1. If the minimum flow algorithm or the minimum connection algorithm is selected, the minimum connection algorithm needs to be compared with the received connection number and flow information of each server, and whether the newly connected server is the minimum connection or the minimum flow is judged.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or may be implemented in software in combination with the necessary hardware. Thus, as shown in fig. 7, the technical solution according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and includes several instructions to cause a computing device (may be a personal computer, a server, or a network device, etc.) to perform the above-described method according to the embodiments 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. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk 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 data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium 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, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, 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., connected via the Internet using an Internet service provider).
The computer-readable medium carries one or more programs, which when executed by one of the devices, cause the computer-readable medium to perform the functions of: generating a target flow based on a target load balancing algorithm; the load balancing equipment forwards the target flow 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 plurality of background servers and the target load balancing algorithm.
Those skilled in the art will appreciate that the modules may be distributed throughout several devices as described in the embodiments, and that corresponding variations may be implemented in one or more devices that are unique to the embodiments. The modules of the above embodiments may be combined into one module, or may be further split into a plurality of sub-modules.
From the above description of embodiments, those skilled in the art will readily appreciate that the example embodiments described herein may be implemented in software, or in combination with the necessary hardware. Thus, the technical solutions according to the embodiments of the present application may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (may be a CD-ROM, a U-disk, a mobile hard disk, etc.) or on a network, and include several instructions to cause a computing device (may be a personal computer, a server, a mobile terminal, or a network device, etc.) to perform the methods according to the embodiments of the present application.
Exemplary embodiments of the present application are specifically illustrated and described above. It is to be understood that this application is not limited to the details of construction, arrangement or method of implementation described herein; on the contrary, the application is intended 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, comprising:
generating a target flow based on a target load balancing algorithm;
the load balancing equipment forwards the target flow 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 plurality of background servers and the target load balancing algorithm.
2. The method of claim 1, wherein generating the target traffic based on the 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:
starting a virtual VIP port and a virtual protocol (Vport) in the load balancing equipment;
and sending the target traffic to a virtual VIP port and a Vport of the load balancing equipment.
4. The method of claim 1, wherein the load balancing device forwarding the target traffic to a plurality of background servers, comprising:
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 background servers generate status information from the target traffic, comprising:
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 status information from 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.
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 plurality of background servers to generate background server addresses and port information;
counting the distribution information of the plurality of 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 with the target load balancing algorithm to generate test results for the load balancing device comprises:
when the target load balancing algorithm is a polling algorithm, extracting the response sequence of the background server from the allocation 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 with the target load balancing algorithm to generate test results for the load balancing device comprises:
when the target load balancing algorithm is a connection algorithm, extracting connection number and flow information of a background server from the allocation information;
and comparing the connection number and the flow information of the background server with strategies corresponding to a connection algorithm to generate a test result of the load balancing equipment.
10. A load balancing device testing 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 state information corresponding to a plurality of background servers and the target load balancing algorithm;
load balancing equipment, which is used for forwarding the target flow to a plurality of background servers;
and the plurality of 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 CN115277506A (en) 2022-11-01
CN115277506B true 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 (7)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9461922B2 (en) * 2013-09-13 2016-10-04 Aol Inc. Systems and methods for distributing network traffic between servers based on elements in client packets

Patent Citations (7)

* 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
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服务器下多网口负载均衡算法的研究;幸福;杨峰;燕霄翔;王文志;;计算机工程与应用(第24期);全文 *
一种改进的动态反馈负载均衡算法;陈泰安;;电子设计工程(第05期);全文 *
基于虚拟IP的网络服务器负载均衡设计与应用;张晏刚;王首珏;葛伟炬;;中国数字医学(第04期);全文 *
基于软件定义网络的服务器集群负载均衡技术研究;于天放;芮兰兰;邱雪松;;电子与信息学报(第12期);全文 *

Also Published As

Publication number Publication date
CN115277506A (en) 2022-11-01

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
CN111431758B (en) Cloud network equipment testing method and device, storage medium and computer equipment
CN113726607B (en) Network detection method and device, electronic equipment and storage medium
CA2937845A1 (en) Method and system for testing cloud based applications and services in a production environment using segregated backend systems
CN113364804B (en) Method and device for processing flow data
CN111800501B (en) Method and device for processing service request, storage medium and electronic equipment
CN113259479A (en) Data processing method and equipment
CN114697391B (en) Data processing method, device, equipment and storage medium
CN113890879A (en) Load balancing method and device for data access, computer equipment and medium
CN115277506B (en) Load balancing equipment testing method and system
CN112994934B (en) Data interaction method, device and system
CN112260903B (en) Link monitoring method and device
CN113179317B (en) Test system and method for content rewriting device
CN115022333A (en) Message forwarding method and device of load balancing equipment and electronic equipment
CN108696598B (en) Method and device for transparently transmitting message received by stateless service through long connection under micro-service architecture
CN111917835A (en) System, method and device for monitoring network data
CN115250254B (en) Netflow message distribution processing method and device
CN111078477A (en) Interface test method and device, storage medium and electronic equipment
CN116260855B (en) Communication method, communication device, electronic equipment and storage medium
CN112436951A (en) Method and device for predicting flow path
CN114650271B (en) Global load DNS neighbor site learning method and device
CN113691462B (en) Response method and device of Internet group management protocol
Pawar et al. Developing a big-data-based model to study and analyze network traffic
CN106060158B (en) Method and device for judging state of target equipment

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