WO2021243649A1 - Rate limit bandwidth adjustment method and apparatus - Google Patents

Rate limit bandwidth adjustment method and apparatus Download PDF

Info

Publication number
WO2021243649A1
WO2021243649A1 PCT/CN2020/094391 CN2020094391W WO2021243649A1 WO 2021243649 A1 WO2021243649 A1 WO 2021243649A1 CN 2020094391 W CN2020094391 W CN 2020094391W WO 2021243649 A1 WO2021243649 A1 WO 2021243649A1
Authority
WO
WIPO (PCT)
Prior art keywords
load balancing
bandwidth
rate
state information
node
Prior art date
Application number
PCT/CN2020/094391
Other languages
French (fr)
Chinese (zh)
Inventor
郭子亮
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN202080097946.8A priority Critical patent/CN115211089B/en
Priority to PCT/CN2020/094391 priority patent/WO2021243649A1/en
Publication of WO2021243649A1 publication Critical patent/WO2021243649A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • 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/122Avoiding congestion; Recovering from congestion by diverting traffic away from congested entities

Definitions

  • This application relates to the field of electronic technology, and in particular to a method and device for adjusting a rate-limiting bandwidth.
  • Load Balance refers to balancing and apportioning loads (work tasks) to multiple load balancing nodes for operation.
  • the network speed limit function is usually required.
  • the method of network speed limit function is to evenly distribute the total speed limit bandwidth. For example, if the total speed limit bandwidth is B and N load balancing nodes, the speed limit bandwidth of each load balancing node is B/N.
  • the embodiments of the present application provide a method and device for adjusting a rate-limiting bandwidth.
  • an embodiment of the present application provides a method for adjusting a rate-limiting bandwidth, which is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is positive Integer; the method includes:
  • an embodiment of the present application provides a rate limiting bandwidth adjustment device, which is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is positive Integer; the device includes:
  • An information acquisition unit configured to receive current state information of each of the second load balancing nodes, and obtain N pieces of first state information
  • a determining unit configured to determine the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node;
  • the adjustment unit is configured to adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth.
  • an embodiment of the present application provides a load balancing node, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured by the above Executed by a processor, and the foregoing program includes instructions for executing steps in any method of the first aspect of the embodiments of the present application.
  • an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute In one aspect, part or all of the steps described in any method.
  • the embodiments of the present application provide a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to execute as implemented in this application.
  • the computer program product may be a software installation package.
  • the first load balancing node first receives the current state information of each second load balancing node to obtain N pieces of first state information, and then based on the current second state of the first load balancing node
  • the information and the N first state information determine the first rate-limiting bandwidth of the first load balancing node, and finally adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth, which realizes the dynamic adjustment of the rate-limiting bandwidth of the load balancing node, and also the rate-limiting
  • the bandwidth is determined based on the current status information of each load balancing node, which is more in line with the current actual load situation, and improves the accuracy of the speed limit bandwidth adjustment.
  • FIG. 1 is a schematic diagram of a communication architecture provided by an embodiment of the present application.
  • FIG. 2 is a schematic structural diagram of a load balancing node provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a method for adjusting a rate-limiting bandwidth according to an embodiment of the present application
  • Fig. 4 is a schematic structural diagram of a device for adjusting a rate-limiting bandwidth provided by an embodiment of the present application.
  • Fig. 1 shows a schematic diagram of a communication architecture.
  • the communication framework includes load balancing clusters, physical switches, routers, and multiple electronic devices.
  • the load balancing cluster includes multiple load balancing nodes
  • a physical switch can communicate with each load balancing node in the load balancing cluster
  • the physical switch can communicate with a router
  • the router can communicate with each electronic device.
  • the electronic device may be a portable electronic device that also contains other functions such as a personal digital assistant and/or a music player, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), and so on.
  • portable electronic devices include, but are not limited to, portable electronic devices equipped with IOS system, Android system, Microsoft system or other operating systems.
  • the aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
  • the load balancing node may be a service device that provides computing services. Since the service device needs to respond to service requests and perform processing, in general, the service device should have the ability to undertake services and guarantee services.
  • the service device can be a background server or other devices.
  • Figure 2 shows a schematic structural diagram of a load balancing node.
  • the load balancing node may include a processor 210, an external memory interface 220, an internal memory 230, a communication module 240, and so on.
  • the load balancing node does not constitute a specific limitation on the load balancing node.
  • the load balancing node may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange different components.
  • the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the processor 210 may include one or more processing units.
  • the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc.
  • AP application processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • different processing units may be independent components, or may be integrated in one or more processors.
  • the load balancing node may also include one or more processors 210.
  • the processor 210 may generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching instructions and executing instructions.
  • a memory may be provided in the processor 210 to store instructions and data.
  • the memory in the processor 210 may be a cache memory.
  • the memory can store instructions or data that have just been used or recycled by the processor 210. If the processor 210 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated accesses are avoided, the waiting time of the processor 210 is reduced, and the efficiency of the load balancing node in processing data or executing instructions is improved.
  • the processor 210 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transceiver (universal asynchronous transceiver) interface.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • USB interface etc.
  • the communication module 240 can provide applications on load balancing nodes including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), global navigation satellite system (GNSS) ), frequency modulation (frequency modulation, FM) and other wireless communication solutions.
  • WLAN wireless local area networks
  • GNSS global navigation satellite system
  • FM frequency modulation
  • the communication module 240 may be one or more devices integrating at least one communication processing module.
  • the external memory interface 220 may be used to connect an external memory card, such as a hard disk, to expand the storage capacity of the load balancing node.
  • the external memory card communicates with the processor 210 through the external memory interface 220 to realize the data storage function.
  • the internal memory 230 may be used to store one or more computer programs, and the one or more computer programs include instructions.
  • the processor 210 may run the above-mentioned instructions stored in the internal memory 230, thereby causing the load balancing node to execute the rate limiting bandwidth adjustment method provided in some embodiments of the present application, etc.
  • the internal memory 230 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system. The storage data area can store the data created during the use of the load balancing node, etc.
  • the internal memory 230 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 210 may execute the instructions stored in the internal memory 230 and/or the instructions stored in the memory provided in the processor 210 to cause the load balancing node to execute the instructions provided in the embodiments of the present application. Speed limit bandwidth adjustment method.
  • FIG. 3 is a flow diagram of a method for adjusting a rate-limiting bandwidth according to an embodiment of the present application, which is applied to a first load balancing node in a load balancing cluster, and the load balancing cluster further includes N second loads For the balance node, the N is a positive integer.
  • the method for adjusting the rate-limiting bandwidth includes the following operations.
  • Step 301 The first load balancing node receives the current state information of each of the second load balancing nodes, and obtains N pieces of first state information, and the N pieces of first state information are the same as the N pieces of second load balancing nodes. One correspondence.
  • Step 302 The first load balancing node determines the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node.
  • Step 303 The first load balancing node adjusts the rate-limiting bandwidth based on the first rate-limiting bandwidth.
  • the first load balancing node is any node in the load balancing cluster, and the N second load balancing nodes are part or all of the load balancing nodes in the load balancing cluster except the first load balancing node.
  • each load balancing node adjusts the rate-limiting bandwidth periodically, and the duration of a cycle may be 5ms, 8ms, 10ms or other values.
  • each load balancing node sends status information during the rate limiting bandwidth adjustment period.
  • the status information may be sent at the beginning of the rate-limiting bandwidth adjustment period, or the status information may be sent at other moments in the rate-limiting bandwidth adjustment period.
  • the communication protocol for the load balancing node to send the status information may be multicast, so that all load balancing nodes in the load balancing cluster can receive it.
  • the communication protocol for the load balancing node to send status information can also be Transmission Control Protocol (TCP), User Datagram Protocol (UDP), etc.
  • the status information includes at least one of the following: the current timestamp of the load balancing node, the current traffic bandwidth of the load balancing node, the notification sequence number, and the node sequence number.
  • the current timestamp of the load balancing node refers to the time when the load balancing node sends the status information. For example, if the load balancing node sends status information at time 1, the current time stamp of the load balancing node is time 1.
  • the node sequence number is used to identify the load balancing node, and the node sequence numbers of different load balancing nodes are different. For example, if there are 3 load balancing nodes, the node numbers of these 3 load balancing nodes can be 1, 2, and 3.
  • the notification sequence number is used to identify how many times the load balancing node sends status information in the rate-limiting bandwidth adjustment period.
  • the notification sequence number is 1, which indicates that the load balancing node sends status information for the first time in the rate-limiting bandwidth adjustment period.
  • the current traffic bandwidth of the load balancing node refers to the total amount of data currently passing through the load balancing node in a unit time.
  • the first load balancing node updates the state information of the second load balancing node saved by the first load balancing node .
  • a load balancing cluster includes three load balancing nodes, such as load balancing node 1, load balancing node 2, and load balancing node 3. If the first load balancing node is load balancing node 1, load balancing node 1 is receiving load After balancing the state information 1 of node 2, load balancing node 1 updates the state information of load balancing node 2 saved by load balancing node 1 to state information 1. After load balancing node 1 receives state information 2 of load balancing node 3, The load balancing node 1 updates the state information of the load balancing node 3 saved by the load balancing node 1 to the state information 2.
  • the first load balancing node to adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth includes: the first load-balancing node replaces the rate-limiting bandwidth with the first rate-limiting bandwidth.
  • load balancing node 1 receives the current state information 2 of load balancing node 2, and then load balancing node 1 determines the limit of load balancing node 1 based on the current state information 1 of load balancing node 1 and the state information 2 Speed bandwidth 1, and finally load balancing node 1 adjusts the speed limit bandwidth based on the speed limit bandwidth 1.
  • load balancing node 2 receives the current state information 1 of load balancing node 1, and then load balancing node 2 determines the limit of load balancing node 2 based on the current state information 2 of load balancing node 2 and the state information 1. Speed bandwidth 2, and finally load balancing node 2 adjusts the speed limit bandwidth based on the speed limit bandwidth 2.
  • the speed limit bandwidth of the load balancing node is dynamically adjusted.
  • the speed limit bandwidth is determined based on the current status information of each load balancing node, which is more in line with the current actual load situation. Speed bandwidth adjustment accuracy.
  • each state information includes the current traffic bandwidth of its corresponding load balancing node; the first load balancing node is based on the N pieces of first state information and the first load balancing node
  • the current second state information determining the first rate limiting bandwidth of the first load balancing node includes:
  • the first load balancing node determines the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
  • the first load balancing node determines the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second state information.
  • the total rate limit bandwidth of the load balancing cluster refers to the total amount of data allowed to pass through the load balancing cluster per unit time.
  • the current total traffic bandwidth of the load balancing cluster refers to the total amount of data currently passing through the load balancing cluster per unit time.
  • the first load balancing node to determine the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second status information includes:
  • the first load balancing node determines the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
  • the load balancing cluster includes N load balancing nodes
  • the number of the N load balancing nodes is 1 to n
  • the current traffic bandwidths of the N load balancing nodes are expressed as C 1 , C 2 ... C n
  • the load balancing cluster The total rate-limiting bandwidth of N is denoted as B
  • the rate-limiting bandwidths of N load balancing nodes are denoted as B 1 , B 2 ...B n
  • B i in the first calculation formula is denoted as the i-th of the N load balancing nodes
  • C i in the first calculation formula represents the current traffic bandwidth of the i-th load balancing node among the N load balancing nodes
  • i is 1 to n.
  • a load balancing cluster has two load balancing nodes, such as load balancing node 1 and load balancing node 2.
  • the current status information of load balancing node 1 includes load balancing node 1, the current traffic bandwidth is C 1 .
  • the rate-limiting bandwidth is determined based on the current traffic bandwidth of each load balancing node, which is more in line with the current actual load situation and improves the accuracy of the rate-limiting bandwidth adjustment.
  • the data type currently processed by the first load balancing node includes a set data type; the first load balancing node is based on the total rate limiting bandwidth of the load balancing cluster and the total traffic
  • the bandwidth, the second state information, and the first calculation formula to determine the first rate-limiting bandwidth include:
  • the first load balancing node determines the second rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
  • the first load balancing node determines the first rate-limiting bandwidth based on the second rate-limiting bandwidth.
  • the setting data type includes, for example, a video data type, a text data type, or other data types.
  • the setting data type of the first load balancing node includes a video data type
  • the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth includes:
  • the first load balancing node determines the first rate-limiting bandwidth based on the second rate-limiting bandwidth and a second calculation formula, where the first rate-limiting bandwidth is greater than the second rate-limiting bandwidth.
  • the rate limiting bandwidth of the load balancing node is appropriately increased to provide sufficient bandwidth for data transmission and improve data transmission efficiency.
  • the setting data type includes a text data type
  • the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth includes:
  • the first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a third calculation formula, and the first rate-limiting bandwidth is smaller than the second rate-limiting bandwidth.
  • the rate limiting bandwidth of the load balancing node is appropriately reduced to avoid allocating excessive bandwidth and improve bandwidth utilization.
  • the first load balancing node determines the first load balancing node's first load balancing node based on the N first state information and the current second state information of the first load balancing node Before limiting the speed bandwidth, the method further includes:
  • the first load balancing node determines that the absolute value of the difference between the current flow bandwidth of the first load balancing node and the set flow bandwidth is within a set range.
  • the first load balancing node has set a limited speed bandwidth.
  • the set traffic bandwidth is determined based on the total rate limiting bandwidth of the load balancing cluster and the N.
  • the set traffic bandwidth is determined based on the total rate limit bandwidth of the load balancing cluster and the N, including: the set traffic bandwidth is based on the first mapping relationship, the total rate limit bandwidth, and Determined by the N, the first mapping relationship is as shown in Table 1.
  • the set flow bandwidth is determined based on the N.
  • the set flow bandwidth is determined based on the N, including: the set flow bandwidth is determined based on a second mapping relationship and the N, and the second mapping relationship is as shown in Table 2. Show.
  • N Set traffic bandwidth 2 400mbps 3 300mbps 4 250mbps ... ...
  • the set flow bandwidth is defined in advance by the load balancing node, or the set flow bandwidth is the rate limit bandwidth currently set by the load balancing node.
  • the setting range includes one or more setting ranges.
  • the setting range includes a first setting range and a second setting range, and the values included in the first setting range and the values included in the second setting range are both smaller than the setting flow bandwidth .
  • the values included in the first setting range are all smaller than the values included in the second setting range, the values included in the first setting range are smaller than the set flow bandwidth, and the second setting range is The maximum value included is equal to the set flow bandwidth. For example, if the traffic bandwidth is set to 500 mbps, the first setting range may be 0-50 mbps, and the second setting range may be 300 mbps to 500 mbps.
  • the load balancing node adjusts the rate limit bandwidth only when the current flow bandwidth of the load balancing node and the set flow bandwidth are relatively large or the difference is relatively small, which can reduce the load balance.
  • the power consumption of the node is relatively small.
  • the method further includes:
  • the first load balancing node sends the first rate-limiting bandwidth to a physical switch, where the first rate-limiting bandwidth is used by the physical switch to distribute traffic to the first load balancing node.
  • the load balancing node sends the adjusted rate-limiting bandwidth to the physical switch after adjusting the rate-limiting bandwidth, so that the physical switch can distribute traffic more reasonably.
  • each status information further includes a notification sequence number and a node sequence number
  • the method further includes:
  • the first load balancing node After receiving the first state information of any second load balancing node among the N second load balancing nodes, the first load balancing node includes the first state information based on the first state information of any second load balancing node The notification sequence number and the node sequence number are used to determine whether the first status information of any of the second load balancing nodes is received for the first time;
  • the first load balancing node will perform processing between the second state information and the first state information currently saved by the first load balancing node Encapsulate and get the first message;
  • the first load balancing node sends the first packet.
  • the method further includes:
  • the first load balancing node saves the first state information of any second load balancing node.
  • the first message includes first state information of any of the second load balancing nodes.
  • the method further includes:
  • the first load balancing node updates the first load based on the first state information of any second load balancing node The first state information currently saved by the balancing node.
  • the first load balancing node determines whether the first state information of any second load balancing node is the first state information based on the notification sequence number and the node sequence number included in the first state information of any second load balancing node Received, including:
  • the first load balancing node determines that the first state information of any of the second load balancing nodes is received for the first time;
  • the first load balancing node determines that the first state information of any of the second load balancing nodes is not received for the first time.
  • the setting number is, for example, 0, 1, and so on.
  • load balancing node 1 For example, suppose a load balancing cluster has 3 load balancing nodes, such as load balancing node 1, load balancing node 2, and load balancing node 3. If the first load balancing node is load balancing node 1, load balancing node 1 receives the load After balancing the state information of node 2, load balancing node 1 first determines whether the received state information of load balancing node 2 is received for the first time. If so, load balancing node 1 saves the state information of load balancing node 2.
  • load balancing node 1 If load balancing node 1 currently saves the state information of load balancing node 3, load balancing node 1 encapsulates and sends the current state information of load balancing node 1, the state information of load balancing node 2, and the state information of load balancing node 3 .
  • an electronic device in order to implement the above-mentioned functions, includes hardware and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
  • the electronic device can be divided into functional modules according to the foregoing method examples.
  • each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
  • FIG. 4 shows a schematic diagram of a speed-limiting bandwidth adjustment device.
  • the speed-limiting bandwidth adjustment 400 is applied to load balancing nodes, and the speed-limiting bandwidth adjustment 400 is It may include: an information acquisition unit 401, a determination unit 402, an adjustment unit 403, an information packaging unit 404, and a communication unit 405.
  • the information acquiring unit 401 may be used to support the load balancing node to perform the above step 301, etc., and/or be used in other processes of the technology described herein.
  • the determining unit 402 may be used to support the load balancing node to perform the foregoing step 302, etc., and/or be used in other processes of the technology described herein.
  • the adjustment unit 403 may be used to support the load balancing node to perform the above step 303, etc., and/or be used in other processes of the technology described herein.
  • the information encapsulation unit 404 can be used to support the load balancing node to perform the step of "encapsulating the second state information and the first state information currently saved by the first load balancing node to obtain the first message", etc., and/or used in this article Describe the other processes of the technology.
  • the communication unit 405 may be used to support the load balancing node to perform the step "send the first message", etc., and/or be used in other processes of the technology described herein.
  • the load balancing node provided in this embodiment is used to execute the above-mentioned speed-limiting bandwidth adjustment method, so the same effect as the above-mentioned implementation method can be achieved.
  • the load balancing node may include a processing module, a storage module, and a communication module.
  • the processing module can be used to control and manage the actions of the load balancing node. For example, it can be used to support the load balancing node to perform the steps performed by the information acquisition unit 401, the determination unit 402, the adjustment unit 403, and the information encapsulation unit 404.
  • the storage module can be used to support load balancing nodes to execute stored program codes and data.
  • the communication module may be used to support the execution of the steps performed by the above-mentioned communication unit 405 and to support the communication between the load balancing node and other devices.
  • the processing module can be a processor or a controller. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on.
  • the storage module may be a memory.
  • the communication module may specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and other devices that interact with other electronic devices.
  • the load balancing node involved in this embodiment may be a device having the structure shown in FIG. 2.
  • This embodiment also provides a computer storage medium in which computer instructions are stored.
  • the computer instructions run on an electronic device, the electronic device is caused to execute the above-mentioned related method steps to realize the speed-limiting bandwidth adjustment in the above-mentioned embodiment. method.
  • This embodiment also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned related steps, so as to realize the speed-limiting bandwidth adjustment method in the above-mentioned embodiment.
  • the embodiments of the present application also provide a device.
  • the device may specifically be a chip, component, or module.
  • the device may include a processor and a memory connected to each other.
  • the memory is used to store computer execution instructions.
  • the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the speed limit bandwidth adjustment method in the foregoing method embodiments.
  • the load balancing nodes, computer storage media, computer program products, or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above. The beneficial effects of the method are not repeated here.
  • the disclosed device and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components can be combined or It can be integrated into another device, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate parts may or may not be physically separate, and the parts displayed as a unit may be one physical unit or multiple physical units, that is, they may be located in one place or distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium.
  • the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed in the present application are a rate limit bandwidth adjustment method and apparatus, applied to a first load balance node in a load balance cluster. The load balance cluster further comprises N second load balance nodes, and N is a positive integer. The method comprises: receiving current state information of each of the second load balance nodes to obtain N pieces of first state information; determining a first rate limit bandwidth of the first load balance node on the basis of the N pieces of first state information and current second state information of the first load balance node; and performing a rate limit bandwidth adjustment on the basis of the first rate limit bandwidth. The use of the embodiments of the present application can dynamically adjust the rate limit bandwidth of a load balance node.

Description

限速带宽调整方法及装置Method and device for adjusting speed limit bandwidth 技术领域Technical field
本申请涉及电子技术领域,尤其涉及一种限速带宽调整方法及装置。This application relates to the field of electronic technology, and in particular to a method and device for adjusting a rate-limiting bandwidth.
背景技术Background technique
负载均衡(Load Balance)指的是将负载(工作任务)进行平衡、分摊到多个负载均衡节点上进行运行。为了避免流量过大导致网络服务出现异常,通常需要网络限速功能。目前,网络限速功能的做法是平均分配总限速带宽,例如,假设总限速带宽为B,N个负载均衡节点,则每个负载均衡节点的限速带宽为B/N。Load Balance (Load Balance) refers to balancing and apportioning loads (work tasks) to multiple load balancing nodes for operation. In order to avoid abnormalities in network services caused by excessive traffic, the network speed limit function is usually required. At present, the method of network speed limit function is to evenly distribute the total speed limit bandwidth. For example, if the total speed limit bandwidth is B and N load balancing nodes, the speed limit bandwidth of each load balancing node is B/N.
发明内容Summary of the invention
本申请实施例提供一种限速带宽调整方法及装置。The embodiments of the present application provide a method and device for adjusting a rate-limiting bandwidth.
第一方面,本申请实施例提供一种限速带宽调整方法,应用于负载均衡集群中的第一负载均衡节点,所述负载均衡集群还包括N个第二负载均衡节点,所述N为正整数;所述方法包括:In the first aspect, an embodiment of the present application provides a method for adjusting a rate-limiting bandwidth, which is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is positive Integer; the method includes:
接收每个所述第二负载均衡节点当前的状态信息,得到N个第一状态信息;Receiving current state information of each of the second load balancing nodes to obtain N pieces of first state information;
基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽;Determine the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node;
基于所述第一限速带宽进行限速带宽调整。Perform a rate-limit bandwidth adjustment based on the first rate-limit bandwidth.
第二方面,本申请实施例提供一种限速带宽调整装置,应用于负载均衡集群中的第一负载均衡节点,所述负载均衡集群还包括N个第二负载均衡节点,所述N为正整数;所述装置包括:In a second aspect, an embodiment of the present application provides a rate limiting bandwidth adjustment device, which is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is positive Integer; the device includes:
信息获取单元,用于接收每个所述第二负载均衡节点当前的状态信息,得到N个第一状态信息;An information acquisition unit, configured to receive current state information of each of the second load balancing nodes, and obtain N pieces of first state information;
确定单元,用于基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽;A determining unit, configured to determine the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node;
调整单元,用于基于所述第一限速带宽进行限速带宽调整。The adjustment unit is configured to adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth.
第三方面,本申请实施例提供一种负载均衡节点,包括处理器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述处理器执行,上述程序包括用于执行本申请实施例第一方面任一方法中的步骤的指令。In a third aspect, an embodiment of the present application provides a load balancing node, including a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and are configured by the above Executed by a processor, and the foregoing program includes instructions for executing steps in any method of the first aspect of the embodiments of the present application.
第四方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the above-mentioned computer-readable storage medium stores a computer program for electronic data exchange, wherein the above-mentioned computer program enables a computer to execute In one aspect, part or all of the steps described in any method.
第五方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a fifth aspect, the embodiments of the present application provide a computer program product, wherein the above-mentioned computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the above-mentioned computer program is operable to cause a computer to execute as implemented in this application. For example, part or all of the steps described in any method of the first aspect. The computer program product may be a software installation package.
可以看出,在本申请实施例中,第一负载均衡节点先接收每个第二负载均衡节点当前的状态信息,得到N个第一状态信息,然后基于第一负载均衡节点当前的第二状态信息和该N个第一状态信息确定第一负载均衡节点的第一限速带宽,最后基于第一限速带宽进行限速带宽调整,实现了动态调整负载均衡节点的限速带宽,另外限速带宽是基于各个负载均衡节点当前的状态信息确定的,更符合当前实际的负载情况,提升限速带宽调整的准确性。It can be seen that in this embodiment of the application, the first load balancing node first receives the current state information of each second load balancing node to obtain N pieces of first state information, and then based on the current second state of the first load balancing node The information and the N first state information determine the first rate-limiting bandwidth of the first load balancing node, and finally adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth, which realizes the dynamic adjustment of the rate-limiting bandwidth of the load balancing node, and also the rate-limiting The bandwidth is determined based on the current status information of each load balancing node, which is more in line with the current actual load situation, and improves the accuracy of the speed limit bandwidth adjustment.
附图说明Description of the drawings
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present invention more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative work, other drawings can be obtained from these drawings.
图1是本申请实施例提供的一种通信构架的示意图;FIG. 1 is a schematic diagram of a communication architecture provided by an embodiment of the present application;
图2是本申请实施例提供的一种负载均衡节点的结构示意图;FIG. 2 is a schematic structural diagram of a load balancing node provided by an embodiment of the present application;
图3是本申请实施例提供的一种限速带宽调整方法的流程示意图;FIG. 3 is a schematic flowchart of a method for adjusting a rate-limiting bandwidth according to an embodiment of the present application;
图4是本申请实施例提供的一种限速带宽调整装置的结构示意图。Fig. 4 is a schematic structural diagram of a device for adjusting a rate-limiting bandwidth provided by an embodiment of the present application.
具体实施方式detailed description
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
第一部分,本申请所公开的技术方案所适用的通信构架介绍如下。In the first part, the communication architecture applicable to the technical solution disclosed in this application is introduced as follows.
示例性的,图1示出了通信构架的示意图。该通信构架包括负载均衡集群、物理交换机、路由器和多个电子设备。其中,负载均衡集群包括多个负载均衡节点,物理交换机可与负载均衡集群中的每个负载均衡节点通信,物理交换机可与路由器通信,路由器可与每个电子设备通信。Exemplarily, Fig. 1 shows a schematic diagram of a communication architecture. The communication framework includes load balancing clusters, physical switches, routers, and multiple electronic devices. Among them, the load balancing cluster includes multiple load balancing nodes, a physical switch can communicate with each load balancing node in the load balancing cluster, the physical switch can communicate with a router, and the router can communicate with each electronic device.
其中,电子设备可以是还包含其它功能诸如个人数字助理和/或音乐播放器功能的便携式电子设备,诸如手机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表)等。便携式电子设备的示例性实施例包括但不限于搭载IOS系统、Android系统、Microsoft系统或者其它操作系统的便携式电子设备。上述便携式电子设备也可以是其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述电子设备也可以不是便携式电子设备,而是台式计算机。Among them, the electronic device may be a portable electronic device that also contains other functions such as a personal digital assistant and/or a music player, such as a mobile phone, a tablet computer, a wearable electronic device with wireless communication function (such as a smart watch), and so on. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices equipped with IOS system, Android system, Microsoft system or other operating systems. The aforementioned portable electronic device may also be other portable electronic devices, such as a laptop computer (Laptop) and the like. It should also be understood that, in some other embodiments, the above-mentioned electronic device may not be a portable electronic device, but a desktop computer.
其中,负载均衡节点可以是提供计算服务的服务设备,由于服务设备需要响应服务请求,并进行处理,因此一般来说服务设备应具备承担服务并且保障服务的能力。服务设备可以是后台服务器,也可以是其他设备。Among them, the load balancing node may be a service device that provides computing services. Since the service device needs to respond to service requests and perform processing, in general, the service device should have the ability to undertake services and guarantee services. The service device can be a background server or other devices.
第二部分,本申请所公开的负载均衡节点介绍如下。In the second part, the load balancing nodes disclosed in this application are introduced as follows.
示例性的,图2示出了负载均衡节点的结构示意图。负载均衡节点可以包括处理器210、外部存储器接口220、内部存储器230、通信模块240等。Exemplarily, Figure 2 shows a schematic structural diagram of a load balancing node. The load balancing node may include a processor 210, an external memory interface 220, an internal memory 230, a communication module 240, and so on.
可以理解的是,本申请实施例示意的结构并不构成对负载均衡节点的具体限定。在本申请另一些实施例中,负载均衡节点可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the load balancing node. In other embodiments of the present application, the load balancing node may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange different components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics  processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,负载均衡节点也可以包括一个或多个处理器210。其中,处理器210可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。在其他一些实施例中,处理器210中还可以设置存储器,用于存储指令和数据。示例性地,处理器210中的存储器可以为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。这样就避免了重复存取,减少了处理器210的等待时间,因而提高了负载均衡节点处理数据或执行指令的效率。The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU), etc. Among them, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, the load balancing node may also include one or more processors 210. Among them, the processor 210 may generate operation control signals according to the instruction operation code and timing signals, and complete the control of fetching instructions and executing instructions. In some other embodiments, a memory may be provided in the processor 210 to store instructions and data. Exemplarily, the memory in the processor 210 may be a cache memory. The memory can store instructions or data that have just been used or recycled by the processor 210. If the processor 210 needs to use the instruction or data again, it can be directly called from the memory. In this way, repeated accesses are avoided, the waiting time of the processor 210 is reduced, and the efficiency of the load balancing node in processing data or executing instructions is improved.
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口、集成电路间音频(inter-integrated circuit sound,I2S)接口、脉冲编码调制(pulse code modulation,PCM)接口、通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口、移动产业处理器接口(mobile industry processor interface,MIPI)、用输入输出(general-purpose input/output,GPIO)接口、USB接口等。In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transceiver (universal asynchronous transceiver) interface. asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, USB interface, etc.
通信模块240可以提供应用在负载均衡节点上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络)、全球导航卫星系统(global navigation satellite system,GNSS)、调频(frequency modulation,FM)等无线通信的解决方案。通信模块240可以是集成至少一个通信处理模块的一个或多个器件。The communication module 240 can provide applications on load balancing nodes including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), global navigation satellite system (GNSS) ), frequency modulation (frequency modulation, FM) and other wireless communication solutions. The communication module 240 may be one or more devices integrating at least one communication processing module.
外部存储器接口220可以用于连接外部存储卡,例如硬盘,实现扩展负载均衡节点的存储能力。外部存储卡通过外部存储器接口220与处理器210通信,实现数据存储功能。The external memory interface 220 may be used to connect an external memory card, such as a hard disk, to expand the storage capacity of the load balancing node. The external memory card communicates with the processor 210 through the external memory interface 220 to realize the data storage function.
内部存储器230可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器210可以通过运行存储在内部存储器230的上述指令,从而使得负载均衡节点执行本申请一些实施例中所提供的限速带宽调整方法 等。内部存储器230可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统。存储数据区可存储负载均衡节点使用过程中所创建的数据等。此外,内部存储器230可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器210可以通过运行存储在内部存储器230的指令,和/或存储在设置于处理器210中的存储器的指令,来使得负载均衡节点执行本申请实施例中所提供的限速带宽调整方法。The internal memory 230 may be used to store one or more computer programs, and the one or more computer programs include instructions. The processor 210 may run the above-mentioned instructions stored in the internal memory 230, thereby causing the load balancing node to execute the rate limiting bandwidth adjustment method provided in some embodiments of the present application, etc. The internal memory 230 may include a storage program area and a storage data area. Among them, the storage program area can store the operating system. The storage data area can store the data created during the use of the load balancing node, etc. In addition, the internal memory 230 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like. In some embodiments, the processor 210 may execute the instructions stored in the internal memory 230 and/or the instructions stored in the memory provided in the processor 210 to cause the load balancing node to execute the instructions provided in the embodiments of the present application. Speed limit bandwidth adjustment method.
第三部分,本申请实施例所公开的权要保护范围介绍如下。In the third part, the scope of protection of the rights disclosed in the embodiments of this application is introduced as follows.
请参阅图3,图3是本申请实施例提供了一种限速带宽调整方法的流程示意图,应用于负载均衡集群中的第一负载均衡节点,所述负载均衡集群还包括N个第二负载均衡节点,所述N为正整数,如图所示,本限速带宽调整方法包括以下操作。Please refer to FIG. 3, which is a flow diagram of a method for adjusting a rate-limiting bandwidth according to an embodiment of the present application, which is applied to a first load balancing node in a load balancing cluster, and the load balancing cluster further includes N second loads For the balance node, the N is a positive integer. As shown in the figure, the method for adjusting the rate-limiting bandwidth includes the following operations.
步骤301:第一负载均衡节点接收每个所述第二负载均衡节点当前的状态信息,得到N个第一状态信息,所述N个第一状态信息与所述N个第二负载均衡节点一一对应。Step 301: The first load balancing node receives the current state information of each of the second load balancing nodes, and obtains N pieces of first state information, and the N pieces of first state information are the same as the N pieces of second load balancing nodes. One correspondence.
步骤302:第一负载均衡节点基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽。Step 302: The first load balancing node determines the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node.
步骤303:第一负载均衡节点基于所述第一限速带宽进行限速带宽调整。Step 303: The first load balancing node adjusts the rate-limiting bandwidth based on the first rate-limiting bandwidth.
其中,第一负载均衡节点为负载均衡集群中的任意一个节点,N个第二负载均衡节点为负载均衡集群中除第一负载均衡节点之外的部分或全部负载均衡节点。The first load balancing node is any node in the load balancing cluster, and the N second load balancing nodes are part or all of the load balancing nodes in the load balancing cluster except the first load balancing node.
可选地,每个负载均衡节点是周期性调整限速带宽的,一个周期的持续时长可以是5ms、8ms、10ms或是其他值。Optionally, each load balancing node adjusts the rate-limiting bandwidth periodically, and the duration of a cycle may be 5ms, 8ms, 10ms or other values.
可选地,每个负载均衡节点在限速带宽调整周期内,发送状态信息。例如可以是在限速带宽调整周期的起始时刻发送状态信息,可以是在限速带宽调整周期的中其他时刻发送状态信息等。Optionally, each load balancing node sends status information during the rate limiting bandwidth adjustment period. For example, the status information may be sent at the beginning of the rate-limiting bandwidth adjustment period, or the status information may be sent at other moments in the rate-limiting bandwidth adjustment period.
其中,负载均衡节点发送状态信的通信协议可以是组播,以使得负载均衡集群中的所有负载均衡节点都可接收到。负载均衡节点发送状态信息的通信协议还可以是传输控制协议(Transmission Control Protocol,TCP)、用户数据 报协议(User Datagram Protocol,UDP)等。Wherein, the communication protocol for the load balancing node to send the status information may be multicast, so that all load balancing nodes in the load balancing cluster can receive it. The communication protocol for the load balancing node to send status information can also be Transmission Control Protocol (TCP), User Datagram Protocol (UDP), etc.
可选地,状态信息包括以下至少一种:负载均衡节点当前的时间戳、负载均衡节点当前的流量带宽、通报序号、节点序号。Optionally, the status information includes at least one of the following: the current timestamp of the load balancing node, the current traffic bandwidth of the load balancing node, the notification sequence number, and the node sequence number.
其中,负载均衡节点当前的时间戳指的是负载均衡节点发送状态信息时的时间。例如,负载均衡节点在时刻1发送状态信息,则负载均衡节点当前的时间戳为时刻1。Among them, the current timestamp of the load balancing node refers to the time when the load balancing node sends the status information. For example, if the load balancing node sends status information at time 1, the current time stamp of the load balancing node is time 1.
其中,节点序号用于标识负载均衡节点,不同的负载均衡节点的节点序号是不同的。例如有3个负载均衡节点,则这3个负载均衡节点的节点序号可以是1、2和3。Among them, the node sequence number is used to identify the load balancing node, and the node sequence numbers of different load balancing nodes are different. For example, if there are 3 load balancing nodes, the node numbers of these 3 load balancing nodes can be 1, 2, and 3.
其中,通报序号用于标识负载均衡节点在限速带宽调整周期内第几次发送状态信息。例如通报序号为1,则标识负载均衡节点在限速带宽调整周期内第一次发送状态信息。Among them, the notification sequence number is used to identify how many times the load balancing node sends status information in the rate-limiting bandwidth adjustment period. For example, the notification sequence number is 1, which indicates that the load balancing node sends status information for the first time in the rate-limiting bandwidth adjustment period.
其中,负载均衡节点当前的流量带宽指的是单位时间内当前通过负载均衡节点的总数据量。Among them, the current traffic bandwidth of the load balancing node refers to the total amount of data currently passing through the load balancing node in a unit time.
可选地,第一负载均衡节点在接收到所述第二负载均衡节点当前的状态信息之后,第一负载均衡节点更新所述第一负载均衡节点保存的所述第二负载均衡节点的状态信息。Optionally, after the first load balancing node receives the current state information of the second load balancing node, the first load balancing node updates the state information of the second load balancing node saved by the first load balancing node .
举例来说,负载均衡集群包括3个负载均衡节点,如负载均衡节点1、负载均衡节点2和负载均衡节点3,假如第一负载均衡节点为负载均衡节点1,负载均衡节点1在接收到负载均衡节点2的状态信息1之后,负载均衡节点1将负载均衡节点1保存的负载均衡节点2的状态信息更新为状态信息1,负载均衡节点1在接收到负载均衡节点3的状态信息2之后,负载均衡节点1将负载均衡节点1保存的负载均衡节点3的状态信息更新为状态信息2。For example, a load balancing cluster includes three load balancing nodes, such as load balancing node 1, load balancing node 2, and load balancing node 3. If the first load balancing node is load balancing node 1, load balancing node 1 is receiving load After balancing the state information 1 of node 2, load balancing node 1 updates the state information of load balancing node 2 saved by load balancing node 1 to state information 1. After load balancing node 1 receives state information 2 of load balancing node 3, The load balancing node 1 updates the state information of the load balancing node 3 saved by the load balancing node 1 to the state information 2.
可选地,第一负载均衡节点基于所述第一限速带宽进行限速带宽调整,包括:第一负载均衡节点将限速带宽更换为所述第一限速带宽。Optionally, the first load balancing node to adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth includes: the first load-balancing node replaces the rate-limiting bandwidth with the first rate-limiting bandwidth.
举例来说,假设负载均衡集群有2个负载均衡节点,如负载均衡节点1和负载均衡节点2。针对负载均衡节点1来说,负载均衡节点1接收负载均衡节点2当前的状态信息2,然后负载均衡节点1基于负载均衡节点1当前的状态信息1和该状态信息2确定负载均衡节点1的限速带宽1,最后负载均衡节 点1基于限速带宽1进行限速带宽调整。针对负载均衡节点2来说,负载均衡节点2接收负载均衡节点1当前的状态信息1,然后负载均衡节点2基于负载均衡节点2当前的状态信息2和该状态信息1确定负载均衡节点2的限速带宽2,最后负载均衡节点2基于限速带宽2进行限速带宽调整。For example, suppose that the load balancing cluster has two load balancing nodes, such as load balancing node 1 and load balancing node 2. For load balancing node 1, load balancing node 1 receives the current state information 2 of load balancing node 2, and then load balancing node 1 determines the limit of load balancing node 1 based on the current state information 1 of load balancing node 1 and the state information 2 Speed bandwidth 1, and finally load balancing node 1 adjusts the speed limit bandwidth based on the speed limit bandwidth 1. For load balancing node 2, load balancing node 2 receives the current state information 1 of load balancing node 1, and then load balancing node 2 determines the limit of load balancing node 2 based on the current state information 2 of load balancing node 2 and the state information 1. Speed bandwidth 2, and finally load balancing node 2 adjusts the speed limit bandwidth based on the speed limit bandwidth 2.
可以看出,在本申请实施例中,实现了动态调整负载均衡节点的限速带宽,另外限速带宽是基于各个负载均衡节点当前的状态信息确定的,更符合当前实际的负载情况,提升限速带宽调整的准确性。It can be seen that in the embodiment of the application, the speed limit bandwidth of the load balancing node is dynamically adjusted. In addition, the speed limit bandwidth is determined based on the current status information of each load balancing node, which is more in line with the current actual load situation. Speed bandwidth adjustment accuracy.
在本申请的一实现方式中,每个状态信息均包括其对应的负载均衡节点当前的流量带宽;所述第一负载均衡节点基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽,包括:In an implementation of the present application, each state information includes the current traffic bandwidth of its corresponding load balancing node; the first load balancing node is based on the N pieces of first state information and the first load balancing node The current second state information determining the first rate limiting bandwidth of the first load balancing node includes:
第一负载均衡节点基于所述N个第一状态信息和所述第二状态信息,确定所述负载均衡集群当前的总流量带宽;The first load balancing node determines the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
第一负载均衡节点基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带宽。The first load balancing node determines the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second state information.
其中,负载均衡集群的总限速带宽指的是单位时间内允许通过负载均衡集群的总数据量。Among them, the total rate limit bandwidth of the load balancing cluster refers to the total amount of data allowed to pass through the load balancing cluster per unit time.
其中,负载均衡集群当前的总流量带宽指的是单位时间内当前通过负载均衡集群的总数据量。Among them, the current total traffic bandwidth of the load balancing cluster refers to the total amount of data currently passing through the load balancing cluster per unit time.
进一步地,所述第一负载均衡节点基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带宽,包括:Further, the first load balancing node to determine the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second status information includes:
第一负载均衡节点基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽;The first load balancing node determines the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
其中,所述第一计算公式为:B i=C i+(B-C)/N,所述B i为限速带宽,所述C i为负载均衡节点当前的流量带宽,所述B为总限速带宽,所述C为总流量带宽,所述N为负载均衡集群中的负载均衡节点的数量。 Wherein, the first calculation formula is: B i =C i +(BC)/N, the B i is the rate limit bandwidth, the C i is the current traffic bandwidth of the load balancing node, and the B is the total limit The speed bandwidth, the C is the total traffic bandwidth, and the N is the number of load balancing nodes in the load balancing cluster.
具体地,假设负载均衡集群包括N个负载均衡节点,N个负载均衡节点的编号为1到n,N个负载均衡节点当前的流量带宽分别表示为C 1、C 2…C n,负载均衡集群的总限速带宽表示为B,N个负载均衡节点的限速带宽分别表示 为B 1、B 2…B n,第一计算公式中的B i表示为N个负载均衡节点中的第i个负载均衡节点的限速带宽,第一计算公式中的C i表示为N个负载均衡节点中的第i个负载均衡节点当前的流量带宽,i为1到n。 Specifically, assuming that the load balancing cluster includes N load balancing nodes, the number of the N load balancing nodes is 1 to n, and the current traffic bandwidths of the N load balancing nodes are expressed as C 1 , C 2 … C n , and the load balancing cluster The total rate-limiting bandwidth of N is denoted as B, the rate-limiting bandwidths of N load balancing nodes are denoted as B 1 , B 2 …B n , and B i in the first calculation formula is denoted as the i-th of the N load balancing nodes For the rate limiting bandwidth of the load balancing node, C i in the first calculation formula represents the current traffic bandwidth of the i-th load balancing node among the N load balancing nodes, and i is 1 to n.
举例来说,假设负载均衡集群有2个负载均衡节点,如负载均衡节点1和负载均衡节点2,假如负载均衡节点1当前的状态信息1包括的负载均衡节点1当前的流量带宽为C 1,负载均衡节点2当前的状态信息2包括的负载均衡节点2当前的流量带宽为C 2,负载均衡集群的总限速带宽为B,那么针对负载均衡节点1来说,负载均衡节点1的限速带宽B 1=C 1+(B-(C1+C2))/2,针对负载均衡节点2来说,负载均衡节点2的限速带宽B 2=C 2+(B-(C1+C2))/2。 For example, suppose that a load balancing cluster has two load balancing nodes, such as load balancing node 1 and load balancing node 2. If the current status information of load balancing node 1 includes load balancing node 1, the current traffic bandwidth is C 1 , The current state information of load balancing node 2 includes the current traffic bandwidth of load balancing node 2 is C 2 , and the total speed limit bandwidth of the load balancing cluster is B, then for load balancing node 1, the speed limit of load balancing node 1 Bandwidth B 1 =C 1 +(B-(C1+C2))/2, for load balancing node 2, the rate limiting bandwidth of load balancing node 2 is B 2 =C 2 +(B-(C1+C2)) /2.
可以看出,在本申请实施例中,限速带宽是基于各个负载均衡节点当前的流量带宽确定的,更符合当前实际的负载情况,提升限速带宽调整的准确性。It can be seen that, in the embodiment of the present application, the rate-limiting bandwidth is determined based on the current traffic bandwidth of each load balancing node, which is more in line with the current actual load situation and improves the accuracy of the rate-limiting bandwidth adjustment.
在本申请的一实现方式中,所述第一负载均衡节点当前处理的数据类型包括设定数据类型;所述第一负载均衡节点基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽,包括:In an implementation manner of the present application, the data type currently processed by the first load balancing node includes a set data type; the first load balancing node is based on the total rate limiting bandwidth of the load balancing cluster and the total traffic The bandwidth, the second state information, and the first calculation formula to determine the first rate-limiting bandwidth include:
第一负载均衡节点基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定第二限速带宽;The first load balancing node determines the second rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
第一负载均衡节点基于所述第二限速带宽确定所述第一限速带宽。The first load balancing node determines the first rate-limiting bandwidth based on the second rate-limiting bandwidth.
其中,设定数据类型例如有视频数据类型、文本数据类型,或是其他数据类型。Among them, the setting data type includes, for example, a video data type, a text data type, or other data types.
一个实现中,所述第一负载均衡节点设定数据类型包括视频数据类型,所述基于所述第二限速带宽确定所述第一限速带宽,包括:In one implementation, the setting data type of the first load balancing node includes a video data type, and the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth includes:
第一负载均衡节点基于所述第二限速带宽和第二计算公式确定所述第一限速带宽,所述第一限速带宽大于所述第二限速带宽。The first load balancing node determines the first rate-limiting bandwidth based on the second rate-limiting bandwidth and a second calculation formula, where the first rate-limiting bandwidth is greater than the second rate-limiting bandwidth.
可选地,所述第二计算公式为:B j=B i+K 1,所述B j和所述B i均为限速带宽,所述B i为已知限速带宽,所述K 1为固定值。 Optionally, the second calculation formula is: B j =B i +K 1 , the B j and the B i are both rate-limiting bandwidths, the B i is the known rate-limiting bandwidth, and the K 1 is a fixed value.
进一步地,所述K 1的值为负载均衡集群的总限速带宽的k 1倍,所述k 1小于或等于1/2N,所述N为负载均衡集群中的负载均衡节点的数量。举例来 说,假设负载均衡集群的总限速带宽为B,假如k 1=1/2N,N=3,那么K 1=B/6。 Further, the value of K 1 is k 1 times the total rate limiting bandwidth of the load balancing cluster, the k 1 is less than or equal to 1/2N, and the N is the number of load balancing nodes in the load balancing cluster. For example, suppose the total rate-limiting bandwidth of the load balancing cluster is B, if k 1 =1/2N and N=3, then K 1 =B/6.
可以看出,在本申请实施例中,在当前处理的数据类型包括视频数据类型时,适当增大负载均衡节点的限速带宽,以提供足够的带宽传输数据,提升数据传输效率。It can be seen that, in the embodiment of the present application, when the currently processed data type includes video data type, the rate limiting bandwidth of the load balancing node is appropriately increased to provide sufficient bandwidth for data transmission and improve data transmission efficiency.
另一个实现中,所述设定数据类型包括文本数据类型,所述基于所述第二限速带宽确定所述第一限速带宽,包括:In another implementation, the setting data type includes a text data type, and the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth includes:
基于所述第二限速带宽和第三计算公式确定所述第一限速带宽,所述第一限速带宽小于所述第二限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a third calculation formula, and the first rate-limiting bandwidth is smaller than the second rate-limiting bandwidth.
可选地,所述第三计算公式为:B j=B i-K 2,所述B j和所述B i均为限速带宽,所述B i为已知限速带宽,所述K 2为固定值。 Optionally, the third calculation formula is: B j =B i -K 2 , the B j and the B i are both the rate-limiting bandwidth, the B i is the known rate-limiting bandwidth, and the K 2 is a fixed value.
进一步地,所述K 2的值为负载均衡集群的总限速带宽的k 2倍,所述k 2小于或等于1/2N,所述N为负载均衡集群中的负载均衡节点的数量。举例来说,假设负载均衡集群的总限速带宽为B,假如k 2=1/2N,N=3,那么K 2=B/6。 Further, the value of K 2 is k 2 times the total rate limiting bandwidth of the load balancing cluster, the k 2 is less than or equal to 1/2N, and the N is the number of load balancing nodes in the load balancing cluster. For example, suppose the total rate-limiting bandwidth of the load balancing cluster is B, if k 2 =1/2N and N=3, then K 2 =B/6.
可以看出,在本申请实施例中,在当前处理的数据类型包括文本数据类型时,适当减小负载均衡节点的限速带宽,避免分配过多的带宽,提升带宽的利用率。It can be seen that in the embodiment of the present application, when the currently processed data type includes text data type, the rate limiting bandwidth of the load balancing node is appropriately reduced to avoid allocating excessive bandwidth and improve bandwidth utilization.
在本申请的一实现方式中,所述第一负载均衡节点基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽之前,所述方法还包括:In an implementation manner of the present application, the first load balancing node determines the first load balancing node's first load balancing node based on the N first state information and the current second state information of the first load balancing node Before limiting the speed bandwidth, the method further includes:
第一负载均衡节点确定所述第一负载均衡节点当前的流量带宽与设定流量带宽的差值的绝对值处于设定范围内。The first load balancing node determines that the absolute value of the difference between the current flow bandwidth of the first load balancing node and the set flow bandwidth is within a set range.
可选地,在步骤301之前,第一负载均衡节点已设置有限速带宽。Optionally, before step 301, the first load balancing node has set a limited speed bandwidth.
可选地,所述设定流量带宽是基于负载均衡集群的总限速带宽和所述N确定的。Optionally, the set traffic bandwidth is determined based on the total rate limiting bandwidth of the load balancing cluster and the N.
一个实现中,所述设定流量带宽是基于负载均衡集群的总限速带宽和所述N确定的,包括:所述设定流量带宽是基于第一公式、所述总限速带宽和所述N确定的,所述第一公式为C k=B/N,C k为设定流量带宽,B为负载均衡集群的总限速带宽。 In one implementation, the set traffic bandwidth is determined based on the total rate limit bandwidth of the load balancing cluster and the N, including: the set traffic bandwidth is based on the first formula, the total rate limit bandwidth, and the N If N is determined, the first formula is C k =B/N, C k is the set traffic bandwidth, and B is the total rate limiting bandwidth of the load balancing cluster.
另一个实现中,所述设定流量带宽是基于负载均衡集群的总限速带宽和所 述N确定的,包括:所述设定流量带宽是基于第一映射关系、所述总限速带宽和所述N确定的,所述第一映射关系如表1所示。In another implementation, the set traffic bandwidth is determined based on the total rate limit bandwidth of the load balancing cluster and the N, including: the set traffic bandwidth is based on the first mapping relationship, the total rate limit bandwidth, and Determined by the N, the first mapping relationship is as shown in Table 1.
表1Table 1
Figure PCTCN2020094391-appb-000001
Figure PCTCN2020094391-appb-000001
可选地,所述设定流量带宽是基于所述N确定的。Optionally, the set flow bandwidth is determined based on the N.
一个实现中,所述设定流量带宽是基于所述N确定的,包括:所述设定流量带宽是基于第二公式和所述N确定的,所述第一公式为By=K/N,By为设定流量带宽,K为固定值。In an implementation, the set flow bandwidth is determined based on the N, including: the set flow bandwidth is determined based on a second formula and the N, and the first formula is By=K/N, By is the set flow bandwidth, and K is a fixed value.
另一个实现中,所述设定流量带宽是基于所述N确定的,包括:所述设定流量带宽是基于第二映射关系和所述N确定的,所述第二映射关系如表2所示。In another implementation, the set flow bandwidth is determined based on the N, including: the set flow bandwidth is determined based on a second mapping relationship and the N, and the second mapping relationship is as shown in Table 2. Show.
表2Table 2
NN 设定流量带宽Set traffic bandwidth
22 400mbps400mbps
33 300mbps300mbps
44 250mbps250mbps
……... ……...
可选地,所述设定流量带宽是负载均衡节点事先定义的,或者,所述设定流量带宽为负载均衡节点当前设置的限速带宽。Optionally, the set flow bandwidth is defined in advance by the load balancing node, or the set flow bandwidth is the rate limit bandwidth currently set by the load balancing node.
可选地,所述设定范围包括一个或多个设定范围。Optionally, the setting range includes one or more setting ranges.
进一步地,所述设定范围包括第一设定范围和第二设定范围,所述第一设 定范围包括的值和所述第二设定范围包括的值均小于所述设定流量带宽。Further, the setting range includes a first setting range and a second setting range, and the values included in the first setting range and the values included in the second setting range are both smaller than the setting flow bandwidth .
或者,所述第一设定范围包括的值均小于所述第二设定范围包括的值,所述第一设定范围包括的值小于所述设定流量带宽,所述第二设定范围包括的最大值等于所述设定流量带宽。举例来说,假如设定流量带宽为500mbps,第一设定范围可以为0~50mbps,第二设定范围可以为300mbps~500mbps。Or, the values included in the first setting range are all smaller than the values included in the second setting range, the values included in the first setting range are smaller than the set flow bandwidth, and the second setting range is The maximum value included is equal to the set flow bandwidth. For example, if the traffic bandwidth is set to 500 mbps, the first setting range may be 0-50 mbps, and the second setting range may be 300 mbps to 500 mbps.
可以看出,在本申请实施例中,负载均衡节点只有在负载均衡节点当前的流量带宽与设定流量带宽相差比较大,或是相差比较小的时候才调整限速带宽,这样可降低负载均衡节点的功耗。It can be seen that, in the embodiment of the application, the load balancing node adjusts the rate limit bandwidth only when the current flow bandwidth of the load balancing node and the set flow bandwidth are relatively large or the difference is relatively small, which can reduce the load balance. The power consumption of the node.
在本申请的一实现方式中,所述第一负载均衡节点基于所述第一限速带宽进行限速带宽调整之后,所述方法还包括:In an implementation manner of the present application, after the first load balancing node performs rate limiting bandwidth adjustment based on the first rate limiting bandwidth, the method further includes:
第一负载均衡节点向物理交换机发送所述第一限速带宽,所述第一限速带宽用于所述物理交换机为所述第一负载均衡节点分发流量。The first load balancing node sends the first rate-limiting bandwidth to a physical switch, where the first rate-limiting bandwidth is used by the physical switch to distribute traffic to the first load balancing node.
可以看出,在本申请实施例中,负载均衡节点在调整完限速带宽之后将调整的限速带宽发送给物理交换机,以使得物理交换机更合理的分发流量。It can be seen that, in the embodiment of the present application, the load balancing node sends the adjusted rate-limiting bandwidth to the physical switch after adjusting the rate-limiting bandwidth, so that the physical switch can distribute traffic more reasonably.
在本申请的一实现方式中,每个状态信息还均包括通报序号和节点序号,所述方法还包括:In an implementation manner of the present application, each status information further includes a notification sequence number and a node sequence number, and the method further includes:
在接收到所述N个第二负载均衡节点中的任一第二负载均衡节点的第一状态信息之后,第一负载均衡节点基于所述任一第二负载均衡节点的第一状态信息包括的通报序号和节点序号,确定所述任一第二负载均衡节点的第一状态信息是否第一次接收到;After receiving the first state information of any second load balancing node among the N second load balancing nodes, the first load balancing node includes the first state information based on the first state information of any second load balancing node The notification sequence number and the node sequence number are used to determine whether the first status information of any of the second load balancing nodes is received for the first time;
若所述任一第二负载均衡节点的第一状态信息第一次接收到,则第一负载均衡节点将所述第二状态信息和所述第一负载均衡节点当前保存的第一状态信息进行封装,得到第一报文;If the first state information of any of the second load balancing nodes is received for the first time, the first load balancing node will perform processing between the second state information and the first state information currently saved by the first load balancing node Encapsulate and get the first message;
第一负载均衡节点发送所述第一报文。The first load balancing node sends the first packet.
可选地,所述方法还包括:Optionally, the method further includes:
若所述任一第二负载均衡节点的第一状态信息第一次接收到,则第一负载均衡节点保存所述任一第二负载均衡节点的第一状态信息。If the first state information of any second load balancing node is received for the first time, the first load balancing node saves the first state information of any second load balancing node.
其中,所述第一报文中包括所述任一第二负载均衡节点的第一状态信息。Wherein, the first message includes first state information of any of the second load balancing nodes.
在本申请的一实现方式中,所述方法还包括:In an implementation manner of the present application, the method further includes:
若所述任一第二负载均衡节点的第一状态信息不是第一次接收到,则第一负载均衡节点基于所述任一第二负载均衡节点的第一状态信息,更新所述第一负载均衡节点当前保存的第一状态信息。If the first state information of any second load balancing node is not received for the first time, the first load balancing node updates the first load based on the first state information of any second load balancing node The first state information currently saved by the balancing node.
可选地,第一负载均衡节点基于所述任一第二负载均衡节点的第一状态信息包括的通报序号和节点序号,确定所述任一第二负载均衡节点的第一状态信息是否第一次接收到,包括:Optionally, the first load balancing node determines whether the first state information of any second load balancing node is the first state information based on the notification sequence number and the node sequence number included in the first state information of any second load balancing node Received, including:
若第一负载均衡节点未保存有所述任一第二负载均衡节点的第一状态信息包括的节点序号,以及所述任一第二负载均衡节点的第一状态信息包括的通报序号为设定序号,则第一负载均衡节点确定所述任一第二负载均衡节点的第一状态信息第一次接收到;If the first load balancing node does not store the node sequence number included in the first state information of any second load balancing node, and the notification sequence number included in the first state information of any second load balancing node is set Sequence number, the first load balancing node determines that the first state information of any of the second load balancing nodes is received for the first time;
若第一负载均衡节点保存有所述任一第二负载均衡节点的第一状态信息包括的节点序号,以及所述任一第二负载均衡节点的第一状态信息包括的通报序号不为设定序号,则第一负载均衡节点确定所述任一第二负载均衡节点的第一状态信息不是第一次接收到。If the first load balancing node saves the node sequence number included in the first state information of any second load balancing node, and the notification sequence number included in the first state information of any second load balancing node is not set Sequence number, the first load balancing node determines that the first state information of any of the second load balancing nodes is not received for the first time.
其中,设定序号例如是0、1等。Among them, the setting number is, for example, 0, 1, and so on.
举例来说,假设负载均衡集群有3个负载均衡节点,如负载均衡节点1、负载均衡节点2和负载均衡节点3,假如第一负载均衡节点为负载均衡节点1,负载均衡节点1接收到负载均衡节点2的状态信息之后,负载均衡节点1先判断接收到的负载均衡节点2的状态信息是否第一次接收到,若是,负载均衡节点1保存负载均衡节点2的状态信息。假如负载均衡节点1当前还保存负载均衡节点3的状态信息,则负载均衡节点1将负载均衡节点1当前的状态信息、负载均衡节点2的状态信息和负载均衡节点3的状态信息进行封装并发送。For example, suppose a load balancing cluster has 3 load balancing nodes, such as load balancing node 1, load balancing node 2, and load balancing node 3. If the first load balancing node is load balancing node 1, load balancing node 1 receives the load After balancing the state information of node 2, load balancing node 1 first determines whether the received state information of load balancing node 2 is received for the first time. If so, load balancing node 1 saves the state information of load balancing node 2. If load balancing node 1 currently saves the state information of load balancing node 3, load balancing node 1 encapsulates and sends the current state information of load balancing node 1, the state information of load balancing node 2, and the state information of load balancing node 3 .
可以看出,在本申请实施例中,在接收到某个节点的状态信息之后,先判断该节点的状态信息是否第一次接收到,若是,将本节点的状态信息和保存的其他节点的状态信息封装后发送,提升节点的状态信息的传递效率。It can be seen that in the embodiment of this application, after receiving the status information of a certain node, it is first determined whether the status information of the node is received for the first time. The status information is encapsulated and sent to improve the transfer efficiency of the node's status information.
可以理解的是,电子设备为了实现上述功能,其包含了执行各个功能相应的硬件和/或软件模块。结合本文中所公开的实施例描述的各示例的算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计 约束条件。本领域技术人员可以结合实施例对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。It can be understood that, in order to implement the above-mentioned functions, an electronic device includes hardware and/or software modules corresponding to each function. In combination with the algorithm steps of the examples described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application in combination with the embodiments to implement the described functions, but such implementation should not be considered as going beyond the scope of the present application.
本实施例可以根据上述方法示例对电子设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment, the electronic device can be divided into functional modules according to the foregoing method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, and is only a logical function division, and there may be other division methods in actual implementation.
在采用对应各个功能划分各个功能模块的情况下,图4示出了限速带宽调整装置的示意图,如图4所示,该限速带宽调整400应用于负载均衡节点,该限速带宽调整400可以包括:信息获取单元401、确定单元402、调整单元403、信息封装单元404和通信单元405。In the case of dividing each functional module corresponding to each function, FIG. 4 shows a schematic diagram of a speed-limiting bandwidth adjustment device. As shown in FIG. 4, the speed-limiting bandwidth adjustment 400 is applied to load balancing nodes, and the speed-limiting bandwidth adjustment 400 is It may include: an information acquisition unit 401, a determination unit 402, an adjustment unit 403, an information packaging unit 404, and a communication unit 405.
其中,信息获取单元401可以用于支持负载均衡节点执行上述步骤301等,和/或用于本文所描述的技术的其他过程。Wherein, the information acquiring unit 401 may be used to support the load balancing node to perform the above step 301, etc., and/or be used in other processes of the technology described herein.
确定单元402可以用于支持负载均衡节点执行上述步骤302等,和/或用于本文所描述的技术的其他过程。The determining unit 402 may be used to support the load balancing node to perform the foregoing step 302, etc., and/or be used in other processes of the technology described herein.
调整单元403可以用于支持负载均衡节点执行上述步骤303等,和/或用于本文所描述的技术的其他过程。The adjustment unit 403 may be used to support the load balancing node to perform the above step 303, etc., and/or be used in other processes of the technology described herein.
信息封装单元404可以用于支持负载均衡节点执行步骤“将第二状态信息和第一负载均衡节点当前保存的第一状态信息进行封装,得到第一报文”等,和/或用于本文所描述的技术的其他过程。The information encapsulation unit 404 can be used to support the load balancing node to perform the step of "encapsulating the second state information and the first state information currently saved by the first load balancing node to obtain the first message", etc., and/or used in this article Describe the other processes of the technology.
通信单元405可以用于支持负载均衡节点执行步骤“发送第一报文”等,和/或用于本文所描述的技术的其他过程。The communication unit 405 may be used to support the load balancing node to perform the step "send the first message", etc., and/or be used in other processes of the technology described herein.
需要说明的是,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。It should be noted that all relevant content of the steps involved in the foregoing method embodiments can be cited in the functional description of the corresponding functional module, and will not be repeated here.
本实施例提供的负载均衡节点,用于执行上述限速带宽调整方法,因此可以达到与上述实现方法相同的效果。The load balancing node provided in this embodiment is used to execute the above-mentioned speed-limiting bandwidth adjustment method, so the same effect as the above-mentioned implementation method can be achieved.
在采用集成的单元的情况下,负载均衡节点可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对负载均衡节点的动作进行控制管理,例如,可以用于支持负载均衡节点执行上述信息获取单元401、确定单元402、 调整单元403和信息封装单元404执行的步骤。存储模块可以用于支持负载均衡节点执行存储程序代码和数据等。通信模块,可以用于支持执行上述通信单元405执行的步骤,以及用于支持负载均衡节点与其他设备的通信。In the case of an integrated unit, the load balancing node may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the load balancing node. For example, it can be used to support the load balancing node to perform the steps performed by the information acquisition unit 401, the determination unit 402, the adjustment unit 403, and the information encapsulation unit 404. The storage module can be used to support load balancing nodes to execute stored program codes and data. The communication module may be used to support the execution of the steps performed by the above-mentioned communication unit 405 and to support the communication between the load balancing node and other devices.
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。Among them, the processing module can be a processor or a controller. It can implement or execute various exemplary logical blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, and other devices that interact with other electronic devices.
在一个实施例中,当处理模块为处理器,存储模块为存储器时,本实施例所涉及的负载均衡节点可以为具有图2所示结构的设备。In an embodiment, when the processing module is a processor and the storage module is a memory, the load balancing node involved in this embodiment may be a device having the structure shown in FIG. 2.
本实施例还提供一种计算机存储介质,该计算机存储介质中存储有计算机指令,当该计算机指令在电子设备上运行时,使得电子设备执行上述相关方法步骤实现上述实施例中的限速带宽调整方法。This embodiment also provides a computer storage medium in which computer instructions are stored. When the computer instructions run on an electronic device, the electronic device is caused to execute the above-mentioned related method steps to realize the speed-limiting bandwidth adjustment in the above-mentioned embodiment. method.
本实施例还提供了一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的限速带宽调整方法。This embodiment also provides a computer program product, which when the computer program product runs on a computer, causes the computer to execute the above-mentioned related steps, so as to realize the speed-limiting bandwidth adjustment method in the above-mentioned embodiment.
另外,本申请的实施例还提供一种装置,这个装置具体可以是芯片,组件或模块,该装置可包括相连的处理器和存储器;其中,存储器用于存储计算机执行指令,当装置运行时,处理器可执行存储器存储的计算机执行指令,以使芯片执行上述各方法实施例中的限速带宽调整方法。In addition, the embodiments of the present application also provide a device. The device may specifically be a chip, component, or module. The device may include a processor and a memory connected to each other. The memory is used to store computer execution instructions. When the device is running, The processor can execute the computer-executable instructions stored in the memory, so that the chip executes the speed limit bandwidth adjustment method in the foregoing method embodiments.
其中,本实施例提供的负载均衡节点、计算机存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the load balancing nodes, computer storage media, computer program products, or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding methods provided above. The beneficial effects of the method are not repeated here.
通过以上实施方式的描述,所属领域的技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above embodiments, those skilled in the art can understand that for the convenience and brevity of the description, only the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functions as required. The function module is completed, that is, the internal structure of the device is divided into different function modules to complete all or part of the functions described above.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,可 以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components can be combined or It can be integrated into another device, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是一个物理单元或多个物理单元,即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate parts may or may not be physically separate, and the parts displayed as a unit may be one physical unit or multiple physical units, that is, they may be located in one place or distributed to multiple different places. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of the present application are essentially or the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product, and the software product is stored in a storage medium. It includes several instructions to make a device (which may be a single-chip microcomputer, a chip, etc.) or a processor (processor) execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read only memory (read only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes.
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above content is only the specific implementation of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in this application. Covered in the scope of protection of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.

Claims (20)

  1. 一种限速带宽调整方法,其特征在于,应用于负载均衡集群中的第一负载均衡节点,所述负载均衡集群还包括N个第二负载均衡节点,所述N为正整数;所述方法包括:A method for adjusting a rate-limiting bandwidth, characterized in that it is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is a positive integer; the method include:
    接收每个所述第二负载均衡节点当前的状态信息,得到N个第一状态信息;Receiving current state information of each of the second load balancing nodes to obtain N pieces of first state information;
    基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽;Determine the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node;
    基于所述第一限速带宽进行限速带宽调整。Perform a rate-limit bandwidth adjustment based on the first rate-limit bandwidth.
  2. 根据权利要求1所述的方法,其特征在于,每个状态信息均包括其对应的负载均衡节点当前的流量带宽;所述基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽,包括:The method according to claim 1, wherein each state information includes the current traffic bandwidth of its corresponding load balancing node; the current traffic bandwidth is based on the N first state information and the first load balancing node The second state information of determining the first rate limiting bandwidth of the first load balancing node includes:
    基于所述N个第一状态信息和所述第二状态信息,确定所述负载均衡集群当前的总流量带宽;Determine the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
    基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带宽。Determine the first rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second state information.
  3. 根据权利要求2所述的方法,其特征在于,所述基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带宽,包括:The method according to claim 2, wherein the determining the first rate limiting bandwidth based on the total rate limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second status information comprises :
    基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽;Determining the first rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and a first calculation formula;
    其中,所述第一计算公式为:B i=C i+(B-C)/N,所述B i为限速带宽,所述C i为负载均衡节点当前的流量带宽,所述B为总限速带宽,所述C为总流量带宽,所述N为负载均衡集群中的负载均衡节点的数量。 Wherein, the first calculation formula is: B i =C i +(BC)/N, the B i is the rate limit bandwidth, the C i is the current traffic bandwidth of the load balancing node, and the B is the total limit The speed bandwidth, the C is the total traffic bandwidth, and the N is the number of load balancing nodes in the load balancing cluster.
  4. 根据权利要求3所述的方法,其特征在于,所述第一负载均衡节点当前处理的数据类型包括设定数据类型;所述基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽,包括:The method according to claim 3, wherein the type of data currently processed by the first load balancing node includes a set data type; the total speed limit bandwidth and the total traffic bandwidth based on the load balancing cluster , The second state information and the first calculation formula determine the first rate-limiting bandwidth, including:
    基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定第二限速带宽;Determine the second rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
    基于所述第二限速带宽确定所述第一限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth.
  5. 根据权利要求4所述的方法,其特征在于,所述设定数据类型包括视频数据类型,所述基于所述第二限速带宽确定所述第一限速带宽,包括:The method according to claim 4, wherein the setting data type includes a video data type, and the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth comprises:
    基于所述第二限速带宽和第二计算公式确定所述第一限速带宽,所述第一限速带宽大于所述第二限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a second calculation formula, and the first rate-limiting bandwidth is greater than the second rate-limiting bandwidth.
  6. 根据权利要求4所述的方法,其特征在于,所述设定数据类型包括文本数据类型,所述基于所述第二限速带宽确定所述第一限速带宽,包括:The method according to claim 4, wherein the setting data type includes a text data type, and the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth comprises:
    基于所述第二限速带宽和第三计算公式确定所述第一限速带宽,所述第一限速带宽小于所述第二限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a third calculation formula, and the first rate-limiting bandwidth is smaller than the second rate-limiting bandwidth.
  7. 根据权利要求2-6任一项所述的方法,其特征在于,所述基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽之前,所述方法还包括:The method according to any one of claims 2-6, wherein the first load is determined based on the N pieces of first state information and the current second state information of the first load balancing node Before balancing the first rate limiting bandwidth of the node, the method further includes:
    确定所述第一负载均衡节点当前的流量带宽与设定流量带宽的差值的绝对值处于设定范围内。It is determined that the absolute value of the difference between the current flow bandwidth of the first load balancing node and the set flow bandwidth is within a set range.
  8. 根据权利要求7所述的方法,其特征在于,所述设定流量带宽是基于所述负载均衡集群的总限速带宽和所述N确定的。The method according to claim 7, wherein the set traffic bandwidth is determined based on the total rate limiting bandwidth of the load balancing cluster and the N.
  9. 根据权利要求2-8任一项所述的方法,其特征在于,每个状态信息还均包括通报序号和节点序号,所述方法还包括:The method according to any one of claims 2-8, wherein each status information further includes a notification sequence number and a node sequence number, and the method further comprises:
    在接收到所述N个第二负载均衡节点中的任一第二负载均衡节点的第一状态信息之后,基于所述任一第二负载均衡节点的第一状态信息包括的通报序号和节点序号,确定所述任一第二负载均衡节点的第一状态信息是否第一次接收到;After receiving the first state information of any second load balancing node among the N second load balancing nodes, based on the notification sequence number and the node sequence number included in the first state information of any second load balancing node , Determining whether the first state information of any of the second load balancing nodes is received for the first time;
    若所述任一第二负载均衡节点的第一状态信息第一次接收到,则将所述第二状态信息和所述第一负载均衡节点当前保存的第一状态信息进行封装,得到第一报文;If the first state information of any of the second load balancing nodes is received for the first time, the second state information and the first state information currently saved by the first load balancing node are encapsulated to obtain the first state information. Message
    发送所述第一报文。Send the first message.
  10. 一种限速带宽调整装置,其特征在于,应用于负载均衡集群中的第一负载均衡节点,所述负载均衡集群还包括N个第二负载均衡节点,所述N为正整数;所述装置包括:A speed limit bandwidth adjustment device, characterized in that it is applied to a first load balancing node in a load balancing cluster, the load balancing cluster further includes N second load balancing nodes, where N is a positive integer; the device include:
    信息获取单元,用于接收每个所述第二负载均衡节点当前的状态信息,得到N个第一状态信息;An information acquisition unit, configured to receive current state information of each of the second load balancing nodes, and obtain N pieces of first state information;
    确定单元,用于基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽;A determining unit, configured to determine the first rate limiting bandwidth of the first load balancing node based on the N pieces of first state information and the current second state information of the first load balancing node;
    调整单元,用于基于所述第一限速带宽进行限速带宽调整。The adjustment unit is configured to adjust the rate-limiting bandwidth based on the first rate-limiting bandwidth.
  11. 根据权利要求10所述的装置,其特征在于,每个状态信息均包括其对应的负载均衡节点当前的流量带宽;在基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状态信息,确定所述第一负载均衡节点的第一限速带宽方面,所述确定单元具体用于:The apparatus according to claim 10, wherein each state information includes the current traffic bandwidth of its corresponding load balancing node; based on the N first state information and the current traffic bandwidth of the first load balancing node The second state information determines the first rate limiting bandwidth aspect of the first load balancing node, and the determining unit is specifically configured to:
    基于所述N个第一状态信息和所述第二状态信息,确定所述负载均衡集群当前的总流量带宽;Determine the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
    基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带宽。Determine the first rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second state information.
  12. 根据权利要求11所述的装置,其特征在于,在基于所述负载均衡集群的总限速带宽、所述总流量带宽和所述第二状态信息,确定所述第一限速带 宽方面,所述确定单元具体用于:The apparatus according to claim 11, wherein, in terms of determining the first rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, and the second state information, the The determining unit is specifically used for:
    基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽;Determining the first rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and a first calculation formula;
    其中,所述第一计算公式为:B i=C i+(B-C)/N,所述B i为限速带宽,所述C i为负载均衡节点当前的流量带宽,所述B为总限速带宽,所述C为总流量带宽,所述N为负载均衡集群中的负载均衡节点的数量。 Wherein, the first calculation formula is: B i =C i +(BC)/N, the B i is the rate limit bandwidth, the C i is the current traffic bandwidth of the load balancing node, and the B is the total limit The speed bandwidth, the C is the total traffic bandwidth, and the N is the number of load balancing nodes in the load balancing cluster.
  13. 根据权利要求12所述的装置,其特征在于,所述第一负载均衡节点当前处理的数据类型包括设定数据类型;在基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定所述第一限速带宽方面,所述确定单元具体用于:The device according to claim 12, wherein the type of data currently processed by the first load balancing node includes a set data type; The second state information and the first calculation formula determine the first rate limiting bandwidth, and the determining unit is specifically configured to:
    基于所述负载均衡集群的总限速带宽、所述总流量带宽、所述第二状态信息和第一计算公式,确定第二限速带宽;Determine the second rate-limiting bandwidth based on the total rate-limiting bandwidth of the load balancing cluster, the total traffic bandwidth, the second state information, and the first calculation formula;
    基于所述第二限速带宽确定所述第一限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth.
  14. 根据权利要求13所述的装置,其特征在于,所述设定数据类型包括视频数据类型,在基于所述第二限速带宽确定所述第一限速带宽方面,所述确定单元具体用于:The device according to claim 13, wherein the set data type includes a video data type, and in terms of determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth, the determining unit is specifically configured to :
    基于所述第二限速带宽和第二计算公式确定所述第一限速带宽,所述第一限速带宽大于所述第二限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a second calculation formula, and the first rate-limiting bandwidth is greater than the second rate-limiting bandwidth.
  15. 根据权利要求13所述的装置,其特征在于,所述设定数据类型包括文本数据类型,在基于所述第二限速带宽确定所述第一限速带宽方面,所述确定单元具体用于:The device according to claim 13, wherein the setting data type includes a text data type, and in terms of determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth, the determining unit is specifically configured to :
    基于所述第二限速带宽和第三计算公式确定所述第一限速带宽,所述第一限速带宽小于所述第二限速带宽。The first rate-limiting bandwidth is determined based on the second rate-limiting bandwidth and a third calculation formula, and the first rate-limiting bandwidth is smaller than the second rate-limiting bandwidth.
  16. 根据权利要求11-15任一项所述的装置,其特征在于,所述确定单元,还用于在基于所述N个第一状态信息和所述第一负载均衡节点当前的第二状 态信息,确定所述第一负载均衡节点的第一限速带宽之前,确定所述第一负载均衡节点当前的流量带宽与设定流量带宽的差值的绝对值处于设定范围内。The device according to any one of claims 11-15, wherein the determining unit is further configured to: based on the N pieces of first state information and the current second state information of the first load balancing node Before determining the first rate limiting bandwidth of the first load balancing node, it is determined that the absolute value of the difference between the current flow bandwidth of the first load balancing node and the set flow bandwidth is within a set range.
  17. 根据权利要求16所述的装置,其特征在于,所述设定流量带宽是基于所述负载均衡集群的总限速带宽和所述N确定的。The apparatus according to claim 16, wherein the set traffic bandwidth is determined based on the total rate limiting bandwidth of the load balancing cluster and the N.
  18. 根据权利要求11-17任一项所述的装置,其特征在于,每个状态信息还均包括通报序号和节点序号;The device according to any one of claims 11-17, wherein each status information further includes a notification sequence number and a node sequence number;
    所述确定单元,还用于在接收到所述N个第二负载均衡节点中的任一第二负载均衡节点的第一状态信息之后,基于所述任一第二负载均衡节点的第一状态信息包括的通报序号和节点序号,确定所述任一第二负载均衡节点的第一状态信息是否第一次接收到;The determining unit is further configured to, after receiving the first state information of any second load balancing node in the N second load balancing nodes, based on the first state of any second load balancing node The notification sequence number and the node sequence number included in the information determine whether the first status information of any of the second load balancing nodes is received for the first time;
    所述装置还包括:信息封装单元和通信单元:The device also includes: an information packaging unit and a communication unit:
    所述信息封装单元,用于若所述任一第二负载均衡节点的第一状态信息第一次接收到,则将所述第二状态信息和所述第一负载均衡节点当前保存的第一状态信息进行封装,得到第一报文;The information encapsulation unit is configured to, if the first state information of any of the second load balancing nodes is received for the first time, combine the second state information with the first state information currently saved by the first load balancing node The status information is encapsulated to obtain the first message;
    所述通信单元,用于发送所述第一报文。The communication unit is configured to send the first message.
  19. 一种负载均衡节点,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法中的步骤的指令。A load balancing node, characterized by comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs are stored in the memory and configured to be executed by the processor The program includes instructions for executing the steps in the method according to any one of claims 1-9.
  20. 一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute the method according to any one of claims 1-9.
PCT/CN2020/094391 2020-06-04 2020-06-04 Rate limit bandwidth adjustment method and apparatus WO2021243649A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080097946.8A CN115211089B (en) 2020-06-04 2020-06-04 Speed-limiting bandwidth adjusting method and device
PCT/CN2020/094391 WO2021243649A1 (en) 2020-06-04 2020-06-04 Rate limit bandwidth adjustment method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/094391 WO2021243649A1 (en) 2020-06-04 2020-06-04 Rate limit bandwidth adjustment method and apparatus

Publications (1)

Publication Number Publication Date
WO2021243649A1 true WO2021243649A1 (en) 2021-12-09

Family

ID=78831555

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/094391 WO2021243649A1 (en) 2020-06-04 2020-06-04 Rate limit bandwidth adjustment method and apparatus

Country Status (2)

Country Link
CN (1) CN115211089B (en)
WO (1) WO2021243649A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442490A (en) * 2008-12-30 2009-05-27 北京畅讯信通科技有限公司 Method for processing flux load equilibrium
WO2017162117A1 (en) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 Accurate speed limiting method and apparatus for cluster
CN107347198A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method for limiting speed, Control for Speed Limitation node and speed limiting device
CN107623638A (en) * 2016-07-15 2018-01-23 中国电信股份有限公司 The fault handling method and device of load-balancing paths
CN110417921A (en) * 2019-09-06 2019-11-05 广州华多网络科技有限公司 A kind of method and load balancing service device of load balancing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453111B (en) * 2015-08-11 2020-12-22 中兴通讯股份有限公司 Traffic management method and device based on aggregated link
CN110086888B (en) * 2019-05-15 2022-05-17 上海淇毓信息科技有限公司 Multi-cluster dynamic load method and device based on RabbitMQ and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442490A (en) * 2008-12-30 2009-05-27 北京畅讯信通科技有限公司 Method for processing flux load equilibrium
WO2017162117A1 (en) * 2016-03-25 2017-09-28 阿里巴巴集团控股有限公司 Accurate speed limiting method and apparatus for cluster
CN107347198A (en) * 2016-05-05 2017-11-14 北京金山云网络技术有限公司 A kind of method for limiting speed, Control for Speed Limitation node and speed limiting device
CN107623638A (en) * 2016-07-15 2018-01-23 中国电信股份有限公司 The fault handling method and device of load-balancing paths
CN110417921A (en) * 2019-09-06 2019-11-05 广州华多网络科技有限公司 A kind of method and load balancing service device of load balancing

Also Published As

Publication number Publication date
CN115211089B (en) 2023-09-19
CN115211089A (en) 2022-10-18

Similar Documents

Publication Publication Date Title
US10489223B2 (en) Methods and apparatus for scheduling time sensitive operations among independent processors
US20180357199A1 (en) Slave-to-slave communication in i3c bus topology
US10331612B1 (en) Methods and apparatus for reduced-latency data transmission with an inter-processor communication link between independently operable processors
US20190034363A1 (en) Accelerator interconnect assignments for virtual environments
US10515044B2 (en) Communicating heterogeneous virtual general-purpose input/output messages over an I3C bus
WO2019129167A1 (en) Method for processing data packet and network card
WO2018121295A1 (en) Heterogeneous multi-protocol stack method, device and system
CN108768667B (en) Method for inter-chip network communication of multi-core processor
US11112847B2 (en) Dual processor power saving architecture communications system
WO2023030178A1 (en) Communication method based on user-mode protocol stack, and corresponding apparatus
CN113632065A (en) Multi-core electronic device and packet processing method thereof
US9722949B2 (en) Reducing power utilization by transferring communication sessions from a main processor
CN107534616B (en) Quality of service for universal serial bus
WO2021243649A1 (en) Rate limit bandwidth adjustment method and apparatus
US20240031297A1 (en) Electronic device, and method for processing received data packet by electronic device
US20230403608A1 (en) Data router connectivity to wireless communication slices
JP2024526313A (en) Signal processing method, signal processing device, electronic device, and storage medium
US8279790B2 (en) Packet buffering based at least in part upon packet receipt time interval weighted moving average
WO2023103591A1 (en) Method for ensuring operation reliability of radio unit and communication apparatus
CN107801231A (en) A kind of public resource frequency reducing method and device
TW201334469A (en) Shaping data packet traffic
CN116783585A (en) Interconnection system, data transmission method and chip
WO2024182923A1 (en) Communication method, and electronic device and storage medium
WO2024109004A1 (en) Data processing method and system-on-chip
US20240004826A1 (en) Communication apparatus and data transmission method

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: 20938684

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 28/04/2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20938684

Country of ref document: EP

Kind code of ref document: A1