CN115211089B - Speed-limiting bandwidth adjusting method and device - Google Patents

Speed-limiting bandwidth adjusting method and device Download PDF

Info

Publication number
CN115211089B
CN115211089B CN202080097946.8A CN202080097946A CN115211089B CN 115211089 B CN115211089 B CN 115211089B CN 202080097946 A CN202080097946 A CN 202080097946A CN 115211089 B CN115211089 B CN 115211089B
Authority
CN
China
Prior art keywords
load balancing
bandwidth
speed
state information
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202080097946.8A
Other languages
Chinese (zh)
Other versions
CN115211089A (en
Inventor
郭子亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN115211089A publication Critical patent/CN115211089A/en
Application granted granted Critical
Publication of CN115211089B publication Critical patent/CN115211089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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

Abstract

The application discloses a speed-limiting bandwidth adjusting method and device, which are applied to first load balancing nodes in a load balancing cluster, wherein the load balancing cluster further comprises N second load balancing nodes, and N is a positive integer; the method comprises the following steps: receiving current state information of each second load balancing node to obtain N pieces of first state information; determining a first speed limit 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; and carrying out speed limiting bandwidth adjustment based on the first speed limiting bandwidth. The embodiment of the application can dynamically adjust the speed-limiting bandwidth of the load balancing node.

Description

Speed-limiting bandwidth adjusting method and device
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a speed-limiting bandwidth adjustment method and device.
Background
Load balancing refers to balancing loads (work tasks) and distributing them to multiple Load balancing nodes for operation. In order to avoid network service anomalies caused by excessive traffic, network speed limiting functionality is often required. Currently, the network speed limiting function is to averagely allocate a total speed limiting bandwidth, for example, assuming that the total speed limiting bandwidth is B, and N load balancing nodes, the speed limiting bandwidth of each load balancing node is B/N.
Disclosure of Invention
The embodiment of the application provides a speed-limiting bandwidth adjusting method and device.
In a first aspect, an embodiment of the present application provides a speed-limiting bandwidth adjustment method, which is applied to a first load balancing node in a load balancing cluster, where the load balancing cluster further includes N second load balancing nodes, and N is a positive integer; the method comprises the following steps:
receiving current state information of each second load balancing node to obtain N pieces of first state information;
determining a first speed limit 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;
and carrying out speed limiting bandwidth adjustment based on the first speed limiting bandwidth.
In a second aspect, an embodiment of the present application provides a speed-limiting bandwidth adjustment device, which is applied to a first load balancing node in a load balancing cluster, where the load balancing cluster further includes N second load balancing nodes, and N is a positive integer; the device comprises:
the information acquisition unit is used for receiving the current state information of each second load balancing node to obtain N pieces of first state information;
the determining unit is used for determining a first speed limit 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;
And the adjusting unit is used for adjusting the speed-limiting bandwidth based on the first speed-limiting bandwidth.
In a third aspect, an embodiment of the present application provides a load balancing node, comprising a processor, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in any of the methods of the first aspect of the embodiments of the present application.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program causes a computer to perform part or all of the steps as described in any of the methods of the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in any of the methods of the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
It can be seen that in the embodiment of the application, the first load balancing node receives the current state information of each second load balancing node to obtain N pieces of first state information, then determines the first speed-limiting bandwidth of the first load balancing node based on the current second state information of the first load balancing node and the N pieces of first state information, and finally performs speed-limiting bandwidth adjustment based on the first speed-limiting bandwidth, thereby realizing dynamic adjustment of the speed-limiting bandwidth of the load balancing node.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
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 according to an embodiment of the present application;
Fig. 3 is a schematic flow chart of a speed-limiting bandwidth adjustment method according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a speed-limiting bandwidth adjusting device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
In the first part, a communication framework to which the technical scheme disclosed in the application is applicable is described as follows.
By way of example, fig. 1 shows a schematic diagram of a communication architecture. The communication framework includes a load balancing cluster, a physical switch, a router, and a plurality of electronic devices. The load balancing cluster comprises a plurality of load balancing nodes, a physical switch can be communicated with each load balancing node in the load balancing cluster, the physical switch can be communicated with a router, and the router can be communicated with each electronic device.
The electronic device may be a portable electronic device that also includes other functions such as personal digital assistant and/or music player functions, such as a cell phone, tablet computer, wearable electronic device with wireless communication functions (e.g., a smart watch), etc. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices that are equipped with IOS systems, android systems, microsoft systems, or other operating systems. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be appreciated that in other embodiments, the electronic device described above may not be a portable electronic device, but rather a desktop computer.
The load balancing node may be a service device that provides a computing service, and since the service device needs to respond to a service request and perform processing, the service device should generally have the capability of bearing the service and guaranteeing the service. The service device may be a background server or other devices.
In the second part, the load balancing node disclosed by the application is introduced as follows.
By way of example, fig. 2 shows a schematic diagram of the structure 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 the like.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the load balancing nodes. In other embodiments of the application, the load balancing node may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate 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. The processor 210 may generate an operation control signal according to the instruction operation code and the timing signal, so as to complete the instruction fetching and instruction execution control. In other embodiments, memory may also be provided in processor 210 for storing instructions and data. Illustratively, the memory in the processor 210 may be a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. This avoids duplicate accesses and reduces the latency of the processor 210, thereby improving the efficiency of the load balancing node in processing data or executing instructions.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include inter-integrated circuit (inter-integrated circuit, I2C) interfaces, inter-integrated circuit audio (inter-integrated circuit sound, I2S) interfaces, pulse code modulation (pulse code modulation, PCM) interfaces, universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interfaces, mobile industry processor interfaces (mobile industry processor interface, MIPI), general-purpose input/output (GPIO) interfaces, USB interfaces, and the like.
The communication module 240 may provide solutions for wireless communications including wireless local area networks (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) networks), global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), etc., as applied at load balancing nodes. 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 enable expansion of the memory capabilities of the load balancing node. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions.
The internal memory 230 may be used to store one or more computer programs, including instructions. Processor 210 may cause the load balancing node to perform the rate-limiting bandwidth adjustment methods and the like provided in some embodiments of the present application by executing the above-described instructions stored in internal memory 230. The internal memory 230 may include a storage program area and a storage data area. The storage program area may store an operating system. The storage data area may store data created during use of the load balancing node, etc. In addition, the internal memory 230 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage units, flash memory units, universal flash memory (universal flash storage, UFS), and the like. In some embodiments, processor 210 may cause the load balancing node to perform the rate-limiting bandwidth adjustment methods provided in embodiments of the present application by executing instructions stored in internal memory 230, and/or instructions stored in a memory provided in processor 210.
In the third section, the protection scope of the claims disclosed in the embodiments of the present application is described as follows.
Referring to fig. 3, fig. 3 is a flow chart of a speed-limiting bandwidth adjustment method applied to a first load balancing node in a load balancing cluster, where the load balancing cluster further includes N second load balancing nodes, and N is a positive integer, as shown in the figure, the speed-limiting bandwidth adjustment method includes the following operations.
Step 301: the first load balancing nodes receive the current state information of each second load balancing node to obtain N pieces of first state information, and the N pieces of first state information are in one-to-one correspondence with the N pieces of second load balancing nodes.
Step 302: the first load balancing node determines a first speed limiting bandwidth of the first load balancing node based on the N pieces of first state information and current second state information of the first load balancing node.
Step 303: and the first load balancing node adjusts the speed-limiting bandwidth based on the first speed-limiting bandwidth.
The first load balancing nodes are any one node in the load balancing cluster, and the N second load balancing nodes are part or all of the load balancing nodes except the first load balancing nodes in the load balancing cluster.
Optionally, each load balancing node is periodically adjusting the speed limit bandwidth, and the duration of one period may be 5ms, 8ms, 10ms, or other value.
Optionally, each load balancing node transmits the status information during a speed-limiting bandwidth adjustment period. For example, the state information may be transmitted at the start time of the speed limit bandwidth adjustment period, or the state information may be transmitted at other times in the speed limit bandwidth adjustment period.
The communication protocol in which the load balancing node sends the status message may be multicast, so that all load balancing nodes in the load balancing cluster may receive the status message. The communication protocol of the load balancing node sending status information may also be a transmission control protocol (Transmission Control Protocol, TCP), a user datagram protocol (User Datagram Protocol, UDP), etc.
Optionally, the status information includes at least one of: the current time stamp of the load balancing node, the current flow 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 state information. For example, if the load balancing node sends status information at time 1, the current timestamp of the load balancing node is time 1.
The node serial numbers are used for identifying the load balancing nodes, and the node serial numbers of different load balancing nodes are different. For example, 3 load balancing nodes, the node sequence numbers of the 3 load balancing nodes may be 1, 2, and 3.
The notification sequence number is used for identifying the time of sending the state information by the load balancing node in the speed-limiting bandwidth adjustment period. E.g., notification sequence number 1, the load balancing node is identified as transmitting status information for the first time within the speed-limiting bandwidth adjustment period.
The current traffic bandwidth of the load balancing node refers to the total data quantity passing through the load balancing node in unit time.
Optionally, after receiving 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 stored by the first load balancing node.
For example, the load balancing cluster includes 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, after receiving state information 1 of load balancing node 2, load balancing node 1 updates state information of load balancing node 2 stored in load balancing node 1 to state information 1, and after receiving state information 2 of load balancing node 3, load balancing node 1 updates state information of load balancing node 3 stored in load balancing node 1 to state information 2.
Optionally, the first load balancing node performs speed-limiting bandwidth adjustment based on the first speed-limiting bandwidth, including: the first load balancing node replaces the speed limiting bandwidth with the first speed limiting bandwidth.
For example, assume that a load balancing cluster has 2 load balancing nodes, such as load balancing node 1 and load balancing node 2. For the load balancing node 1, the load balancing node 1 receives the current state information 2 of the load balancing node 2, then the load balancing node 1 determines the speed limit bandwidth 1 of the load balancing node 1 based on the current state information 1 of the load balancing node 1 and the state information 2, and finally the load balancing node 1 performs speed limit bandwidth adjustment based on the speed limit bandwidth 1. For the load balancing node 2, the load balancing node 2 receives the current state information 1 of the load balancing node 1, then the load balancing node 2 determines the speed limit bandwidth 2 of the load balancing node 2 based on the current state information 2 of the load balancing node 2 and the state information 1, and finally the load balancing node 2 performs speed limit bandwidth adjustment based on the speed limit bandwidth 2.
It can be seen that in the embodiment of the application, the speed-limiting bandwidth of the load balancing nodes is dynamically adjusted, and in addition, the speed-limiting bandwidth is determined based on the current state information of each load balancing node, so that the current actual load condition is more met, and the accuracy of speed-limiting bandwidth adjustment is improved.
In an implementation manner of the present application, each state information includes a current traffic bandwidth of its corresponding load balancing node; the first load balancing node determines a first speed limit bandwidth of the first load balancing node based on the N first state information and current second state information of the first load balancing node, and the first speed limit bandwidth comprises:
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 speed limiting bandwidth based on the total speed limiting bandwidth of the load balancing cluster, the total traffic bandwidth and the second state information.
Wherein, the total speed-limiting bandwidth of the load balancing cluster refers to the total data amount allowed to pass through the load balancing cluster in unit time.
The current total traffic bandwidth of the load balancing cluster refers to the total traffic volume of the current load balancing cluster in unit time.
Further, the first load balancing node determines the first speed limiting bandwidth based on the total speed limiting bandwidth, the total traffic bandwidth and the second status information of the load balancing cluster, including:
The first load balancing node determines the first speed limiting bandwidth based on the total speed limiting bandwidth, the total flow bandwidth, the second state information and a first calculation formula of the load balancing cluster;
wherein, the first calculation formula is: b (B) i =C i ++ (B-C)/N, said B i To limit the bandwidth, the C i And (3) the current traffic bandwidth of the load balancing nodes, wherein B is the total speed limit bandwidth, C is the total traffic bandwidth, and N is the number of the load balancing nodes in the load balancing cluster.
Specifically, assuming that the load balancing cluster includes N load balancing nodes, the numbers of the N load balancing nodes are 1 to N, and the current traffic bandwidths of the N load balancing nodes are respectively represented as C 1 、C 2 ...C n The total speed-limiting bandwidth of the load balancing cluster is represented as B, and the speed-limiting bandwidths of N load balancing nodes are respectively represented as B 1 、B 2 ...B n B in the first calculation formula i The speed limiting bandwidth expressed as the ith load balancing node in N load balancing nodes, C in the first calculation formula i Represented as the current traffic bandwidth of the ith load balancing node of the N load balancing nodes, i is 1 to N.
For example, assume that the load balancing cluster has 2 load balancing nodes, such as load balancing node 1 and load balancing node 2, and that the current state information 1 of load balancing node 1 includes load balancing node 1 with current traffic bandwidth of C 1 The current state information 2 of the load balancing node 2 includes that the current traffic bandwidth of the load balancing node 2 is C 2 If the total speed-limiting bandwidth of the load balancing cluster is B, for the load balancing node 1, the speed-limiting bandwidth B of the load balancing node 1 1 =C 1 ++ (B- (C1+C2))/2, for load balancing node 2, the rate-limiting bandwidth B of load balancing node 2 2 =C 2 +(B-(C1+C2))/2。
It can be seen that in the embodiment of the application, the speed-limiting bandwidth is determined based on the current flow bandwidth of each load balancing node, so that the current actual load condition is more met, and the accuracy of speed-limiting bandwidth adjustment is improved.
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 determines the first speed limiting bandwidth based on the total speed limiting bandwidth, the total traffic bandwidth, the second state information and a first calculation formula of the load balancing cluster, and the first speed limiting bandwidth comprises:
the first load balancing node determines a second speed limiting bandwidth based on the total speed limiting bandwidth, the total flow bandwidth, the second state information and a first calculation formula of the load balancing cluster;
the first load balancing node determines the first speed limiting bandwidth based on the second speed limiting bandwidth.
The setting data type is, for example, a video data type, a text data type, or other data types.
In one implementation, the first load balancing node setting data type includes a video data type, and the determining the first speed limit bandwidth based on the second speed limit bandwidth includes:
the first load balancing node determines the first speed limiting bandwidth based on the second speed limiting bandwidth and a second calculation formula, wherein the first speed limiting bandwidth is larger than the second speed limiting bandwidth.
Optionally, the second calculation formula is: b (B) j =B i +K 1 The B is j And said B i All are of limited speed bandwidth, B is i To know the speed limit bandwidth, the K 1 Is a fixed value.
Further, the K 1 The value of (2) is k of the total speed-limiting bandwidth of the load balancing cluster 1 Multiple of said k 1 Less than or equal to 1/2N, wherein N is the number of load balancing nodes in the load balancing cluster. For example, assume that the total rate-limiting bandwidth of the load-balancing cluster is B, if k 1 =1/2 n, 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 a video data type, the speed limiting bandwidth of the load balancing node is appropriately increased, so as to provide enough bandwidth to transmit data, and improve the data transmission efficiency.
In another implementation, the setting the data type includes text data type, and the determining the first speed-limiting bandwidth based on the second speed-limiting bandwidth includes:
and determining the first speed limit bandwidth based on the second speed limit bandwidth and a third calculation formula, wherein the first speed limit bandwidth is smaller than the second speed limit bandwidth.
Optionally, the third calculation formula is: b (B) j =B i -K 2 The B is j And said B i All are of limited speed bandwidth, B is i To know the speed limit bandwidth, the K 2 Is a fixed value.
Further, the K 2 The value of (2) is k of the total speed-limiting bandwidth of the load balancing cluster 2 Multiple of said k 2 Less than or equal to 1/2N, wherein N is the number of load balancing nodes in the load balancing cluster. For example, assume that the total rate-limiting bandwidth of the load-balancing cluster is B, if k 2 =1/2 n, 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 a text data type, the speed limiting bandwidth of the load balancing node is properly reduced, so that excessive bandwidth is prevented from being allocated, and the utilization rate of the bandwidth is improved.
In an implementation manner of the present application, before the first load balancing node determines the first speed limit bandwidth of the first load balancing node based on the N first state information and the current second state information of the first load balancing node, the method further includes:
The first load balancing node determines that the absolute value of the difference value between the current flow bandwidth and the set flow bandwidth of the first load balancing node is in a set range.
Optionally, prior to step 301, the first load balancing node has set a speed-limited bandwidth.
Optionally, the set traffic bandwidth is determined based on the N and a total speed limit bandwidth of the load balancing cluster.
In one implementation, the set traffic bandwidth is determined based on a total rate-limiting bandwidth of the load balancing cluster and the N, including: the set traffic bandwidth is determined based on a first formula, the total speed limit bandwidth and the N, the first formula being C k =B/N,C k To set the traffic bandwidth, B is the total rate-limiting bandwidth of the load balancing cluster.
In another implementation, the setting the traffic bandwidth is determined based on the N and a total speed limit bandwidth of the load balancing cluster, including: the set traffic bandwidth is determined based on a first mapping relationship, the total speed limit bandwidth and the N, the first mapping relationship being shown in table 1.
TABLE 1
Optionally, the set traffic bandwidth is determined based on the N.
In one implementation, the setting the traffic bandwidth is determined based on the N, including: the set traffic bandwidth is determined based on a second formula and the N, where the first formula is by=k/N, by is the set traffic bandwidth, and K is a fixed value.
In another implementation, the setting the traffic bandwidth is determined based on the N, including: the set traffic bandwidth is determined based on a second mapping relationship and the N, the second mapping relationship being shown in table 2.
TABLE 2
Optionally, the set traffic bandwidth is defined in advance by the load balancing node, or the set traffic bandwidth is a speed limit bandwidth currently set by the load balancing node.
Optionally, the set ranges include one or more set ranges.
Further, the set range includes a first set range and a second set range, and the first set range includes values and the second set range includes values that are less than the set traffic bandwidth.
Or, the values included in the first setting range are 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 maximum value included in the second setting range is equal to the set flow bandwidth. For example, if the set flow bandwidth is 500mbps, the first set range may be 0-50 mbps, and the second set range may be 300-500 mbps.
It can be seen that, in the embodiment of the present application, the load balancing node adjusts the speed limit bandwidth only when the current traffic bandwidth of the load balancing node has a larger difference from the set traffic bandwidth, or has a smaller difference from the set traffic bandwidth, so that the power consumption of the load balancing node can be reduced.
In an implementation manner of the present application, after the first load balancing node performs speed-limiting bandwidth adjustment based on the first speed-limiting bandwidth, the method further includes:
and the first load balancing node sends the first speed limiting bandwidth to a physical switch, wherein the first speed limiting bandwidth is used for distributing traffic for the first load balancing node by the physical switch.
It can be seen that, in the embodiment of the present application, the load balancing node sends the adjusted speed-limiting bandwidth to the physical switch after the speed-limiting bandwidth is adjusted, so that the physical switch distributes traffic more reasonably.
In an implementation of the present application, each status information further includes a notification sequence number and a node sequence number, and the method further includes:
after receiving the first state information of any one of the N second load balancing nodes, the first load balancing node determines whether the first state information of any one of the N second load balancing nodes is received for the first time or not based on the notification sequence number and the node sequence number included in the first state information of any one of the N second load balancing nodes;
if the first state information of any second load balancing node is received for the first time, the first load balancing node encapsulates the second state information and the first state information currently stored by the first load balancing node to obtain a first message;
And the first load balancing node sends the first message.
Optionally, the method further comprises:
and if the first state information of any second load balancing node is received for the first time, the first load balancing node stores the first state information of any second load balancing node.
The first message includes first status information of any second load balancing node.
In an implementation 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 state information currently stored by the first load balancing node based on the first state information of any second load balancing node.
Optionally, the determining, by the first load balancing node, whether the first state information of the any second load balancing node is received for the first time based on the notification sequence number and the node sequence number included in the first state information of the any second load balancing node includes:
if the first load balancing node does not store the node serial number included in the first state information of any second load balancing node and the notification serial number included in the first state information of any second load balancing node is a set serial number, the first load balancing node determines that the first state information of any second load balancing node is received for the first time;
If the first load balancing node stores the node serial number included in the first state information of any second load balancing node and the notification serial number included in the first state information of any second load balancing node is not the set serial number, the first load balancing node determines that the first state information of any second load balancing node is not received for the first time.
The set number is, for example, 0 or 1.
For example, assume that the 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, after the load balancing node 1 receives the state information of the load balancing node 2, the load balancing node 1 first determines whether the received state information of the load balancing node 2 is received for the first time, and if yes, the load balancing node 1 saves the state information of the load balancing node 2. If the load balancing node 1 currently stores the state information of the load balancing node 3, the load balancing node 1 encapsulates and transmits the current state information of the load balancing node 1, the state information of the load balancing node 2 and the state information of the load balancing node 3.
It can be seen that in the embodiment of the present application, after receiving the state information of a certain node, it is first determined whether the state information of the node is received for the first time, if yes, the state information of the node and the stored state information of other nodes are packaged and sent, so that the transmission efficiency of the state information of the node is improved.
It will be appreciated that the electronic device, in order to achieve the above-described functions, includes corresponding hardware and/or software modules that perform the respective functions. The present application can be implemented in hardware or a combination of hardware and computer software, in conjunction with the example algorithm steps described in connection with the embodiments disclosed herein. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application in conjunction with the embodiments, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The present embodiment may divide the functional modules of the electronic device according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules described above may be implemented in hardware. It should be noted that, in this embodiment, the division of the modules is schematic, only one logic function is divided, and another division manner may be implemented in actual implementation.
In the case of dividing the respective functional modules by the respective functions, fig. 4 shows a schematic diagram of a speed-limiting bandwidth adjustment apparatus, and as shown in fig. 4, the speed-limiting bandwidth adjustment 400 is applied to a load balancing node, and the speed-limiting bandwidth adjustment 400 may include: an information acquisition unit 401, a determination unit 402, an adjustment unit 403, an information encapsulation unit 404, and a communication unit 405.
Wherein the information obtaining unit 401 may be used to support the load balancing node to perform the above step 301, etc., and/or for other procedures of the techniques described herein.
The determination unit 402 may be used to support the load balancing node to perform the above-described steps 302, etc., and/or other processes for the techniques described herein.
The adjustment unit 403 may be used to support the load balancing node to perform the above-described step 303, etc., and/or other processes for the techniques described herein.
The information encapsulation unit 404 may be configured to support the load balancing node performing step to encapsulate the second state information and the first state information currently stored by the first load balancing node, to obtain a first packet ", and/or other processes for the techniques described herein.
The communication unit 405 may be configured to support the load balancing node to perform steps of "send first message" and the like, and/or other procedures for the techniques described herein.
It should be noted that, all relevant contents of each step related to the above method embodiment may be cited to the functional description of the corresponding functional module, which is not described herein.
The load balancing node provided in this embodiment is configured to execute the speed-limiting bandwidth adjustment method, so that the same effect as that of the implementation method can be achieved.
In case of an integrated unit, the load balancing node may comprise a processing module, a storage module and a communication module. The processing module may be configured to control and manage the actions of the load balancing node, for example, may be configured to support the load balancing node to perform the steps performed by the information obtaining unit 401, the determining unit 402, the adjusting unit 403, and the information packaging unit 404. The storage module may be used to support the load balancing node to execute stored program code, data, etc. A communication module, which may be used to support the execution of the steps performed by the communication unit 405 described above, and to support the communication of the load balancing node with other devices.
Wherein the processing module may be a processor or a controller. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. A processor may also be a combination that performs computing functions, e.g., including one or more microprocessors, digital signal processing (digital signal processing, DSP) and microprocessor combinations, and the like. The memory module may be a memory. The communication module can be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip and other equipment which interact with other electronic equipment.
In one embodiment, when the processing module is a processor and the storage module is a memory, the load balancing node according to this embodiment may be a device having the structure shown in fig. 2.
The present embodiment also provides a computer storage medium having stored therein computer instructions that, when executed on an electronic device, cause the electronic device to perform the above-described related method steps to implement the speed-limiting bandwidth adjustment method in the above-described embodiments.
The present embodiment also provides a computer program product which, when run on a computer, causes the computer to perform the above-described related steps to implement the speed-limiting bandwidth adjustment method in the above-described embodiments.
In addition, embodiments of the present application also provide an apparatus, which may be embodied as a chip, component or module, which may include a processor and a memory coupled to each other; the memory is used for storing computer-executable instructions, and when the device is operated, the processor can execute the computer-executable instructions stored in the memory, so that the chip executes the speed-limiting bandwidth adjusting method in the method embodiments.
The load balancing node, the computer storage medium, the computer program product or the chip provided in this embodiment are used to execute the corresponding method provided above, so that the beneficial effects thereof can be referred to the beneficial effects in the corresponding method provided above, and will not be described herein.
It will be appreciated by those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (20)

1. The speed-limiting bandwidth adjusting method is characterized by being applied to first load balancing nodes in a load balancing cluster, wherein the load balancing cluster further comprises N second load balancing nodes, and N is a positive integer; the method comprises the following steps:
receiving current state information of each second load balancing node to obtain N pieces of first state information, wherein each piece of state information comprises current flow bandwidth of the corresponding load balancing node;
determining a first speed limit 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;
and carrying out speed limiting bandwidth adjustment based on the first speed limiting bandwidth.
2. The method of claim 1, wherein the determining the first speed-limiting bandwidth of the first load balancing node based on the N first state information and the current second state information of the first load balancing node comprises:
Determining the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
and determining the first speed limiting bandwidth based on the total speed limiting bandwidth of the load balancing cluster, the total flow bandwidth and the second state information.
3. The method of claim 2, wherein the determining the first speed-limited bandwidth based on the total speed-limited bandwidth of the load-balancing cluster, the total traffic bandwidth, and the second status information comprises:
determining the first speed limiting bandwidth based on the total speed limiting bandwidth, the total flow bandwidth, the second state information and a first calculation formula of the load balancing cluster;
wherein, the first calculation formula is: b (B) i =C i ++ (B-C)/N, said B i To limit the bandwidth, the C i And (3) the current traffic bandwidth of the load balancing nodes, wherein B is the total speed limit bandwidth, C is the total traffic bandwidth, and N is the number of the load balancing nodes in the load balancing cluster.
4. A method according to claim 3, wherein the type of data currently handled by the first load balancing node comprises a set data type; the determining the first speed limit bandwidth based on the total speed limit bandwidth, the total traffic bandwidth, the second state information and the first calculation formula of the load balancing cluster includes:
Determining a second speed limit bandwidth based on the total speed limit bandwidth, the total flow bandwidth, the second state information and the first calculation formula of the load balancing cluster;
the first speed limit bandwidth is determined based on the second speed limit bandwidth.
5. The method of claim 4, wherein the set data type comprises a video data type, and wherein the determining the first speed-limited bandwidth based on the second speed-limited bandwidth comprises:
and determining the first speed limit bandwidth based on the second speed limit bandwidth and a second calculation formula, wherein the first speed limit bandwidth is larger than the second speed limit bandwidth.
6. The method of claim 4, wherein the set data type comprises a text data type, and wherein the determining the first speed-limiting bandwidth based on the second speed-limiting bandwidth comprises:
and determining the first speed limit bandwidth based on the second speed limit bandwidth and a third calculation formula, wherein the first speed limit bandwidth is smaller than the second speed limit bandwidth.
7. The method of any of claims 2-6, wherein prior to determining the first speed-limiting bandwidth of the first load balancing node based on the N first status information and the current second status information of the first load balancing node, the method further comprises:
And determining that the absolute value of the difference value between the current flow bandwidth and the set flow bandwidth of the first load balancing node is in a set range.
8. The method of claim 7, wherein the set traffic bandwidth is determined based on a total rate-limiting bandwidth of the load balancing cluster and the N.
9. The method of any of claims 2-8, wherein each status information further comprises a notification sequence number and a node sequence number, the method further comprising:
after receiving the first state information of any one of the N second load balancing nodes, determining whether the first state information of any one of the N second load balancing nodes is received for the first time or not based on the notification sequence number and the node sequence number included in the first state information of any one of the N second load balancing nodes;
if the first state information of any second load balancing node is received for the first time, packaging the second state information and the first state information currently stored by the first load balancing node to obtain a first message;
and sending the first message.
10. The speed-limiting bandwidth adjusting device is characterized by being applied to first load balancing nodes in a load balancing cluster, wherein the load balancing cluster further comprises N second load balancing nodes, and N is a positive integer; the device comprises:
The information acquisition unit is used for receiving the current state information of each second load balancing node to obtain N pieces of first state information, and each piece of state information comprises the current flow bandwidth of the corresponding load balancing node;
the determining unit is used for determining a first speed limit 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;
and the adjusting unit is used for adjusting the speed-limiting bandwidth based on the first speed-limiting bandwidth.
11. The apparatus of claim 10, wherein each status information includes a current traffic bandwidth of its corresponding load balancing node; in determining a first speed-limiting bandwidth of the first load balancing node based on the N first state information and the current second state information of the first load balancing node, the determining unit is specifically configured to:
determining the current total traffic bandwidth of the load balancing cluster based on the N pieces of first state information and the second state information;
and determining the first speed limiting bandwidth based on the total speed limiting bandwidth of the load balancing cluster, the total flow bandwidth and the second state information.
12. The apparatus according to claim 11, wherein in determining the first speed-limiting bandwidth based on the total speed-limiting bandwidth, the total traffic bandwidth and the second status information of the load balancing cluster, the determining unit is specifically configured to:
determining the first speed limiting bandwidth based on the total speed limiting bandwidth, the total flow bandwidth, the second state information and a first calculation formula of the load balancing cluster;
wherein, the first calculation formula is: b (B) i =C i ++ (B-C)/N, said B i To limit the bandwidth, the C i And (3) the current traffic bandwidth of the load balancing nodes, wherein B is the total speed limit bandwidth, C is the total traffic bandwidth, and N is the number of the load balancing nodes in the load balancing cluster.
13. The apparatus of claim 12, wherein the type of data currently handled by the first load balancing node comprises a set data type; in determining the first speed limit bandwidth based on the total speed limit bandwidth, the total traffic bandwidth, the second state information and a first calculation formula of the load balancing cluster, the determining unit is specifically configured to:
determining a second speed limit bandwidth based on the total speed limit bandwidth, the total flow bandwidth, the second state information and the first calculation formula of the load balancing cluster;
The first speed limit bandwidth is determined based on the second speed limit bandwidth.
14. The apparatus according to claim 13, wherein the set data type comprises a video data type, and wherein the determining unit is specifically configured to, in determining the first speed-limiting bandwidth based on the second speed-limiting bandwidth:
and determining the first speed limit bandwidth based on the second speed limit bandwidth and a second calculation formula, wherein the first speed limit bandwidth is larger than the second speed limit bandwidth.
15. The apparatus according to claim 13, wherein the set data type comprises a text data type, and wherein the determining unit is specifically configured to, in determining the first speed-limiting bandwidth based on the second speed-limiting bandwidth:
and determining the first speed limit bandwidth based on the second speed limit bandwidth and a third calculation formula, wherein the first speed limit bandwidth is smaller than the second speed limit bandwidth.
16. The apparatus according to any one of claims 11-15, wherein the determining unit is further configured to determine that an absolute value of a difference between the current traffic bandwidth of the first load balancing node and a set traffic bandwidth is within a set range before determining the first speed limit bandwidth of the first load balancing node based on the N first state information and the current second state information of the first load balancing node.
17. The apparatus of claim 16, wherein the set traffic bandwidth is determined based on a total rate-limiting bandwidth of the load balancing cluster and the N.
18. The apparatus of any of claims 11-17, wherein each status information further comprises a notification sequence number and a node sequence number;
the determining unit is further configured to determine, after receiving the first status information of any one of the N second load balancing nodes, whether the first status information of the any one second load balancing node is received for the first time based on a notification sequence number and a node sequence number included in the first status information of the any one second load balancing node;
the apparatus further comprises: an information packaging unit and a communication unit:
the information packaging unit is configured to package the second state information and the first state information currently stored by the first load balancing node if the first state information of any second load balancing node is received for the first time, so as to obtain a first message;
the communication unit is configured to send the first message.
19. A load balancing node comprising a processor, a memory, a communication interface, and one or more programs stored in the memory and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-9.
20. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-9.
CN202080097946.8A 2020-06-04 2020-06-04 Speed-limiting bandwidth adjusting method and device Active CN115211089B (en)

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 (2)

Publication Number Publication Date
CN115211089A CN115211089A (en) 2022-10-18
CN115211089B true CN115211089B (en) 2023-09-19

Family

ID=78831555

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202080097946.8A Active CN115211089B (en) 2020-06-04 2020-06-04 Speed-limiting bandwidth adjusting method and device

Country Status (2)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017024824A1 (en) * 2015-08-11 2017-02-16 中兴通讯股份有限公司 Aggregated link-based traffic management method and device
CN107231269A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 A kind of cluster accurate speed limit method and apparatus
CN107623638A (en) * 2016-07-15 2018-01-23 中国电信股份有限公司 The fault handling method and device of load-balancing paths
CN110086888A (en) * 2019-05-15 2019-08-02 上海淇毓信息科技有限公司 More cluster dynamic load methods, device, electronic equipment based on RabbitMQ

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442490B (en) * 2008-12-30 2011-04-20 合肥昊特信息科技有限公司 Method for processing flux load equilibrium
CN107347198B (en) * 2016-05-05 2020-06-19 北京金山云网络技术有限公司 Speed limiting method, speed limiting control node and speed limiting equipment
CN110417921B (en) * 2019-09-06 2020-11-06 广州华多网络科技有限公司 Load balancing method and load balancing service device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017024824A1 (en) * 2015-08-11 2017-02-16 中兴通讯股份有限公司 Aggregated link-based traffic management method and device
CN107231269A (en) * 2016-03-25 2017-10-03 阿里巴巴集团控股有限公司 A kind of cluster accurate speed limit method and apparatus
CN107623638A (en) * 2016-07-15 2018-01-23 中国电信股份有限公司 The fault handling method and device of load-balancing paths
CN110086888A (en) * 2019-05-15 2019-08-02 上海淇毓信息科技有限公司 More cluster dynamic load methods, device, electronic equipment based on RabbitMQ

Also Published As

Publication number Publication date
CN115211089A (en) 2022-10-18
WO2021243649A1 (en) 2021-12-09

Similar Documents

Publication Publication Date Title
US11166330B2 (en) Data-stream allocation method for link aggregation and related devices
EP3068087B1 (en) Method and system for transmitting data parallelly on wireless link and wired link
US10489223B2 (en) Methods and apparatus for scheduling time sensitive operations among independent processors
US9565681B2 (en) Low power and fast application service transmission
US10735554B1 (en) System for controlling use of a network
CN106537867A (en) Data transmission method, apparatus and system
US11016812B2 (en) Method for resource allocation and terminal device
CN104780016B (en) A kind of transmission method and equipment of data resource
EP3614729A1 (en) Method for link aggregation and related devices
US11182210B2 (en) Method for resource allocation and terminal device
US11112847B2 (en) Dual processor power saving architecture communications system
CN113632065A (en) Multi-core electronic device and packet processing method thereof
CN111277988A (en) Method for improving Bluetooth transmission speed of WeChat small program
CN107534616B (en) Quality of service for universal serial bus
CN113132272B (en) Network switching frequency dynamic adjustment method and system based on flow perception and network switching chip structure
EP3618494B1 (en) Method for determining length of feedback response information and related product
CN115211089B (en) Speed-limiting bandwidth adjusting method and device
CN117135750A (en) Data transmission method, electronic device and storage medium
CN116244231A (en) Data transmission method, device and system, electronic equipment and storage medium
WO2016137543A1 (en) Reducing power utilization by transferring communication sessions from a main processor to a secondary processor
CN113271336B (en) DPDK-based robot middleware DDS data transmission method, electronic equipment and computer-readable storage medium
CN115344350A (en) Node equipment of cloud service system and resource processing method
TW201334469A (en) Shaping data packet traffic
CN109862044B (en) Conversion device, network equipment and data transmission method
WO2023030178A1 (en) Communication method based on user-mode protocol stack, and corresponding apparatus

Legal Events

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