WO2022267458A1 - 负载均衡方法、装置、设备及存储介质 - Google Patents

负载均衡方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2022267458A1
WO2022267458A1 PCT/CN2022/071686 CN2022071686W WO2022267458A1 WO 2022267458 A1 WO2022267458 A1 WO 2022267458A1 CN 2022071686 W CN2022071686 W CN 2022071686W WO 2022267458 A1 WO2022267458 A1 WO 2022267458A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow table
processing device
virtual
data
information
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.)
Ceased
Application number
PCT/CN2022/071686
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2022267458A1 publication Critical patent/WO2022267458A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering

Definitions

  • the present application relates to the field of cloud technology, and in particular to a load balancing method, device, equipment and storage medium.
  • the traditional load balancing method needs to introduce a powerful network element as the bearing point of the access portal to schedule user requests and distribute traffic.
  • This network element generally needs to process a large number of Data packets require high performance, and even need to use independent server clusters to achieve the required data throughput requirements, resulting in high costs.
  • the main purpose of this application is to solve the technical problem that a large number of flow table lookup operations will lead to a decrease in virtual machine network performance when a virtual machine switch is used for load balancing management.
  • the first aspect of the present application provides a load balancing method, including: obtaining a preset first flow table, receiving a data processing request from a virtual client according to the first flow table, and extracting the data contained in the data processing request A request data packet, wherein the first flow table is used to connect the virtual client and the balance controller; parse the request data packet to obtain request information, acquire a processing session based on the request information, and determine the target of the processing session A virtual processing device; acquiring the processing device port information of the target virtual processing device and the balance control port information of the balance controller, generating a second flow table according to the processing device port information and the balance control port information, and based on the The first flow table and the second flow table generate the first data connection path of the processing session, wherein the second flow table is used to connect the balance controller and the target virtual processing device; acquire the data of the first data connection path information, and judge whether the data information meets the preset delivery condition; if so, obtain the user port information of the virtual client, generate a third flow table according to the
  • the second aspect of the present application provides a load balancing device, including a memory, a processor, and computer-readable instructions stored on the memory and operable on the processor, and the processor executes the computer-readable
  • the instruction implements the following steps: obtain the preset first flow table, and according to the first flow table, receive the data processing request from the virtual client, and extract the request data packet contained in the data processing request, wherein the first The first-class table is used to connect the virtual client and the balance controller; parse the request packet to obtain request information, obtain a processing session based on the request information, and determine the target virtual processing device of the processing session; obtain the target virtual processing device Processing device port information of the processing device and balance control port information of the balance controller, generating a second flow table according to the processing device port information and the balance control port information, and generating a second flow table based on the first flow table and the second flow table
  • the first data connection path of the processing session wherein the second flow table is used to connect the balance controller and the target virtual processing device; obtain the data
  • the third aspect of the present application provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on the computer, the computer is made to perform the following steps: obtaining the preset first flow table, and according to the first flow table, receive the data processing request from the virtual client, and extract the request packet contained in the data processing request, wherein the first flow table is used to connect the virtual client and balance control device; parse the request packet to obtain request information, obtain a processing session based on the request information, and determine the target virtual processing device of the processing session; obtain processing device port information and a balance controller of the target virtual processing device information about the balanced control port, generating a second flow table based on the processing device port information and the balanced control port information, and generating a first data connection path for the processing session based on the first flow table and the second flow table, Wherein, the second flow table is used to connect the balance controller and the target virtual processing device; obtain the data information of the first data connection path, and judge whether the data information meets the prese
  • the fourth aspect of the present application provides a load balancing device, including: an acquisition module, configured to acquire a preset first flow table, receive a data processing request from a virtual client according to the first flow table, and extract the data Processing the request data packet contained in the request, wherein the first flow table is used to connect the virtual client and the balance controller; the target device determination module is used to parse the request data packet to obtain request information, based on the request information Obtain a processing session, and determine the target virtual processing device of the processing session; the first connection module is configured to obtain the processing device port information of the target virtual processing device and the balancing device port information of the balancing controller, according to the processing device generating a second flow table based on the port information and the equalizing device port information, and generating a first data connection path of the processing session based on the first flow table and the second flow table, wherein the second flow table is used to connect An equalization controller and a target virtual processing device; a judging module, configured to acquire data information of the first data connection path,
  • the flow table distribution module is configured to obtain the user port information of the virtual client terminal if yes, generate a third flow table according to the user port information and the processing device port information, and send the third flow table To the virtual client and the target virtual processing device; a data exchange module, configured to establish a data connection path between the virtual client and the target virtual processing device according to the third flow table, and perform data connection based on the connection path data exchange.
  • the preset first flow table used to connect the virtual client and the balance controller receive the data processing request from the virtual client, and extract the request data packet included in the data processing request; parse the request The data packet obtains the request information, and obtains the processing session and the target virtual processing device based on the request information; obtains the processing device port information of the target virtual processing device and the balance control port information of the balance controller, and the port information is generated for connecting the balance controller and The second flow table of the target virtual processing device, and generate the first data connection path based on the first flow table and the second flow table; obtain the data information of the first data connection path, and determine whether the data information meets the preset delivery condition; if so , then obtain the user port information of the virtual client, generate the third flow table according to the user port information and the processing device port information, and deliver the third flow table to the virtual client and the target virtual processing device; establish a virtual The data connection path of the client and the target virtual processing device, and data exchange is performed based on the connection path
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are met.
  • FIG. 1 is a schematic diagram of a first embodiment of a load balancing method in an embodiment of the present application
  • FIG. 2 is a schematic diagram of a second embodiment of the load balancing method in the embodiment of the present application.
  • Fig. 3 is the first schematic diagram of the data transfer of the load balancing method in the embodiment of the present application.
  • Fig. 4 is the second schematic diagram of the data transfer of the load balancing method in the embodiment of the present application.
  • FIG. 5 is a schematic diagram of a third embodiment of the load balancing method in the embodiment of the present application.
  • FIG. 6 is a schematic diagram of an embodiment of a load balancing device in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another embodiment of the load balancing device in the embodiment of the present application.
  • FIG. 8 is a schematic diagram of an embodiment of a load balancing device in the embodiment of the present application.
  • the embodiment of the present application provides a load balancing method, device, equipment and storage medium, according to the preset first flow table used to connect the virtual client and the balance controller, receive the data processing request from the virtual client, and extract the data processing the request packet included in the request; parsing the request packet to obtain request information, and obtaining the processing session and the target virtual processing device based on the request information; obtaining the processing device port information of the target virtual processing device and the balance control port information of the balance controller, The port information generates a second flow table for connecting the balance controller and the target virtual processing device, and generates a first data connection path based on the first flow table and the second flow table; acquires data information of the first data connection path, and judges the data Whether the information meets the preset delivery conditions; if so, obtain the user port information of the virtual client, generate the third flow table according to the user port information and the processing device port information, and send the third flow table to the virtual client and the target A virtual processing device; establishing a data connection path between the virtual client and the target virtual processing
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are met.
  • An embodiment of the load balancing method in the embodiment of the present application includes:
  • the subject of execution of the present application may be a load balancing device, and may also be a terminal or a server, which is not specifically limited here.
  • the embodiment of the present application is described by taking the server as an execution subject as an example.
  • a first flow table for data forwarding between the virtual client and the balance controller is installed in advance for the virtual client that needs to perform load balancing processing, wherein the first flow table is used to connect the virtual client and the balance controller.
  • the virtual client sends a data processing request
  • the data processing request is generated for the VIP address (virtual Internet Protocol, virtual network address) that the user wants to access, and the data processing request contains the request packet; when the virtual user When trying to access the VIP address, send the data processing request and the request data packet to the balance controller according to the preset first flow table, and obtain the request data packet included in the data processing request.
  • VIP address virtual Internet Protocol, virtual network address
  • the balance controller After the balance controller receives the request packet, it first parses the request packet to obtain the request information of the request packet, wherein the request information may include information such as source address, destination address, port information, and protocol type; Query the locally scheduled session according to the specific content of the request information, judge whether the request packet belongs to the created session, if so, obtain the created session to obtain the processing session, and query the target virtual processing corresponding to the processing session device; if not, the request information is obtained according to the request packet, and a suitable target virtual processing device is selected from the candidate virtual processing devices by using a preset scheduling algorithm according to the request information.
  • the request information may include information such as source address, destination address, port information, and protocol type
  • the request packet when judging whether the request packet belongs to an established session, if it belongs to an established session, the request packet can be discarded, or the request packet can be directly forwarded to the target virtual processing session in the corresponding processing session. device; if the request packet does not belong to the established session, after selecting a suitable target virtual processing device, the request packet can be discarded in this embodiment, or the request packet can be directly forwarded to the selected Target virtual processing device.
  • the balance control port information of the balance controller in this embodiment and the processing device port information of the target virtual processing device are obtained, and according to the processing device port information and Balance control port information to generate a second flow table, wherein the second flow table described in this embodiment is used to connect the balance controller and the target virtual processing device; according to the generated second flow table and connect the virtual client and the balance control
  • the first flow table of the device generates the first data connection path of the processing session, that is to say, through the first flow table and the second flow table, in this embodiment, the data from the virtual client is forwarded to the balance controller, and through the balance The controller then sends to the corresponding target virtual processing device.
  • the data information can be the survival time of the first data connection path, or it can be the first data connection path.
  • the user port information of the virtual client terminal is obtained, and a third flow table is generated according to the user port information and the processing device port information, wherein the third flow table described in this embodiment is used for Connect the balance controller and the target virtual processing device.
  • the third flow table includes the forward third flow table and the return third flow table. The forward third flow table is sent to the virtual client, and the return third flow table Send it to the target virtual processing device.
  • the priority of the third flow table is set higher than the aforementioned first flow table and the second flow table, so that when data transmission is performed, data forwarding is preferentially performed according to the third flow table generated after scheduling.
  • a data connection path between the virtual client and the target virtual processing device is established.
  • the data connection path described in this embodiment means that when data processing is performed, the virtual client transfers the data packet through the third flow table It is directly transmitted to the target virtual processing device for processing.
  • the target virtual processing device processes the data and transmits the result to the virtual client according to the third flow table, thereby replacing the processing method of forwarding through the balance controller to reduce balance The amount of data the controller needs to process.
  • the load balancing method of the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is satisfied, which reduces the amount of data that the balancing controller needs to process, and reduces the Balance controller performance requirements.
  • the second embodiment of the load balancing method in the embodiment of the present application includes:
  • the balance controller After the balance controller receives the request packet, it first parses the request packet to obtain the request information of the request packet, wherein the request information may include information such as source address, destination address, port information, and protocol type; According to the specific content of the request information, the locally scheduled session is queried to determine whether the request data packet belongs to the created session.
  • the request information may include information such as source address, destination address, port information, and protocol type; According to the specific content of the request information, the locally scheduled session is queried to determine whether the request data packet belongs to the created session.
  • the result of the query is that the request packet belongs to the created session, then obtain the created session as the processing session, obtain the session information of the processing session, parse the session information to obtain the port information of the target virtual processing device corresponding to the session, A target virtual processing device for the processing session is thereby determined.
  • the request information is obtained according to the request packet, and a suitable target virtual processing device is selected from the alternative virtual processing devices using the preset scheduling algorithm according to the request information.
  • Handle equipment If the result of the query is that the request packet does not belong to the created session, the request information is obtained according to the request packet, and a suitable target virtual processing device is selected from the alternative virtual processing devices using the preset scheduling algorithm according to the request information. Handle equipment.
  • the preset scheduling algorithm can be to find a virtual processing device with normal running status according to the monitoring results of the running status of each virtual processing device, and select a virtual processing device with a small amount of processing tasks through the service scheduling algorithm, and comprehensively select to obtain the target virtual processing device. equipment.
  • step 205 and step 206 in this embodiment is basically the same as the content in step 103 and step 104 in the foregoing embodiment, so details are not repeated here.
  • the corresponding creation time will be recorded when each processing session is created, and a timer will be used to record the duration to obtain the current time.
  • the sending condition in this embodiment is that the survival time of the processing session exceeds the preset time and the The data information forwarding volume of the first data connection path exceeds the preset traffic threshold, so after obtaining the first data connection path, it is judged whether the survival time exceeds the preset time threshold and/or whether the data information forwarding volume exceeds the preset traffic threshold.
  • the third forward flow table convert the destination port of the first data packet from the virtual client from the balance controller port to the target virtual processing device port, and generate a first virtual extended LAN tunnel, and pass the first data packet through sending the first virtual extended LAN tunnel to the target virtual processing device;
  • a data connection path between the virtual client and the target virtual processing device is established.
  • the data connection path described in this embodiment means that when data processing is performed, the virtual client transfers the data packet through the third flow table It is directly transmitted to the target virtual processing device for processing.
  • the target virtual processing device processes the data and transmits the result to the virtual client according to the third flow table, thereby replacing the processing method of forwarding through the balance controller to reduce balance The amount of data the controller needs to process.
  • the destination port of the first data packet from the virtual client is converted from the balance controller port to the target virtual processing device port , and generate a first virtual extended local area network tunnel, and send the first data packet to the target virtual processing device through the first virtual extended local area network tunnel.
  • the style of the forward third flow table can be:
  • the source address/port of the forward flow table from the virtual client to the target virtual processing device is transmitted from the source address/port of the virtual client vm-1 CIP:CPORT is converted into balanced controller source address/port LIP:LPORT; target address/port VIP:VPORT is converted into source address/port RIP:RPORT of target virtual processing device VM-Real-Server-4.
  • the style of the return trip third flow table can be:
  • the return third flow table converts the destination address/port from the balance controller source address/port LIP:LPORT to the source address/port CIP:CPORT of the virtual client vm-1; Convert the source address/port from the source address/port RIP:RPORT of the target virtual processing device VM-Real-Server-4 to VIP:VPORT.
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are met.
  • the third embodiment of the load balancing method in the embodiment of the present application includes:
  • step 502-step 503 in this embodiment is basically the same as that in step 202-step 203 in the previous embodiment, so it will not be repeated here.
  • the request information is obtained according to the request packet, and all virtual devices in the server in this embodiment are obtained according to the request information to obtain a virtual device set, and the virtual device set is obtained by presetting
  • the running status monitoring tool obtains the running status of each virtual processing device in the preset virtual device set, wherein the health monitoring tool includes a health monitoring algorithm (Health-Check); based on the running status results obtained by the running status monitoring tool , select the virtual processing device whose operation status is normal to obtain the candidate virtual device set.
  • Health-Check health monitoring algorithm
  • the task status of each candidate virtual device in the candidate virtual device set can be obtained.
  • the LVS (Linux Virtual Server, Linux virtual server) service scheduling algorithm can be used, and each virtual device can also be obtained directly.
  • a virtual processing device with a small amount of processing tasks is selected, and a target virtual processing device is obtained through comprehensive selection.
  • step 506 and step 507 in this embodiment is basically the same as the content in step 103 and step 104 in the foregoing embodiment, so details are not repeated here.
  • step 508-step 511 in this embodiment is basically the same as the content in step 207-step 210 in the previous embodiment, so it will not be repeated here.
  • the third forward flow table convert the destination port of the first data packet from the virtual client from the balance controller port to the target virtual processing device port, and generate a first virtual extended LAN tunnel, and pass the first data packet through sending the first virtual extended LAN tunnel to the target virtual processing device;
  • step 513 and step 514 in this embodiment is basically the same as the content in step 212 and step 213 in the previous embodiment, so details are not repeated here.
  • the balance controller obtains the flow report of the third flow table every preset traffic monitoring time, and according to the specific flow report information to determine whether the third forward flow and the third return flow table are still in use. If the data flow has disappeared, the third forward flow and the third return flow table are not used, and the third forward flow table and the third return flow table can be used table deletion. At the same time, the balance controller can also monitor the load situation of the target virtual processing device in this embodiment according to the flow report.
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are met.
  • An embodiment of the load balancing device in the embodiment of the present application includes:
  • the obtaining module 601 is configured to obtain a preset first flow table, and according to the first flow table, receive a data processing request from a virtual client, and extract a request packet contained in the data processing request, wherein the first The first-class meter is used to connect the virtual client and the balance controller;
  • a target device determining module 602 configured to parse the request packet to obtain request information, obtain a processing session based on the request information, and determine a target virtual processing device for the processing session;
  • the first connection module 603 is configured to acquire the processing device port information of the target virtual processing device and the balancing device port information of the balancing controller, and generate a second flow table according to the processing device port information and the balancing device port information, and generating a first data connection path of the processing session based on the first flow table and the second flow table, wherein the second flow table is used to connect the balancing controller and the target virtual processing device;
  • a judging module 604 configured to acquire data information of the first data connection path, and judge whether the data information meets a preset delivery condition.
  • the flow table issuing module 605 is configured to obtain the user port information of the virtual client terminal if yes, generate a third flow table according to the user port information and the processing device port information, and download the third flow table send to the virtual client and the target virtual processing device;
  • the data exchange module 606 is configured to establish a data connection path between the virtual client and the target virtual processing device according to the third flow table, and perform data exchange based on the connection path.
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are set.
  • FIG. 7 another embodiment of the load balancing device in the embodiment of the present application includes:
  • the obtaining module 601 is configured to obtain a preset first flow table, and according to the first flow table, receive a data processing request from a virtual client, and extract a request packet contained in the data processing request, wherein the first The first-class meter is used to connect the virtual client and the balance controller;
  • a target device determining module 602 configured to parse the request packet to obtain request information, obtain a processing session based on the request information, and determine a target virtual processing device for the processing session;
  • the first connection module 603 is configured to acquire the processing device port information of the target virtual processing device and the balancing device port information of the balancing controller, and generate a second flow table according to the processing device port information and the balancing device port information, and generating a first data connection path of the processing session based on the first flow table and the second flow table, wherein the second flow table is used to connect the balancing controller and the target virtual processing device;
  • a judging module 604 configured to acquire data information of the first data connection path, and judge whether the data information meets a preset delivery condition.
  • the flow table issuing module 605 is configured to obtain the user port information of the virtual client terminal if yes, generate a third flow table according to the user port information and the processing device port information, and download the third flow table send to the virtual client and the target virtual processing device;
  • the data exchange module 606 is configured to establish a data connection path between the virtual client and the target virtual processing device according to the third flow table, and perform data exchange based on the connection path.
  • the flow table delivery module 605 includes:
  • a session judging unit 6051 configured to inquire whether the request data packet belongs to an established session according to the request information
  • the session parsing unit 6052 is configured to use the created session as a processing session, obtain session information of the processing session, and parse the session information to obtain the target virtual processing device of the processing session;
  • the session creation unit 6053 is configured to, if not, select a target virtual processing device from the candidate virtual device set according to preset scheduling configuration rules, and create a processing session based on the target virtual processing device.
  • the session creation unit 6053 includes:
  • the running status checking subunit is used to obtain the running status of each virtual processing device in the preset virtual device set, and select a virtual processing device whose running status is normal to obtain a candidate virtual device set;
  • the running task checking subunit is configured to acquire the number of current processing session connections of each candidate virtual processing device in the set of candidate virtual devices, and select the one with the least number of connections as the target virtual processing device.
  • the judging module 604 includes:
  • a time obtaining unit 6041 configured to obtain the creation time and current time of the processing session corresponding to the first data connection path;
  • a survival time calculation unit 6042 configured to calculate the survival time of the processing session according to the creation time and the current time
  • a data statistics unit 6043 configured to count the forwarded data information of the first data connection path, and obtain the amount of forwarded data information
  • the condition judging unit 6044 is configured to judge whether the survival time exceeds a preset time threshold and/or whether the forwarding amount of data information exceeds a preset traffic threshold.
  • the data exchange module 606 includes:
  • the data forward sending unit 6061 is configured to convert the destination port of the first data packet from the virtual client from the balance controller port to the target virtual processing device port according to the third forward flow table, and generate the first virtual extension LAN tunnel, sending the first data packet to the target virtual processing device through the first virtual extended LAN tunnel;
  • a data return sending unit 6062 configured to convert the target port of the second data packet from the target virtual processing device from a balance controller port to a virtual client port according to the third return flow table, and generate a second virtual extended LAN tunnel , sending the second data packet to the virtual client through the second virtual extended LAN tunnel.
  • the load balancing device further includes a flow table deletion module, and the flow table deletion module includes:
  • a report obtaining unit configured to obtain flow reports of the forward third flow table and the return third flow table every preset flow monitoring time
  • a usage detection unit configured to judge whether the forward third and the third return flow tables are still in use according to the flow report
  • a deletion unit configured to, if not, delete the third forward flow table and the third return flow table.
  • the priorities of the third forward flow table and the third return flow table in the load balancing device are higher than the priorities of the first flow table and the second flow table.
  • the load balancing method in the embodiment of the present application can directly exchange data between the virtual client and the target virtual processing device by issuing the flow table when the preset delivery condition is met, which reduces the amount of data that the balancing controller needs to process, and reduces the The performance requirements of the balance controller are met.
  • FIG. 8 is a schematic structural diagram of a load balancing device provided by an embodiment of the present application.
  • the load balancing device 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs). ) 810 (eg, one or more processors) and memory 820, one or more storage media 830 (eg, one or more mass storage devices) that store application programs 833 or data 832 .
  • the memory 820 and the storage medium 830 may be temporary storage or persistent storage.
  • the program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the load balancing device 800 .
  • the processor 810 may be configured to communicate with the storage medium 830 , and execute a series of instruction operations in the storage medium 830 on the load balancing device 800 .
  • the load balancing device 800 may also include one or more power sources 840, one or more wired or wireless network interfaces 850, one or more input and output interfaces 860, and/or, one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • operating systems 831 such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
  • the present application also provides a computer device, which may be any device capable of executing the load balancing method described in the above embodiments, the computer device includes a memory and a processor, and computer-readable instructions are stored in the memory When the computer-readable instructions are executed by the processor, the processor is made to execute the steps of the load balancing method in the foregoing embodiments.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with each other using cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify its Validity of information (anti-counterfeiting) and generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium.
  • the computer-readable storage medium may also be a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium, and when the instructions are run on the computer, the computer is made to execute the steps of the load balancing method.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本申请涉及云技术领域,公开了一种负载均衡方法、装置、设备及存储介质,用于解决现有技术中的负载均衡方法中均衡控制器的数据处理压力大的技术问题。该方法包括:根据第一流表接收来自虚拟用户端的数据处理请求的请求信息,并获取处理会话、确定目标虚拟处理设备;获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息生成第二流表,基于第一流表和第二流表生成第一数据连接通路;判断第一数据连接通路的数据信息是否达到预设的下发条件;若是,则生成第三流表,根据第三流表建立虚拟用户端和目标虚拟处理设备的数据连接通路进行数据交换。此外,本申请还涉及区块链技术,负载均衡的相关信息可存储于区块链中。

Description

负载均衡方法、装置、设备及存储介质
本申请要求于2021年6月25日提交中国专利局、申请号为202110710836.0、发明名称为“负载均衡方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及云技术领域,尤其涉及一种负载均衡方法、装置、设备及存储介质。
背景技术
随着网络技术的发展、业务量的增加,各种网站、APP等提供服务的后台服务器为保证服务的性能和稳定性,一般会对服务器进行扩容;在进行服务器的扩容时,一般会将多台机器或一台机器中的多个虚拟机作为一个集群对外提供服务;然而对外提供的访问入口一般都只是一个,则需要通过负载均衡方法将用户的请求分发到集群中不同的机器上。
在现有的技术中,传统的负载均衡方法都需要引入处理能力强大的网元作为访问入口的承载点来做用户请求的调度和流量分发,发明人意识到这个网元在一般需要处理大量的数据包,使得对其的性能要求很高,甚至需要使用独立的服务器集群才能达到所需的数据吞吐要求,导致其成本很高。
发明内容
本申请的主要目的在于解决使用虚拟机交换机进行负载均衡管理时,大量的流表查找操作会导致虚拟机网络性能下降的技术问题。
本申请第一方面提供了一种负载均衡方法,包括:获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
本申请第二方面提供了一种负载均衡设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进 行数据交换。
本申请的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
本申请第四方面提供了一种负载均衡装置,包括:获取模块,用于获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;目标设备确定模块,用于解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;第一连接模块,用于获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡设备端口信息,根据所述处理设备端口信息和所述均衡设备端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;判断模块,用于获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件。流表下发模块,用于若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;数据交换模块,用于根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
本申请提供的技术方案中,根据预置的用于连接虚拟用户端和均衡控制器的第一流表,接收来自虚拟用户端的数据处理请求,并提取数据处理请求中包含的请求数据包;解析请求数据包,得到请求信息,基于请求信息获取处理会话和目标虚拟处理设备;获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,该端口信息生成用于连接均衡控制器和目标虚拟处理设备第二流表,并基于第一流表和第二流表生成第一数据连接通路;获取第一数据连接通路的数据信息,并判断数据信息是否达到预设的下发条件;若是,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,并将第三流表下发至虚拟用户端和目标虚拟处理设备;根据第三流表建立虚拟用户端和目标虚拟处理设备的数据连接通路,并基于连接通路进行数据交换。本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
附图说明
图1为本申请实施例中负载均衡方法的第一实施例的示意图;
图2为本申请实施例中负载均衡方法的第二实施例的示意图;
图3为本申请实施例中负载均衡方法的数据传递的第一种示意图;
图4为本申请实施例中负载均衡方法的数据传递的第二种示意图;
图5为本申请实施例中负载均衡方法的第三实施例的示意图;
图6为本申请实施例中负载均衡装置的一个实施例示意图;
图7为本申请实施例中负载均衡装置的另一个实施例示意图;
图8为本申请实施例中负载均衡设备的一个实施例示意图。
具体实施方式
本申请实施例提供了一种负载均衡方法、装置、设备及存储介质,根据预置的用于连接虚拟用户端和均衡控制器的第一流表,接收来自虚拟用户端的数据处理请求,并提取数据处理请求中包含的请求数据包;解析请求数据包,得到请求信息,基于请求信息获取处理会话和目标虚拟处理设备;获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,该端口信息生成用于连接均衡控制器和目标虚拟处理设备第二流表,并基于第一流表和第二流表生成第一数据连接通路;获取第一数据连接通路的数据信息,并判断数据信息是否达到预设的下发条件;若是,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,并将第三流表下发至虚拟用户端和目标虚拟处理设备;根据第三流表建立虚拟用户端和目标虚拟处理设备的数据连接通路,并基于连接通路进行数据交换。本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
为便于理解,下面对本申请实施例的具体流程进行描述,请参阅图1,本申请实施例中负载均衡方法的一个实施例包括:
101、获取预置的第一流表,并根据第一流表,接收来自虚拟用户端的数据处理请求,并提取数据处理请求中包含的请求数据包;
可以理解的是,本申请的执行主体可以负载均衡装置,还可以是终端或者服务器,具体此处不做限定。本申请实施例以服务器为执行主体为例进行说明。
本步骤中预先针对于需要进行负载均衡处理的虚拟用户端,安装虚拟用户端与均衡控制器之间进行数据转发的第一流表,其中,第一流表用于连接虚拟用户端和均衡控制器。
首先,虚拟用户端发送数据处理请求,该数据处理请求是针对于用户想要访问的VIP地址(virtual Internet Protocol,虚拟网络地址)生成的,该数据处理请求中包含有请求数据包;当虚拟用户尝试访问VIP地址时,根据预置的第一流表,将该数据处理请求以及请求数据包发送至均衡控制器中,得到所述的数据处理请求中包含的请求数据包。
102、解析请求数据包,得到请求信息,基于请求信息获取处理会话,并确定处理会话的目标虚拟处理设备;
在均衡控制器接收到该请求数据包后,会首先解析该请求数据包,得到该请求数据包的请求信息,其中,该请求信息可以包括源地址、目的地址、端口信息和协议类型等信息;根据该请求信息的具体内容查询本地已经调度的会话,判断该请求数据包是否属于已创建的会话,若是,则获取该已创建的会话得到处理会话,并查询出该处理会话对应的目标虚 拟处理设备;若否,则根据该请求数据包获取请求信息,根据请求信息用预置的调度算法在备选的虚拟处理设备中选择出合适的目标虚拟处理设备。
其中,在判断该请求数据包是否属于已创建的会话时,若属于已创建的会话,则可以将该请求数据包丢弃,或将该请求数据包直接转发至对应的处理会话中的目标虚拟处理设备;若该请求数据包不属于已创建的会话,则在选择出合适的目标虚拟处理设备后,本实施例中可以将该请求数据包丢弃,或将该请求数据包直接转发至选出的目标虚拟处理设备。
103、获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息;
104、根据处理设备端口信息和均衡控制端口信息生成第二流表,并基于第一流表和第二流表生成处理会话的第一数据连接通路;
在前述步骤中确定了本次数据处理请求对应的目标虚拟处理设备后,获取本实施例中的均衡控制器的均衡控制端口信息和目标虚拟处理设备的处理设备端口信息,根据处理设备端口信息和均衡控制端口信息生成第二流表,其中,本实施例中所述的第二流表用于连接均衡控制器和目标虚拟处理设备;根据生成的第二流表和连接虚拟用户端和均衡控制器的第一流表生成该处理会话的第一数据连接通路,也即是说,通过第一流表和第二流表,本实施例中将来自虚拟用户端的数据转发至均衡控制器,并通过均衡控制器再发送至对应的目标虚拟处理设备。
105、获取第一数据连接通路的数据信息,并判断数据信息是否达到预设的下发条件;
统计前述的第一数据连接通路的数据信息,判断该数据信息是否达到预设的下发条件,其中,该数据信息可以为该第一数据连接通路的存活时间,也可以为该第一数据连接通路中传输的数据流量值;当该第一数据连接通路的存活时间超过预设的时间或者第一数据连接通路中传输的数据流量值超过了预设的流量阈值或者两条件同时满足时,则为达到了预设的下发条件。
106、若是,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,并将第三流表下发至虚拟用户端和目标虚拟处理设备;
若判断达到了预设的下发条件,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,其中,本实施例中所述的第三流表用于连接均衡控制器和目标虚拟处理设备,该第三流表中包括正向第三流表和返程第三流表,将正向第三流表下发至虚拟用户端,将返程第三流表下发至目标虚拟处理设备。
此外,该第三流表的优先级设置为高于前述的第一流表和第二流表,以便在进行数据传输时,优先根据调度后生成的第三流表进行数据的转发。
107、根据第三流表建立虚拟用户端和目标虚拟处理设备的数据连接通路,并基于连接通路进行数据交换。
基于下发的第三流表,建立虚拟用户端和目标虚拟处理设备的数据连接通路,本实施例所述的数据连接通路指在进行数据处理时,虚拟用户端通过第三流表将数据包直接传输至目标虚拟处理设备进行处理,同样的,目标虚拟处理设备对数据进行处理后将结果根据第三流表传输至虚拟用户端,从而代替通过均衡控制器进行转发的处理方式,以减少均衡控制器需要处理的数据量。
本申请实施例的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
请参阅图2-图4,本申请实施例中负载均衡方法的第二实施例包括:
201、获取预置的第一流表,并根据第一流表,接收来自虚拟用户端的数据处理请求,并提取数据处理请求中包含的请求数据包;
本步骤中具体内容与前述实施例中步骤101中基本相同,故在此不再赘述。
202、解析请求数据包,得到请求信息,根据请求信息查询请求数据包是否属于已创建的会话;
在均衡控制器接收到该请求数据包后,会首先解析该请求数据包,得到该请求数据包的请求信息,其中,该请求信息可以包括源地址、目的地址、端口信息和协议类型等信息;根据该请求信息的具体内容查询本地已经调度的会话,判断该请求数据包是否属于已创建的会话。
203、若是,则将已创建的会话作为处理会话,并获取处理会话的会话信息,解析会话信息得到处理会话的目标虚拟处理设备;
若查询得到的结果是该请求数据包属于已创建的会话,则获取该已创建的会话作为处理会话,获取处理会话的会话信息,解析会话信息得到该会话对应的目标虚拟处理设备的端口信息,从而确定处理会话的目标虚拟处理设备。
204、若否,则根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备,并基于目标虚拟处理设备创建处理会话;
若查询得到的结果是该请求数据包不属于已创建的会话,则根据该请求数据包获取请求信息,根据请求信息用预置的调度算法在备选的虚拟处理设备中选择出合适的目标虚拟处理设备。
具体地,该预置的调度算法可以为根据各虚拟处理设备的运行状况监测结果寻找运行状态正常的虚拟处理设备和通过服务调度算法选择处理任务量少的虚拟处理设备,综合选择得到目标虚拟处理设备。
205、获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息;
206、根据处理设备端口信息和均衡控制端口信息生成第二流表,并基于第一流表和第二流表生成处理会话的第一数据连接通路;
本实施例中步骤205和步骤206中具体内容与前述实施例中步骤103和步骤104中内容基本相同,故在此不再赘述。
207、获取第一数据连接通路对应的处理会话的创建时间和当前时间;
208、根据创建时间和当前时间计算出处理会话的存活时间;
在本步骤之前,在每个处理会话创建时都会记录相应的创建时间,同时使用定时器对时长进行记录,得到当前时间。
计算出当前时间和所述创建时间的差值,得到处理会话的存活时间。
209、统计第一数据连接通路的转发数据信息,得到数据信息转发量;
210、判断存活时间是否超过预设的时间阈值和/或数据信息转发量是否超过预设的流量阈值;
统计前述的第一数据连接通路的数据信息,判断该数据信息是否达到预设的下发条件,其中,本实施例中的下发条件为所述处理会话的存活时间超过预设时间以及所述第一数据连接通路的数据信息转发量超过预设的流量阈值,故在得到第一数据连接通路后,判断存活时间是否超过预设的时间阈值和/或数据信息转发量是否超过预设的流量阈值。
211、若是,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,并将第三流表下发至虚拟用户端和目标虚拟处理设备;
本步骤中具体内容与前述实施例中步骤106中内容基本相同,故在此不再赘述。
212、根据正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将第一数据包通过第一虚拟扩展局域网隧道发送至目标虚拟处理设备;
213、根据返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将第二数据包通过第二虚拟扩展局域网隧道发送至虚拟用户端。
基于下发的第三流表,建立虚拟用户端和目标虚拟处理设备的数据连接通路,本实施例所述的数据连接通路指在进行数据处理时,虚拟用户端通过第三流表将数据包直接传输至目标虚拟处理设备进行处理,同样的,目标虚拟处理设备对数据进行处理后将结果根据第三流表传输至虚拟用户端,从而代替通过均衡控制器进行转发的处理方式,以减少均衡控制器需要处理的数据量。
具体地,在虚拟用户端通过第三流表将数据包直接传输至目标虚拟处理设备进行处理时,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将第一数据包通过第一虚拟扩展局域网隧道发送至目标虚拟处理设备。
请参阅图3以及图4,举具体的例子进行说明,该正向第三流表的样式可以为:
From_port:vm-1_port,
To:VIP:VPORT
Actions:
CIP:CPORT→LIP:LPORT
VIP:VPORT→RIP:RPORT
VXLAN Tunnel to Real-Server-4;
上述的正向第三流表的具体意义为:正向流表的从虚拟用户端到目标虚拟处理设备的数据包在进行传输时源地址/端口从虚拟用户端vm-1的源地址/端口CIP:CPORT转换成均衡控制器源地址/端口LIP:LPORT;把目标地址/端口VIP:VPORT转换成目标虚拟处理设备VM-Real-Server-4的源地址/端口RIP:RPORT。
该返程第三流表的样式可以为:
From:VM-Real-Server-4_RIP:RPORT
To:LIP:LPORT
Actions:
LIP:LPORT→CIP:CPORT
RIP:RPORT→VIP:VPORT
VXLAN Tunnel to vm-1
上述的返程第三流表的具体意义为:返程第三流表将目的地址/端口从均衡控制器源地址/端口LIP:LPORT转换成虚拟用户端vm-1的源地址/端口CIP:CPORT;把源地址/端口从目标虚拟处理设备VM-Real-Server-4的源地址/端口RIP:RPORT转换成VIP:VPORT。
本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
请参阅图3-图5,本申请实施例中负载均衡方法的第三实施例包括:
501、获取预置的第一流表,并根据第一流表,接收来自虚拟用户端的数据处理请求,并提取数据处理请求中包含的请求数据包;
本步骤中具体内容与前述实施例中步骤101中基本相同,故在此不再赘述。
502、解析请求数据包,得到请求信息,根据请求信息查询请求数据包是否属于已创建的会话;
503、若是,则将已创建的会话作为处理会话,并获取处理会话的会话信息,解析会 话信息得到处理会话的目标虚拟处理设备;
本实施例中步骤502-步骤503中具体内容与前述实施例中步骤202-步骤203中基本相同,故在此不再赘述。
504、若否,则获取预置的虚拟设备集中各虚拟处理设备的运行状况,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集;
505、获取备选虚拟设备集中各备选虚拟处理设备当前的处理会话的连接数,选择连接数最少的作为目标虚拟处理设备;
若查询得到的结果是该请求数据包不属于已创建的会话,则根据该请求数据包获取请求信息,根据请求信息获取本实施例中的服务器中的全部虚拟设备得到虚拟设备集,通过预置的运行状况监测工具获取预置的虚拟设备集中各虚拟处理设备的运行状况,其中,该运行状况监测工具中包含有为健康监测算法(Health-Check);基于运行状况监测工具获取的运行状况结果,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集。
根据调度算法,获取备选虚拟设备集中各备选虚拟设备的任务状况,其中,具体进行任务状况的获取时可以使用LVS(Linux Virtual Server,Linux虚拟服务器)服务调度算法,也可以直接获取各虚拟处理设备当前处理的任务数,选择处理任务量少的虚拟处理设备,综合选择得到目标虚拟处理设备。
506、获取目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息;
507、根据处理设备端口信息和均衡控制端口信息生成第二流表,并基于第一流表和第二流表生成处理会话的第一数据连接通路;
本实施例中步骤506和步骤507中具体内容与前述实施例中步骤103和步骤104中内容基本相同,故在此不再赘述。
508、获取第一数据连接通路对应的处理会话的创建时间和当前时间;
509、根据创建时间和当前时间计算出处理会话的存活时间;
510、统计第一数据连接通路的转发数据信息,得到数据信息转发量;
511、判断存活时间是否超过预设的时间阈值和/或数据信息转发量是否超过预设的流量阈值;
本实施例中步骤508-步骤511中具体内容与前述实施例中步骤207-步骤210中内容基本相同,故在此不再赘述。
512、若是,则获取虚拟用户端的用户端口信息,根据用户端口信息和处理设备端口信息生成第三流表,并将第三流表下发至虚拟用户端和目标虚拟处理设备;
本步骤中具体内容与前述实施例中步骤106中内容基本相同,故在此不再赘述。
513、根据正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将第一数据包通过第一虚拟扩展局域网隧道发送至目标虚拟处理设备;
514、根据返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将第二数据包通过第二虚拟扩展局域网隧道发送至虚拟用户端。
请继续参阅图3以及图4,本实施例中步骤513和步骤514中具体内容与前述实施例中步骤212和步骤213中内容基本相同,故在此不再赘述。
此外,在本实施例中,正向第三流表和返程第三流表的存在的期间,均衡控制器每隔预设流量监控时间获取该第三流表的流报告,根据流报告的具体信息判断正向第三和返程第三流表是否还在使用,如果数据流已消失,该正向第三和返程第三流表不使用,可以将正向第三流表和返程第三流表删除。同时,均衡控制器也可以根据流报告监控本实施例中 的目标虚拟处理设备的负载情况。
本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
上面对本申请实施例中负载均衡方法进行了描述,下面对本申请实施例中负载均衡装置进行描述,请参阅图6,本申请实施例中负载均衡装置的一个实施例包括:
获取模块601,用于获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
目标设备确定模块602,用于解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
第一连接模块603,用于获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡设备端口信息,根据所述处理设备端口信息和所述均衡设备端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
判断模块604,用于获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件。
流表下发模块605,用于若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
数据交换模块606,用于根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了对均衡控制器的性能要求。
请参阅图7,本申请实施例中负载均衡装置的另一个实施例包括:
获取模块601,用于获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
目标设备确定模块602,用于解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
第一连接模块603,用于获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡设备端口信息,根据所述处理设备端口信息和所述均衡设备端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
判断模块604,用于获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件。
流表下发模块605,用于若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
数据交换模块606,用于根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
可选的,所述流表下发模块605包括:
会话判断单元6051,用于根据所述请求信息查询所述请求数据包是否属于已创建的会话;
会话解析单元6052,用于若是,则将所述已创建的会话作为处理会话,并获取所述处理会话的会话信息,解析所述会话信息得到所述处理会话的目标虚拟处理设备;
会话创建单元6053,用于若否,则根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备,并基于所述目标虚拟处理设备创建处理会话。
可选的,所述会话创建单元6053包括:
运行状况检查子单元,用于获取预置的虚拟设备集中各虚拟处理设备的运行状况,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集;
运行任务检查子单元,用于获取所述备选虚拟设备集中各备选虚拟处理设备当前的处理会话的连接数,选择所述连接数最少的作为目标虚拟处理设备。
可选的,所述判断模块604包括:
时间获取单元6041,用于获取所述第一数据连接通路对应的处理会话的创建时间和当前时间;
存活时间计算单元6042,用于根据所述创建时间和当前时间计算出所述处理会话的存活时间;
数据统计单元6043,用于统计所述第一数据连接通路的转发数据信息,得到数据信息转发量;
条件判断单元6044,用于判断所述存活时间是否超过预设的时间阈值和/或所述数据信息转发量是否超过预设的流量阈值。
可选的,所述数据交换模块606包括:
数据正向发送单元6061,用于根据所述正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将所述第一数据包通过所述第一虚拟扩展局域网隧道发送至所述目标虚拟处理设备;
数据返程发送单元6062,用于根据所述返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将所述第二数据包通过所述第二虚拟扩展局域网隧道发送至所述虚拟用户端。
可选的,所述负载均衡装置还包括流表删除模块,所述流表删除模块包括:
报告获取单元,用于每隔预设流量监控时间获取所述正向第三流表和所述返程第三流表的流报告;
使用情况检测单元,用于根据所述流报告判断所述正向第三和所述返程第三流表是否还在使用;
删除单元,用于若否,则删除所述正向第三流表和所述返程第三流表。
可选的,所述负载均衡装置中的正向第三流表和所述返程第三流表的优先级高于所述第一流表的优先级和所述第二流表的优先级。
本申请实施例中的负载均衡方法可以在满足预设的下发条件时通过下发流表使虚拟用户端和目标虚拟处理设备直接交换数数据,减少了均衡控制器需要处理的数据量,降低了均衡控制器的性能要求。
上面图6和图7从模块化功能实体的角度对本申请实施例中的负载均衡装置进行详细描述,下面从硬件处理的角度对本申请实施例中负载均衡设备进行详细描述。
图8是本申请实施例提供的一种负载均衡设备的结构示意图,该负载均衡设备800可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central  processing units,CPU)810(例如,一个或一个以上处理器)和存储器820,一个或一个以上存储应用程序833或数据832的存储介质830(例如一个或一个以上海量存储设备)。其中,存储器820和存储介质830可以是短暂存储或持久存储。存储在存储介质830的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对负载均衡设备800中的一系列指令操作。更进一步地,处理器810可以设置为与存储介质830通信,在负载均衡设备800上执行存储介质830中的一系列指令操作。
负载均衡设备800还可以包括一个或一个以上电源840,一个或一个以上有线或无线网络接口850,一个或一个以上输入输出接口860,和/或,一个或一个以上操作系统831,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图8示出的负载均衡设备结构并不构成对负载均衡设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
本申请还提供一种计算机设备,该计算机设备可以是能够执行上述实施例中所述的负载均衡方法的任何一种设备,所述计算机设备包括存储器和处理器,存储器中存储有计算机可读指令,计算机可读指令被处理器执行时,使得处理器执行上述各实施例中的所述负载均衡方法的步骤。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,该计算机可读存储介质也可以为易失性计算机可读存储介质,所述计算机可读存储介质中存储有指令,当所述指令在计算机上运行时,使得计算机执行所述负载均衡方法的步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种负载均衡方法,其中,所述负载均衡方法包括:
    获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
    解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
    获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
    获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;
    若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
    根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
  2. 根据权利要求1所述的负载均衡方法,其中,所述基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备包括:
    根据所述请求信息查询所述请求数据包是否属于已创建的会话;
    若是,则将所述已创建的会话作为处理会话,并获取所述处理会话的会话信息,解析所述会话信息得到所述处理会话的目标虚拟处理设备;
    若否,则根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备,并基于所述目标虚拟处理设备创建处理会话。
  3. 根据权利要求2所述的负载均衡方法,其中,所述根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备包括:
    获取预置的虚拟设备集中各虚拟处理设备的运行状况,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集;
    获取所述备选虚拟设备集中各备选虚拟处理设备当前的处理会话的连接数,选择所述连接数最少的作为目标虚拟处理设备。
  4. 根据权利要求1-3中任一项所述的负载均衡方法,其中,所述获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件包括:
    获取所述第一数据连接通路对应的处理会话的创建时间和当前时间;
    根据所述创建时间和当前时间计算出所述处理会话的存活时间;
    统计所述第一数据连接通路的转发数据信息,得到数据信息转发量;
    判断所述存活时间是否超过预设的时间阈值和/或所述数据信息转发量是否超过预设的流量阈值。
  5. 根据权利要求4所述的负载均衡方法,其中,所述第三流表包括正向第三流表和返程第三流表,所述根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换包括:
    根据所述正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将所述第一数据包通 过所述第一虚拟扩展局域网隧道发送至所述目标虚拟处理设备;
    根据所述返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将所述第二数据包通过所述第二虚拟扩展局域网隧道发送至所述虚拟用户端。
  6. 根据权利要求5所述的负载均衡方法,其中,所述负载均衡方法还包括:
    每隔预设流量监控时间获取所述正向第三流表和所述返程第三流表的流报告;
    根据所述流报告判断所述正向第三和所述返程第三流表是否还在使用;
    若否,则删除所述正向第三流表和所述返程第三流表。
  7. 根据权利要求6所述的负载均衡方法,其中,所述正向第三流表和所述返程第三流表的优先级高于所述第一流表的优先级和所述第二流表的优先级。
  8. 一种负载均衡设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
    解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
    获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
    获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;
    若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
    根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
  9. 根据权利要求8所述的负载均衡设备,其中,所述基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备包括:
    根据所述请求信息查询所述请求数据包是否属于已创建的会话;
    若是,则将所述已创建的会话作为处理会话,并获取所述处理会话的会话信息,解析所述会话信息得到所述处理会话的目标虚拟处理设备;
    若否,则根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备,并基于所述目标虚拟处理设备创建处理会话。
  10. 根据权利要求9所述的负载均衡设备,其中,所述根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备包括:
    获取预置的虚拟设备集中各虚拟处理设备的运行状况,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集;
    获取所述备选虚拟设备集中各备选虚拟处理设备当前的处理会话的连接数,选择所述连接数最少的作为目标虚拟处理设备。
  11. 根据权利要求8-10中任一项所述的负载均衡设备,其中,所述获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件包括:
    获取所述第一数据连接通路对应的处理会话的创建时间和当前时间;
    根据所述创建时间和当前时间计算出所述处理会话的存活时间;
    统计所述第一数据连接通路的转发数据信息,得到数据信息转发量;
    判断所述存活时间是否超过预设的时间阈值和/或所述数据信息转发量是否超过预设的流量阈值。
  12. 根据权利要求11所述的负载均衡设备,其中,所述第三流表包括正向第三流表和返程第三流表,所述根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换包括:
    根据所述正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将所述第一数据包通过所述第一虚拟扩展局域网隧道发送至所述目标虚拟处理设备;
    根据所述返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将所述第二数据包通过所述第二虚拟扩展局域网隧道发送至所述虚拟用户端。
  13. 根据权利要求12所述的负载均衡设备,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:
    每隔预设流量监控时间获取所述正向第三流表和所述返程第三流表的流报告;
    根据所述流报告判断所述正向第三和所述返程第三流表是否还在使用;
    若否,则删除所述正向第三流表和所述返程第三流表。
  14. 根据权利要求13所述的负载均衡设备,其中,所述正向第三流表和所述返程第三流表的优先级高于所述第一流表的优先级和所述第二流表的优先级。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
    解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
    获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡控制端口信息,根据所述处理设备端口信息和所述均衡控制端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
    获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件;
    若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
    根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备包括:
    根据所述请求信息查询所述请求数据包是否属于已创建的会话;
    若是,则将所述已创建的会话作为处理会话,并获取所述处理会话的会话信息,解析 所述会话信息得到所述处理会话的目标虚拟处理设备;
    若否,则根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备,并基于所述目标虚拟处理设备创建处理会话。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述根据预置的调度配置规则,在备选的虚拟设备集中选择得到目标虚拟处理设备包括:
    获取预置的虚拟设备集中各虚拟处理设备的运行状况,选择运行状况为正常的虚拟处理设备得到备选虚拟设备集;
    获取所述备选虚拟设备集中各备选虚拟处理设备当前的处理会话的连接数,选择所述连接数最少的作为目标虚拟处理设备。
  18. 根据权利要求15-17中任一项所述的计算机可读存储介质,其中,所述获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件包括:
    获取所述第一数据连接通路对应的处理会话的创建时间和当前时间;
    根据所述创建时间和当前时间计算出所述处理会话的存活时间;
    统计所述第一数据连接通路的转发数据信息,得到数据信息转发量;
    判断所述存活时间是否超过预设的时间阈值和/或所述数据信息转发量是否超过预设的流量阈值。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述第三流表包括正向第三流表和返程第三流表,所述根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换包括:
    根据所述正向第三流表,将来自虚拟用户端的第一数据包的目的端口由均衡控制器端口转换成目标虚拟处理设备端口,并生成第一虚拟扩展局域网隧道,将所述第一数据包通过所述第一虚拟扩展局域网隧道发送至所述目标虚拟处理设备;
    根据所述返程第三流表将来自目标虚拟处理设备的第二数据包的目标端口由均衡控制器端口转换为虚拟用户端端口,并生成第二虚拟扩展局域网隧道,将所述第二数据包通过所述第二虚拟扩展局域网隧道发送至所述虚拟用户端。
  20. 一种负载均衡装置,其中,所述负载均衡装置包括:
    获取模块,用于获取预置的第一流表,并根据所述第一流表,接收来自虚拟用户端的数据处理请求,并提取所述数据处理请求中包含的请求数据包,其中,所述第一流表用于连接虚拟用户端和均衡控制器;
    目标设备确定模块,用于解析所述请求数据包,得到请求信息,基于所述请求信息获取处理会话,并确定所述处理会话的目标虚拟处理设备;
    第一连接模块,用于获取所述目标虚拟处理设备的处理设备端口信息和均衡控制器的均衡设备端口信息,根据所述处理设备端口信息和所述均衡设备端口信息生成第二流表,并基于所述第一流表和第二流表生成所述处理会话的第一数据连接通路,其中,所述第二流表用于连接均衡控制器和目标虚拟处理设备;
    判断模块,用于获取所述第一数据连接通路的数据信息,并判断所述数据信息是否达到预设的下发条件。
    流表下发模块,用于若是,则获取所述虚拟用户端的用户端口信息,根据所述用户端口信息和所述处理设备端口信息生成第三流表,并将所述第三流表下发至所述虚拟用户端和所述目标虚拟处理设备;
    数据交换模块,用于根据所述第三流表建立所述虚拟用户端和目标虚拟处理设备的数据连接通路,并基于所述连接通路进行数据交换。
PCT/CN2022/071686 2021-06-25 2022-01-13 负载均衡方法、装置、设备及存储介质 Ceased WO2022267458A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110710836.0A CN113448729B (zh) 2021-06-25 2021-06-25 负载均衡方法、装置、设备及存储介质
CN202110710836.0 2021-06-25

Publications (1)

Publication Number Publication Date
WO2022267458A1 true WO2022267458A1 (zh) 2022-12-29

Family

ID=77812734

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071686 Ceased WO2022267458A1 (zh) 2021-06-25 2022-01-13 负载均衡方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN113448729B (zh)
WO (1) WO2022267458A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857440A (zh) * 2024-01-10 2024-04-09 北京志凌海纳科技有限公司 基于分布式交换机的负载均衡架构方法及可读存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448729B (zh) * 2021-06-25 2023-01-31 平安科技(深圳)有限公司 负载均衡方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160142474A1 (en) * 2013-06-25 2016-05-19 Nec Corporation Communication system, apparatus, method and program
CN107846365A (zh) * 2017-10-24 2018-03-27 赞同科技股份有限公司 一种基于sdn的负载均衡实现系统及方法
CN108667888A (zh) * 2017-09-08 2018-10-16 新华三技术有限公司 一种负载均衡方法和装置
CN110971698A (zh) * 2019-12-09 2020-04-07 北京奇艺世纪科技有限公司 一种数据转发系统、方法及装置
CN111008075A (zh) * 2019-12-05 2020-04-14 安超云软件有限公司 一种负载均衡系统、方法、装置、设备及介质
CN113448729A (zh) * 2021-06-25 2021-09-28 平安科技(深圳)有限公司 负载均衡方法、装置、设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10412159B1 (en) * 2014-02-07 2019-09-10 Amazon Technologies, Inc. Direct load balancing using a multipath protocol
US10404788B2 (en) * 2016-06-30 2019-09-03 Alibaba Group Holding Limited Express route transmissions between virtual machines and cloud service computing devices
US10419330B2 (en) * 2016-07-21 2019-09-17 Alibaba Group Holding Limited Express route transmissions between virtual machines and cloud service computing devices
CN106686085B (zh) * 2016-12-29 2020-06-16 华为技术有限公司 一种负载均衡的方法、装置和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160142474A1 (en) * 2013-06-25 2016-05-19 Nec Corporation Communication system, apparatus, method and program
CN108667888A (zh) * 2017-09-08 2018-10-16 新华三技术有限公司 一种负载均衡方法和装置
CN107846365A (zh) * 2017-10-24 2018-03-27 赞同科技股份有限公司 一种基于sdn的负载均衡实现系统及方法
CN111008075A (zh) * 2019-12-05 2020-04-14 安超云软件有限公司 一种负载均衡系统、方法、装置、设备及介质
CN110971698A (zh) * 2019-12-09 2020-04-07 北京奇艺世纪科技有限公司 一种数据转发系统、方法及装置
CN113448729A (zh) * 2021-06-25 2021-09-28 平安科技(深圳)有限公司 负载均衡方法、装置、设备及存储介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117857440A (zh) * 2024-01-10 2024-04-09 北京志凌海纳科技有限公司 基于分布式交换机的负载均衡架构方法及可读存储介质

Also Published As

Publication number Publication date
CN113448729B (zh) 2023-01-31
CN113448729A (zh) 2021-09-28

Similar Documents

Publication Publication Date Title
US9910708B2 (en) Promotion of calculations to cloud-based computation resources
US11843527B2 (en) Real-time scalable virtual session and network analytics
US9575808B1 (en) Managing virtual machines
US20200014619A1 (en) Systems and methods for selecting communication paths for applications sensitive to bursty packet drops
JP5782641B2 (ja) 計算機システム及びパケット転送方法
US11750704B2 (en) Systems and methods to retain existing connections so that there is no connection loss when nodes are added to a cluster for capacity or when a node is taken out from the cluster for maintenance
CN105554065A (zh) 处理报文的方法、转换单元和应用单元
WO2001090903A1 (en) Apparatus, system, and method for balancing loads to network servers
JP5229028B2 (ja) システム分析方法、装置及びプログラム
CN108933829A (zh) 一种负载均衡方法及装置
CN105681462A (zh) 一种基于消息路由的集群系统及数据通信中转方法
CN112087382A (zh) 一种服务路由方法及装置
CN108920111B (zh) 数据共享方法及分布式数据共享系统
US12224998B2 (en) Selection of gateways for reconnection upon detection of reachability issues with backend resources
WO2022267458A1 (zh) 负载均衡方法、装置、设备及存储介质
WO2016048390A1 (en) Link aggregation configuration for a node in a software-defined network
JP5154313B2 (ja) Sipメッセージ振分方法およびsipメッセージ振分装置
EP4404527A1 (en) Service scheduling method and apparatus, device and computer readable storage medium
Ke et al. Load balancing using P4 in software-defined networks
US9948568B2 (en) Packet size control using maximum transmission units for facilitating packet transmission
WO2023179786A1 (zh) 网络地址转换网关的扩容方法、设备及存储介质
WO2016119422A1 (zh) 网络管理方法、设备及系统
CN113453025A (zh) 数据获取方法及装置
CN110768870A (zh) 一种智能专线的质量监控方法和装置
CN111614726B (zh) 一种数据转发方法、集群系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22826969

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22826969

Country of ref document: EP

Kind code of ref document: A1