CN111008075B - Load balancing system, method, device, equipment and medium - Google Patents

Load balancing system, method, device, equipment and medium Download PDF

Info

Publication number
CN111008075B
CN111008075B CN201911235942.7A CN201911235942A CN111008075B CN 111008075 B CN111008075 B CN 111008075B CN 201911235942 A CN201911235942 A CN 201911235942A CN 111008075 B CN111008075 B CN 111008075B
Authority
CN
China
Prior art keywords
source
data
request data
port
load balancing
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
CN201911235942.7A
Other languages
Chinese (zh)
Other versions
CN111008075A (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.)
Anchao Cloud Software Co Ltd
Original Assignee
Anchao Cloud Software 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 Anchao Cloud Software Co Ltd filed Critical Anchao Cloud Software Co Ltd
Priority to CN201911235942.7A priority Critical patent/CN111008075B/en
Publication of CN111008075A publication Critical patent/CN111008075A/en
Application granted granted Critical
Publication of CN111008075B publication Critical patent/CN111008075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • 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 invention discloses a load balancing system, which comprises: the virtual router is used for receiving the request data sent by the client, determining a target link from a plurality of pre-established communication links and sending the request data to the virtual load balancer according to the target link; the virtual load balancer is used for determining a target server according to the received request data and preset rules; and transmits the received request data to the target server. Therefore, the virtual load balancer provided by the invention has a plurality of network card resources for receiving the request data and processing the request data, so that the processing capacity of the virtual load balancer is increased; therefore, CPU resources and memory resources of the virtual load balancer can be fully utilized, resource waste is avoided, and the requirements of users can be better met. In addition, the load balancing method, the load balancing device, the load balancing equipment and the load balancing medium provided by the invention correspond to the method.

Description

Load balancing system, method, device, equipment and medium
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a load balancing system, a method, an apparatus, a device, and a medium.
Background
With the rapid development of cloud computing technology, load balancers are also widely used in various industries. The load balancer is classified into a software load balancer represented by HAProxy, LVS, ngnix and the like and a hardware load balancer represented by F5. Because of the low cost of constructing a software load balancer, software load balancers are commonly employed in the use scenario of cloud computing.
FIG. 1 is a schematic diagram of a prior art virtual load balancer application; as shown in fig. 1, the prior art constructs a virtual load balancer, that is, a software load balancer, by means of a software design. Because the client and the virtual load balancer can only establish connection through a unique IP address, that is, only one network card can be provided to process the message sent by the client, the virtual load balancer processes the received message and sends the processed message to the back-end server cluster.
In the prior art, the virtual load balancer can only provide one network card for processing the message sent by the client, so that the capability of the virtual load balancer for processing the message is limited. For example, in an application scenario where the client side is highly concurrent with the message, when the virtual load balancer processes the received message, the resources provided by the network card are already occupied, and cannot process more messages sent by the client side, but the virtual load balancer still remains a lot of CPU resources and memory resources. Therefore, the capability of the virtual load balancer for providing network card resources limits the capability of the virtual load balancer for processing messages, which is easy to cause resource waste and can not better meet the demands of users.
Disclosure of Invention
The invention aims to provide a load balancing system, a method, a device, equipment and a medium, which can provide a virtual load balancer with a plurality of network card resources, and are used for receiving request data and processing the request data, so as to increase the processing capacity of the virtual load balancer; the CPU resource and the memory resource of the virtual load balancer can be fully utilized, so that resource waste is avoided, and the requirements of users can be better met.
In order to solve the above technical problems, the present invention provides a load balancing system, including:
the virtual router is used for receiving the request data sent by the client, determining a target link from a plurality of pre-established communication links and sending the request data to the virtual load balancer according to the target link;
the virtual load balancer is used for determining a target server according to the received request data and preset rules; and transmitting the received request data to the target server.
In order to solve the technical problem, the invention also provides a load balancing method, which comprises the following steps:
receiving request data sent by a client;
determining a target link from a plurality of pre-established communication links;
determining a target server according to the request data and preset rules;
and sending the request data to a target server according to the target link.
Preferably, the determining the target link from the plurality of pre-established communication links specifically includes:
acquiring first data source information contained in the request data; the first data source information specifically includes a first source address, a first source port, a first source server port and a first protocol;
calculating hash values of the first source address, the first source port, the first source server port and the first protocol;
and determining the link meeting the preset condition as a target link according to the hash value.
Preferably, the method further comprises:
acquiring second data source information contained in the request data transmitted through the target link; the second data source information specifically includes a second source address, a second source port, a second source server port and a second protocol for sending the request data;
and recording and marking the second data source information.
Preferably, the method further comprises:
judging whether response data sent by the target server are received or not;
if yes, obtaining the data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending the response data;
judging whether the data destination information meets the routing rule or not according to a preset routing rule;
and if so, feeding back the response data to the client.
Preferably, the routing rule is specifically that the destination address is the same as the second source address, the destination port is the same as the second source port, the destination server port is the same as the second source server port, and the destination protocol is the same as the second protocol.
Preferably, the method further comprises:
judging whether response data sent by the target server are received within preset time or not;
if not, detecting whether the target link is normal in communication;
if not, the alarm prompt is carried out.
In order to solve the technical problem, the present invention further provides a load balancing device, including:
the receiving module is used for receiving the request data sent by the client;
the first determining module is used for determining a target link from a plurality of pre-established communication links;
the second determining module is used for determining a target server according to the request data and preset rules;
and the sending module is used for sending the request data to a target server according to the target link.
In order to solve the technical problem, the invention also provides load balancing equipment, which comprises a memory for storing a computer program;
a processor for implementing the steps of the load balancing method according to any one of the preceding claims when executing the computer program.
To solve the above technical problem, the present invention further provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the load balancing method according to any one of the above.
The invention provides a load balancing system, which comprises: the virtual router is used for receiving the request data sent by the client, determining a target link from a plurality of pre-established communication links and sending the request data to the virtual load balancer according to the target link; the virtual load balancer is used for determining a target server according to the received request data and preset rules; and transmits the received request data to the target server. Through a plurality of communication links established in advance, a plurality of network card resources can be provided for the virtual load equalizer. Therefore, the virtual load balancer provided by the invention has a plurality of network card resources for receiving the request data and processing the request data, so that the processing capacity of the virtual load balancer is increased; therefore, CPU resources and memory resources of the virtual load balancer can be fully utilized, resource waste is avoided, and the requirements of users can be better met.
In addition, the load balancing method, the load balancing device, the load balancing equipment and the load balancing medium provided by the invention correspond to the method and have the same beneficial effects.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a schematic diagram of a prior art virtual load balancer application;
fig. 2 is a block diagram of a load balancing system according to an embodiment of the present invention;
fig. 3 is an application schematic diagram of a load balancing system according to an embodiment of the present invention;
fig. 4 is a flowchart of a load balancing method according to an embodiment of the present invention;
fig. 5 is a flowchart of another load balancing method according to an embodiment of the present invention;
fig. 6 is a block diagram of a load balancing device according to an embodiment of the present invention;
fig. 7 is a block diagram of a load balancing device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The core of the invention is to provide a load balancing system, a method, a device, equipment and a medium, which can provide a virtual load balancer with a plurality of network card resources, and is used for receiving request data and processing the request data, so as to increase the processing capacity of the virtual load balancer; the CPU resource and the memory resource of the virtual load balancer can be fully utilized, so that resource waste is avoided, and the requirements of users can be better met.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description.
Fig. 2 is a block diagram of a load balancing system according to an embodiment of the present invention; as shown in fig. 2, a load balancing system 1 provided in an embodiment of the present invention includes:
the virtual router 2 is configured to receive the request data sent by the client, determine a target link from a plurality of communication links established in advance, and send the request data to the virtual load balancer 3 according to the target link;
a virtual load balancer 3 for determining a target server according to a preset rule based on the received request data; and transmits the received request data to the target server.
In an implementation, the virtual router 2 establishes a communication link with the client for receiving the request data sent by the client. After receiving the request data, the virtual router 2 determines a target link among a plurality of communication links established in advance with the virtual load balancer 3, and transmits the request data to the virtual load balancer 3 through the target link. The virtual load balancer 3 determines a target server in the back-end server cluster according to a preset rule from the received request data, and sends a request message to the target server. It can be understood that, the preset rule is a formulated load balancing rule, and the detailed load balancing technique for specifying the load balancing rule can be referred to the prior art, which is not repeated in the embodiments of the present invention. It should be noted that, the communication link provided by the present invention is specifically a wired communication link, and may also be a wireless communication link, which is not limited by the embodiment of the present invention.
Fig. 3 is an application schematic diagram of a load balancing system according to an embodiment of the present invention; in order to make the technical scheme of the system further clear to those skilled in the art, specific application scenarios are given below.
As shown in fig. 3, after receiving the request data, the virtual router 2 may acquire first data source information included in the request data; the first data source information specifically comprises a first source address, a first source port, a first source server port and a first protocol; it should be noted that the data source information is specifically information of the request data transmitting end. The first source address in the application scene is the client address, the first source port is the client port, and the first source server port is the server for sending the request data. The virtual router 2 may determine the target link from among the plurality of communication links previously established by the acquired first data source information. Specifically, hash values of a first source address, a first source port, a first source server port and a first protocol are calculated; and determining the link meeting the preset condition as a target link according to the hash value. In the present application scenario, one may be determined as the target link from one communication link composed of IP 10.10.10.3 and 10.10.10.2 and another communication link composed of IP 11.11.11.3 and 11.11.11.2. The preset condition may be that what is the remainder of dividing the calculated hash value by the number of communication links established in advance, and then determining what communication link is to be the destination link accordingly. For example, the communication link consisting of IP 10.10.10.3 and 10.10.10.2 is determined as the target link, that is, the link where the network card with the virtual router IP 10.10.10.3 is determined as the target link, and the request data is sent out. Those skilled in the art may also formulate preset conditions according to practical application conditions, and the embodiments of the present invention are not limited.
After receiving the request data, the virtual load balancer 3 acquires second data source information from the request data; the second data source information is specifically a second source address, a second source port, a second source server port and a second protocol for sending the request data. It should be noted that the second data source information is specifically a port, an address, a server and protocol information of the virtual router for sending the request data. The second data source information is recorded and marked.
The virtual load balancer 3 determines one of the server 100, the server 200, the server 300, and the server 400 as a target server according to a preset rule, for example, determines the server 200 as a target server, and the virtual load balancer 3 sends a request message to the server 200.
After receiving the request data, the server 200 generates response data, and transmits the response data to the virtual load balancer 3 through a communication link between the server 200 and the virtual load balancer 3. The virtual load balancer 3 acquires data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending response data; and judges whether the data destination information is the same as the second data source information, if so, the response data is transmitted to the virtual router 2 by the load balancer 3 according to the target link composed of the IP 10.10.10.3 and 10.10.10.2, so as to feed back the corresponding data to the client.
The invention provides a load balancing system, which comprises: the virtual router is used for receiving the request data sent by the client, determining a target link from a plurality of pre-established communication links and sending the request data to the virtual load balancer according to the target link; the virtual load balancer is used for determining a target server according to the received request data and preset rules; and transmits the received request data to the target server. Through a plurality of communication links established in advance, a plurality of network card resources can be provided for the virtual load equalizer. Therefore, the virtual load balancer provided by the invention has a plurality of network card resources for receiving the request data and processing the request data, so that the processing capacity of the virtual load balancer is increased; therefore, CPU resources and memory resources of the virtual load balancer can be fully utilized, resource waste is avoided, and the requirements of users can be better met.
Fig. 4 is a flowchart of a load balancing method according to an embodiment of the present invention; as shown in fig. 4, the load balancing method provided by the embodiment of the present invention includes steps S101 to S104:
step S101: receiving request data sent by a client;
step S102: determining a target link from a plurality of pre-established communication links;
step S103: determining a target server according to preset rules according to the request data;
step S104: and sending the request data to a target server according to the target link.
In one embodiment, after receiving the request data sent by the client, determining the target link from the multiple pre-established communication links specifically includes:
acquiring first data source information contained in request data; the first data source information specifically comprises a first source address, a first source port, a first source server port and a first protocol;
calculating hash values of the first source address, the first source port, the first source server port and the first protocol;
and determining the link meeting the preset condition as a target link according to the hash value.
It will be appreciated that the first source address is specifically a client address, the first source port is a client port, and the first source server port is a server for sending request data. And determining a target link from a plurality of communication links which are established in advance through the acquired first data source information. Specifically, hash values of a first source address, a first source port, a first source server port and a first protocol are calculated; and determining the link meeting the preset condition as a target link according to the hash value. The preset condition may be that what is the remainder of dividing the calculated hash value by the number of communication links established in advance, and then determining what communication link is to be the destination link accordingly. Those skilled in the art may also formulate preset conditions according to practical application conditions, and the embodiments of the present invention are not limited.
The invention provides a load balancing method, which comprises the steps of firstly receiving request data sent by a client; determining a target link from a plurality of pre-established communication links; determining a target server according to preset rules according to the request data; and sending the request data to a target server according to the target link. And providing a plurality of network card resources through a plurality of communication links which are established in advance. Therefore, the invention utilizes a plurality of network card resources provided by the load balancing system to receive the request data and process the request data, thereby increasing the data processing capability; therefore, CPU resources and memory resources in the load balancing system can be fully utilized, resource waste is avoided, and the requirements of users can be better met.
Fig. 5 is a flowchart of another load balancing method according to an embodiment of the present invention; as shown in fig. 5, the load balancing method provided by the embodiment of the present invention further includes step S201 to step S202:
step S201: acquiring second data source information contained in the request data transmitted through the target link; the second data source information is specifically a second source address, a second source port, a second source server port and a second protocol for sending request data;
step S202: the second data source information is recorded and marked.
In one embodiment, the request data is transmitted through the target link, and second data source information in the request data is obtained, where it is to be noted that the second data source information is specifically information of a transmitting end for transmitting the request data through the target link; the second source address is specifically an address of the transmission end, the second source port is specifically a port of the transmission end, the second source server port is specifically a port of the transmission end server, and the second protocol is specifically a transmission protocol of the transmission end. The second data source information is recorded and marked, and it can be understood that the destination link for requesting data transmission can be marked in this way, so that the response data sent by the target server can be conveniently fed back later.
As shown in fig. 5, the load balancing method provided by the embodiment of the present invention further includes step S203 to step S206:
step S203: judging whether response data sent by a target server are received or not; if yes, go to step S204;
step S204: acquiring data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending response data;
step S205: judging whether the data destination information meets the routing rule according to the preset routing rule; if yes, go to step S206;
step S206: and feeding back the response data to the client.
In one embodiment, the target server generates response data for feedback after receiving the request data; judging whether response data sent by a target server are received or not, and if so, acquiring data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending response data; and judging whether the data destination information meets the routing rule according to the preset routing rule, and if so, feeding back response data to the client.
In one embodiment, the routing rule is specifically that the destination address is the same as the second source address, the destination port is the same as the second source port, the destination server port is the same as the second source server port, and the destination protocol is the same as the second protocol. Thereby ensuring that the response data is fed back according to the communication link from which the request data is sent, i.e. according to the target link.
As shown in fig. 5, the load balancing method provided by the embodiment of the present invention further includes step S207 to step S209:
step S207: judging whether response data sent by a target server are received within preset time or not; if not, go to step S208;
step S208: detecting whether the target link is normal in communication; if not, the process proceeds to step S209;
step S209: and (5) carrying out alarm prompt.
In specific implementation, judging whether response data sent by a target server are received within preset time; the preset time may be a time interval between the reception of the request data and the reception of the response data in general. Those skilled in the art may set other preset times according to practical application, and the embodiments of the present invention are not limited. When the response data sent by the target server is not received within the preset time, the condition that the request data is failed to send may exist, so that whether the target link is normal in communication or not can be detected, if not, an alarm prompt is carried out, and corresponding maintenance measures are timely taken.
The invention also provides a load balancing device and a corresponding embodiment of the load balancing equipment. It should be noted that the present invention describes the embodiments from two angles, one based on the functional module and the other based on the hardware.
Fig. 6 is a block diagram of a load balancing device according to an embodiment of the present invention; as shown in fig. 6, a load balancing device provided by an embodiment of the present invention includes:
a receiving module 10, configured to receive request data sent by a client;
a first determining module 11, configured to determine a target link from a plurality of communication links that are established in advance;
a second determining module 12, configured to determine, according to the request data, a target server according to a preset rule;
and the sending module 13 is used for sending the request data to the target server according to the target link.
Since the embodiments of the present section and the embodiments of the method section correspond to each other, the embodiments of the present section refer to the description of the embodiments of the method section, and are not repeated herein.
The load balancing device provided by the embodiment of the invention further comprises:
the acquisition module is used for acquiring second data source information contained in the request data transmitted through the target link; the second data source information is specifically a second source address, a second source port, a second source server port and a second protocol for sending request data; the second data source information is recorded and marked.
The judging module is used for judging whether response data sent by the target server are received or not; if yes, acquiring data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending response data; judging whether the data destination information meets the routing rule according to the preset routing rule; if yes, the response data is fed back to the client.
The alarm module is used for judging whether response data sent by the target server are received within preset time; if not, detecting whether the target link is normal in communication; if not, the alarm prompt is carried out.
The invention provides a load balancing device, which firstly receives request data sent by a client; determining a target link from a plurality of pre-established communication links; determining a target server according to preset rules according to the request data; and sending the request data to a target server according to the target link. And providing a plurality of network card resources through a plurality of communication links which are established in advance. Therefore, the invention utilizes a plurality of network card resources provided by the load balancing system to receive the request data and process the request data, thereby increasing the data processing capability; therefore, CPU resources and memory resources in the load balancing system can be fully utilized, resource waste is avoided, and the requirements of users can be better met.
Fig. 7 is a block diagram of a load balancing device according to an embodiment of the present invention. As shown in fig. 7, a load balancing apparatus provided in an embodiment of the present invention includes a memory 20 for storing a computer program;
a processor 21 for implementing the steps of the load balancing method as described in any one of the above when executing a computer program.
Processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 21 may also comprise a main processor, which is a processor for processing data in an awake state, also called CPU (Central Processing Unit ); a coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit, image processor) for rendering and drawing of content required to be displayed by the display screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
Memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing a computer program 201, where the computer program, when loaded and executed by the processor 21, is capable of implementing the relevant steps in the load balancing method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202, data 203, and the like, where the storage manner may be transient storage or permanent storage. The operating system 202 may include Windows, unix, linux, among others.
In some embodiments, the load balancing device may further include an input/output interface 22, a communication interface 23, a power supply 24, and a communication bus 25.
Those skilled in the art will appreciate that the structure shown in fig. 7 is not limiting of the load balancing apparatus and may include more or fewer components than shown.
Since the embodiments of the present section and the embodiments of the method section correspond to each other, the embodiments of the present section refer to the description of the embodiments of the method section, and are not repeated herein. In some embodiments of the invention, the processor and memory may be connected by a bus or other means.
The load balancing equipment provided by the invention can realize the following method: firstly, receiving request data sent by a client; determining a target link from a plurality of pre-established communication links; determining a target server according to preset rules according to the request data; and sending the request data to a target server according to the target link. And providing a plurality of network card resources through a plurality of communication links which are established in advance. Therefore, the invention utilizes a plurality of network card resources provided by the load balancing system to receive the request data and process the request data, thereby increasing the data processing capability; therefore, CPU resources and memory resources in the load balancing system can be fully utilized, resource waste is avoided, and the requirements of users can be better met.
Finally, the invention also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps as described in the method embodiments above.
It will be appreciated that the methods of the above embodiments, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored on a computer readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The load balancing system, the method, the device, the equipment and the medium provided by the invention are described in detail. In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the invention can be made without departing from the principles of the invention and these modifications and adaptations are intended to be within the scope of the invention as defined in the following claims.
It should also be noted that in this specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A load balancing system, comprising:
the virtual router is used for receiving the request data sent by the client, determining a target link from a plurality of pre-established communication links and sending the request data to the virtual load balancer according to the target link;
the virtual load balancer is used for determining a target server according to the received request data and preset rules; the received request data is sent to the target server, and the virtual load equalizer is an equalizer with a plurality of network card resources;
the determining the target link in the plurality of pre-established communication links specifically includes:
acquiring first data source information contained in the request data; the first data source information specifically includes a first source address, a first source port, a first source server port and a first protocol;
calculating hash values of the first source address, the first source port, the first source server port and the first protocol;
determining a link meeting a preset condition as a target link according to the hash value;
the virtual load balancer is further configured to obtain second data source information included in the request data transmitted through the target link; the second data source information specifically includes a second source address, a second source port, a second source server port and a second protocol for sending the request data;
and recording and marking the second data source information.
2. A method of load balancing, comprising:
receiving request data sent by a client;
determining a target link from a plurality of pre-established communication links; wherein the plurality of communication links are established according to a virtual load balancer comprising a plurality of network card resources;
determining a target server according to the request data and preset rules;
according to the target link, the request data is sent to a target server;
the determining the target link in the plurality of pre-established communication links specifically includes:
acquiring first data source information contained in the request data; the first data source information specifically includes a first source address, a first source port, a first source server port and a first protocol;
calculating hash values of the first source address, the first source port, the first source server port and the first protocol;
determining a link meeting a preset condition as a target link according to the hash value;
the load balancing method further comprises the following steps:
acquiring second data source information contained in the request data transmitted through the target link; the second data source information specifically includes a second source address, a second source port, a second source server port and a second protocol for sending the request data;
and recording and marking the second data source information.
3. The load balancing method of claim 2, further comprising:
judging whether response data sent by the target server are received or not;
if yes, obtaining the data destination information contained in the response data; the data destination information specifically includes a destination address, a destination port, a destination server port and a destination protocol for sending the response data;
judging whether the data destination information meets the routing rule or not according to a preset routing rule;
and if so, feeding back the response data to the client.
4. The load balancing method according to claim 3, wherein the routing rule is specifically that the destination address is the same as the second source address, the destination port is the same as the second source port, the destination server port is the same as the second source server port, and the destination protocol is the same as the second protocol.
5. The load balancing method of claim 2, further comprising:
judging whether response data sent by the target server are received within preset time or not;
if not, detecting whether the target link is normal in communication;
if not, the alarm prompt is carried out.
6. A load balancing apparatus, comprising:
the receiving module is used for receiving the request data sent by the client;
the first determining module is used for determining a target link from a plurality of pre-established communication links; wherein the plurality of communication links are established according to a virtual load balancer comprising a plurality of network card resources;
the second determining module is used for determining a target server according to the request data and preset rules;
the sending module is used for sending the request data to a target server according to the target link;
wherein the first determining module includes:
the first data source information acquisition unit is used for acquiring first data source information contained in the request data; the first data source information specifically includes a first source address, a first source port, a first source server port and a first protocol;
a hash value calculating unit, configured to calculate hash values of the first source address, the first source port, the first source server port, and the first protocol;
a target link determining unit, configured to determine, according to the hash value, a link that satisfies a preset condition as a target link;
wherein, above-mentioned load balancing unit still includes:
the second data source information acquisition module is used for acquiring second data source information contained in the request data transmitted through the target link; the second data source information specifically includes a second source address, a second source port, a second source server port and a second protocol for sending the request data;
and the second data source information marking module is used for recording and marking the second data source information.
7. A load balancing device comprising a memory for storing a computer program;
processor for implementing the steps of the load balancing method according to any of claims 2 to 5 when executing said computer program.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the load balancing method according to any of claims 2 to 5.
CN201911235942.7A 2019-12-05 2019-12-05 Load balancing system, method, device, equipment and medium Active CN111008075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911235942.7A CN111008075B (en) 2019-12-05 2019-12-05 Load balancing system, method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911235942.7A CN111008075B (en) 2019-12-05 2019-12-05 Load balancing system, method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111008075A CN111008075A (en) 2020-04-14
CN111008075B true CN111008075B (en) 2023-06-20

Family

ID=70115014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911235942.7A Active CN111008075B (en) 2019-12-05 2019-12-05 Load balancing system, method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111008075B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113973086B (en) * 2020-07-07 2024-01-26 中移(苏州)软件技术有限公司 Data transmission method, device and storage medium
CN112423145B (en) * 2020-11-16 2023-03-24 北京达佳互联信息技术有限公司 Data processing method, device, system, server and medium
CN112449012B (en) * 2020-11-17 2024-04-05 中国平安财产保险股份有限公司 Data resource scheduling method, system, server and read storage medium
CN112688878B (en) * 2020-11-25 2023-04-18 紫光云技术有限公司 Method for achieving tcp load balancing of transparent transmission source ip based on haproxy
CN112751944A (en) * 2021-02-18 2021-05-04 南京宏锐祺程信息科技有限公司 Streaming data acceleration method, server and load balancing equipment
CN113347158A (en) * 2021-05-17 2021-09-03 武汉中科通达高新技术股份有限公司 Streaming media data receiving and transmitting method and device and electronic equipment
CN113448729B (en) * 2021-06-25 2023-01-31 平安科技(深圳)有限公司 Load balancing method, device, equipment and storage medium
CN114285786B (en) * 2021-12-24 2023-12-08 中国农业银行股份有限公司 Construction method and device of network link library
CN114390056A (en) * 2022-01-11 2022-04-22 京东科技信息技术有限公司 Load balancing method and device, electronic equipment and storage medium
CN115174581B (en) * 2022-07-06 2023-04-07 即刻雾联科技(北京)有限公司 Load balancing method and router
CN115225644B (en) * 2022-07-27 2023-11-03 天翼云科技有限公司 Load balancing system and data packet distribution method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829197A (en) * 2006-04-14 2006-09-06 迈普(四川)通信技术有限公司 Method for dynamically selecting outlet pathway
CN103166870A (en) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 Load balancing clustered system and method for providing services by using load balancing clustered system
CN103986665A (en) * 2014-05-12 2014-08-13 浪潮电子信息产业股份有限公司 Method for balancing network load in cloud sea OS
CN206350168U (en) * 2016-12-30 2017-07-21 天津赞普科技股份有限公司 A kind of portable load-balancing device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111866064B (en) * 2016-12-29 2021-12-28 华为技术有限公司 Load balancing method, device and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1829197A (en) * 2006-04-14 2006-09-06 迈普(四川)通信技术有限公司 Method for dynamically selecting outlet pathway
CN103166870A (en) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 Load balancing clustered system and method for providing services by using load balancing clustered system
CN103986665A (en) * 2014-05-12 2014-08-13 浪潮电子信息产业股份有限公司 Method for balancing network load in cloud sea OS
CN206350168U (en) * 2016-12-30 2017-07-21 天津赞普科技股份有限公司 A kind of portable load-balancing device

Also Published As

Publication number Publication date
CN111008075A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN111008075B (en) Load balancing system, method, device, equipment and medium
CN106549878B (en) Service distribution method and device
JP6141536B2 (en) Grayscale upgrade method and apparatus
CN108200218B (en) Method and device for realizing load balance and electronic equipment
CN111340230B (en) Service providing method, device, server and computer readable storage medium
CN110601978B (en) Flow distribution control method and device
WO2021237433A1 (en) Message pushing method and apparatus, and electronic device and computer-readable medium
CN109218341B (en) Load balancing method and device for monitoring server and server
CN105978938A (en) Service processing equipment service status determining method and scheduling equipment
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN109788251B (en) Video processing method, device and storage medium
CN110569127B (en) Virtual resource transferring, sending and obtaining method and device
CN109710502B (en) Log transmission method, device and storage medium
CN107623664B (en) Password input method and device
CN108280020A (en) Monitoring method, device, terminal and the computer storage media of computer equipment
CN106992893A (en) The management method and device of router
CN110245014B (en) Data processing method and device
JP5961471B2 (en) Output comparison method in multiple information systems
CN106878356B (en) Scheduling method and computing node
CN104618324A (en) Method and device for transmitting data and detecting data legality
CN114268799B (en) Streaming media transmission method and device, electronic equipment and medium
CN112040564B (en) Information transmission method, readable storage medium and electronic device
CN110545296A (en) Log data acquisition method, device and equipment
CN111327511B (en) Instant messaging method, system, terminal equipment and storage medium
CN109639639B (en) Fusion control method and device for multi-platform monitoring system

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