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

Speed limiting bandwidth adjusting method and device Download PDF

Info

Publication number
CN115211089A
CN115211089A CN202080097946.8A CN202080097946A CN115211089A CN 115211089 A CN115211089 A CN 115211089A CN 202080097946 A CN202080097946 A CN 202080097946A CN 115211089 A CN115211089 A CN 115211089A
Authority
CN
China
Prior art keywords
load balancing
bandwidth
speed limit
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.)
Granted
Application number
CN202080097946.8A
Other languages
Chinese (zh)
Other versions
CN115211089B (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

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

Landscapes

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

Abstract

The application discloses a speed-limiting bandwidth adjusting method and device, which are applied to a first load balancing node 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 the 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 current second state information of the first load balancing node; and adjusting the speed limit bandwidth based on the first speed limit bandwidth. By adopting the method and the device, the speed-limiting bandwidth of the load balancing node can be dynamically adjusted.

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 adjusting method and apparatus.
Background
Load Balance (Load Balance) refers to balancing and distributing loads (work tasks) to a plurality of Load balancing nodes for operation. In order to avoid the abnormal network service caused by the excessive traffic, a network speed limiting function is usually required. Currently, the method of the network speed limiting function is to evenly distribute the total speed limiting bandwidth, for example, if the total speed limiting bandwidth is B, and N load balancing nodes are provided, 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 the current state information of each second load balancing node to obtain N pieces of first state information;
determining 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;
and adjusting the speed limit bandwidth based on the first speed limit bandwidth.
In a second aspect, an embodiment of the present application provides a speed-limiting bandwidth adjustment apparatus, 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;
a determining unit, configured to determine 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;
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, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing steps in any method of the first aspect of the embodiment of the present application.
In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program makes a computer perform part or all of the steps described in any one of the methods of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform some or all of the steps as described in any one 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 present application, the first load balancing node first receives current state information of each second load balancing node to obtain N pieces of first state information, then determines a 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, so that the speed-limiting bandwidth of the load balancing node is dynamically adjusted, and in addition, the speed-limiting bandwidth is determined based on the current state information of each load balancing node, which better meets the current actual load condition, and improves the accuracy of speed-limiting bandwidth adjustment.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
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 disclosure;
fig. 3 is a schematic flow chart of a speed-limited bandwidth adjustment method provided in 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 a first part, a communication architecture to which the solution disclosed in the present application is applicable is described below.
By way of example, FIG. 1 shows a schematic diagram of a communications architecture. The communication fabric 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, the physical switch can be communicated with each load balancing node in the load balancing cluster, the physical switch can be communicated with the router, and the router can be communicated with each electronic device.
The electronic device may be a portable electronic device, such as a mobile phone, a tablet computer, a wearable electronic device (e.g., a smart watch) with wireless communication functionality, and the like, which further includes other functions, such as personal digital assistant and/or music player functions. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices that carry an IOS system, an Android system, a Microsoft system, or other operating system. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer.
The load balancing node may be a service device that provides computing services, and since the service device needs to respond to and process a service request, the service device generally has the capability of bearing services and guaranteeing services. The service device may be a background server or other devices.
In a second section, a load balancing node disclosed in the present application is introduced as follows.
Illustratively, fig. 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 the like.
It should be understood that the exemplary structure in the embodiment of the present application does not constitute a specific limitation to the load balancing node. In other embodiments of the present application, the load balancing node may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement 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: the processor 210 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a 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, and complete the control of instruction fetching and instruction execution. In other embodiments, a 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 have just been used or recycled by processor 210. If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. This avoids repeated accesses, reduces the latency of the processor 210, and thus increases 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 interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit audio source (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose-output (GPIO) interface, a USB interface, and the like.
The communication module 240 may provide a solution for wireless communication applied to a load balancing node, including Wireless Local Area Networks (WLANs) such as wireless fidelity (Wi-Fi) networks, global Navigation Satellite Systems (GNSS), frequency Modulation (FM), and the like. 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 implement the storage capability of the expanded load balancing node. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function.
Internal memory 230 may be used to store one or more computer programs comprising instructions. The processor 210 may cause the load balancing node to perform the speed-limited bandwidth adjustment method provided in some embodiments of the present application, etc. by executing the above-described instructions stored in the internal memory 230. The internal memory 230 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system. The storage data area can store data and the like created in the use process of the load balancing node. Further, 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 of a magnetic disk storage component, a flash memory component, a Universal Flash Storage (UFS), and the like. In some embodiments, the processor 210 may cause the load balancing node to perform the speed-limited bandwidth adjustment method provided in the embodiments of the present application by executing instructions stored in the internal memory 230 and/or instructions stored in a memory provided in the processor 210.
In the third section, the scope of protection of the claims disclosed in the embodiments of the present application is described below.
Referring to fig. 3, fig. 3 is a schematic flow chart of a speed-limiting bandwidth adjustment method provided in an embodiment of the present application, and 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.
Step 301: and the first load balancing node receives the current state information of each second load balancing node to obtain N pieces of first state information, wherein the N pieces of first state information correspond to the N second load balancing nodes one by one.
Step 302: and 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 the current second state information of the first load balancing node.
Step 303: and the first load balancing node adjusts the speed limit bandwidth based on the first speed limit bandwidth.
The first load balancing node is 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 node in the load balancing cluster.
Optionally, each load balancing node periodically adjusts the rate-limiting bandwidth, and the duration of one period may be 5ms, 8ms, 10ms, or other values.
Optionally, each load balancing node sends the status information within the speed-limited bandwidth adjustment period. For example, the status information may be transmitted at the start time of the speed limit bandwidth adjustment period, or the status information may be transmitted at other times in the speed limit bandwidth adjustment period.
The communication protocol for sending the status message by the load balancing node may be multicast, so that all load balancing nodes in the load balancing cluster can receive the status message. The communication Protocol for the load balancing node to send the status information may also be a Transmission Control Protocol (TCP), a User Datagram Protocol (UDP), or the like.
Optionally, the status information comprises at least one of: the current timestamp 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 the status information at time 1, the current timestamp of the load balancing node is time 1.
The node sequence number is used for identifying 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 sequence numbers of the 3 load balancing nodes may be 1, 2, and 3.
And the notification sequence number is used for identifying that the load balancing node sends the state information for the second time in the speed-limiting bandwidth adjusting period. For example, if the notification sequence number is 1, the load balancing node is identified to send the status information for the first time in the speed-limited bandwidth adjustment period.
The current traffic bandwidth of the load balancing node refers to the total data volume currently passing through the load balancing node in 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 stored by the first load balancing node.
For example, the load balancing cluster includes 3 load balancing nodes, such as a load balancing node 1, a load balancing node 2, and a load balancing node 3, if the first load balancing node is the load balancing node 1, after the load balancing node 1 receives the state information 1 of the load balancing node 2, the load balancing node 1 updates the state information of the load balancing node 2 stored by the load balancing node 1 to the state information 1, and after the load balancing node 1 receives the state information 2 of the load balancing node 3, the load balancing node 1 updates the state information of the load balancing node 3 stored by the load balancing node 1 to the state information 2.
Optionally, the first load balancing node adjusts the speed-limiting bandwidth based on the first speed-limiting bandwidth, and includes: and the first load balancing node replaces the speed limit bandwidth with the first speed limit 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 adjusts the speed limit bandwidth 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-limiting 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 adjusts the speed-limiting bandwidth based on the speed-limiting bandwidth 2.
It can be seen that, in the embodiment of the application, the dynamic adjustment of the speed-limiting bandwidth of the load balancing nodes is realized, 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 better met, and the accuracy of the speed-limiting bandwidth adjustment is improved.
In an implementation manner of the present application, each piece of state information includes a current traffic bandwidth of a load balancing node corresponding to the state information; the determining, by the first load balancing node, a 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, 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;
and the first load balancing node determines the first speed limit bandwidth based on the total speed limit bandwidth, the total traffic bandwidth and the second state information of the load balancing cluster.
The total speed limit bandwidth of the load balancing cluster refers to the total data volume 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 data volume currently passing through the load balancing cluster in unit time.
Further, the determining, by the first load balancing node, the first rate-limiting bandwidth based on the total rate-limiting bandwidth, the total traffic bandwidth, and the second status information of the load balancing cluster includes:
the first load balancing node determines 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;
wherein the first calculation formula is: b is i =C i + (B-C)/N, said B i For limiting the bandwidth, C i The current traffic bandwidth of the load balancing nodes, 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, it is assumed that the load balancing cluster includes N load balancing nodes, the N load balancing nodes are numbered from 1 to N, and current traffic bandwidths of the N load balancing nodes are respectively denoted by C 1 、C 2 …C n The total speed limit bandwidth of the load balancing cluster is represented as B, and the speed limit bandwidths of the N load balancing nodes are respectively represented as B 1 、B 2 …B n B in the first calculation formula i The speed limit bandwidth is expressed as the speed limit bandwidth of the ith load balancing node in the N load balancing nodes, and C in a first calculation formula i And the current traffic bandwidth is represented as the ith load balancing node in the N load balancing nodes, wherein i is 1 to N.
For example, suppose that the load balancing cluster has 2 load balancing nodes, such as load balancing node 1 and load balancing node 2, if the current status information 1 of the load balancing node 1 includes the current traffic bandwidth of the load balancing node 1 as C 1 The current traffic bandwidth of the load balancing node 2 included in the current state information 2 of the load balancing node 2 is C 2 If the total rate-limiting bandwidth of the load balancing cluster is B, then for the load balancing node 1, the rate-limiting bandwidth B of the load balancing node 1 is 1 =C 1 + (B- (C1 + C2))/2, for the load balancing node 2, the rate-limiting bandwidth B of the load balancing node 2 2 =C 2 +(B-(C1+C2))/2。
It can be seen that, in the embodiment of the present application, the speed-limit bandwidth is determined based on the current traffic bandwidth of each load balancing node, which better conforms to the current actual load condition, and improves the accuracy of speed-limit bandwidth adjustment.
In an implementation manner of the present application, a data type currently processed by the first load balancing node includes a set data type; the determining, by the first load balancing node, the first rate-limiting bandwidth based on the total rate-limiting bandwidth, the total traffic bandwidth, the second status information, and a first calculation formula of the load balancing cluster includes:
the first load balancing node determines a second 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;
and the first load balancing node determines the first speed-limiting bandwidth based on the second speed-limiting bandwidth.
The data type is set, for example, a video data type, a text data type, or other data types.
In one implementation, the setting, by the first load balancing node, a data type including a video data type, and the determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth includes:
and the first load balancing node determines 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.
Optionally, the second calculation formula is: b is j =B i +K 1 Said B is j And said B i Are all the limited bandwidth, B i For a known rate-limiting bandwidth, said K 1 Is a fixed value.
Further, said K 1 The value of (c) is k of the total rate-limiting bandwidth of the load balancing cluster 1 Multiple, said k 1 And N is less than or equal to 1/2N, wherein 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, and suppose k is 1 1/2N, 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 rate-limiting bandwidth of the load balancing node is appropriately increased to provide sufficient bandwidth for transmitting data, so as to improve the data transmission efficiency.
In another implementation, the setting the data type includes a text data type, and the determining the first speed limit bandwidth based on the second speed limit 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 is j =B i -K 2 Said B is j And said B i Are all rate-limiting bandwidths, B i For a known rate-limiting bandwidth, said K 2 Is a fixed value.
Further, said K 2 The value of (c) is k of the total rate-limiting bandwidth of the load balancing cluster 2 Multiple, said k 2 And N is less than or equal to 1/2N, wherein 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, 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-limited bandwidth of the load balancing node is appropriately reduced, excessive bandwidth allocation is avoided, 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 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 method further includes:
the first load balancing node determines that the absolute value of the difference value between the current traffic bandwidth and the set traffic bandwidth of the first load balancing node is within a set range.
Optionally, before step 301, the first load balancing node has set a speed limit bandwidth.
Optionally, the set traffic bandwidth is determined based on the total rate-limiting bandwidth of the load balancing cluster and the N.
In one implementation, the determining the set traffic bandwidth based on the total rate-limiting bandwidth of the load balancing cluster and the N includes: the set traffic bandwidth is determined based on a first formula, the total rate-limiting bandwidth and the N, wherein the first formula is C k =B/N,C k In order to set the flow bandwidth, B is the total speed limit bandwidth of the load balancing cluster.
In another implementation, the setting of the traffic bandwidth is determined based on the total rate-limiting bandwidth of the load balancing cluster and the N, and includes: the set traffic bandwidth is determined based on a first mapping relationship, the total speed limit bandwidth and the N, and the first mapping relationship is shown in table 1.
TABLE 1
Figure PCTCN2020094391-APPB-000001
Optionally, the set traffic bandwidth is determined based on the N.
In one implementation, the setting of the traffic bandwidth is determined based on the N, and includes: 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 of the traffic bandwidth is determined based on the N, and includes: the set traffic bandwidth is determined based on a second mapping relationship and the N, and the second mapping relationship is shown in table 2.
TABLE 2
N Setting traffic bandwidth
2 400mbps
3 300mbps
4 250mbps
…… ……
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 setting range includes one or more setting ranges.
Further, the setting range includes a first setting range and a second setting range, and both a value included in the first setting range and a value included in the second setting range are smaller than the setting traffic bandwidth.
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 setting traffic bandwidth, and the maximum value included in the second setting range is equal to the setting traffic bandwidth. For example, if the traffic bandwidth is set to 500mbps, the first setting range may be 0 to 50mbps, and the second setting range may be 300 to 500mbps.
It can be seen that, in the embodiment of the present application, the load balancing node adjusts the speed limit bandwidth only when the difference between the current traffic bandwidth and the set traffic bandwidth of the load balancing node is relatively large or relatively small, 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 adjusts the speed-limiting bandwidth based on the first speed-limiting bandwidth, the method further includes:
and the first load balancing node sends the first speed limit bandwidth to a physical switch, and the first speed limit bandwidth is used for the physical switch to distribute flow for the first load balancing node.
It can be seen that, in the embodiment of the present application, after the rate-limiting bandwidth is adjusted, the load balancing node sends the adjusted rate-limiting bandwidth to the physical switch, so that the physical switch distributes traffic more reasonably.
In an implementation manner of the present application, each piece of status information further includes a notification serial number and a node serial 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, based on the notification sequence number and the node sequence number included in the first state information of the any one of the second load balancing nodes, whether the first state information of the any one of the second load balancing nodes is received for the first time;
if the first state information of any one second load balancing node is received for the first time, the first load balancing node packages 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.
Wherein the first packet includes first state information of any one of the second load balancing nodes.
In an implementation manner of the present application, the method further includes:
and 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 status information of 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 status information of 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 one of the second load balancing nodes, and the notification serial number included in the first state information of any one of the second load balancing nodes is not a set serial number, the first load balancing node determines that the first state information of any one of the second load balancing nodes is not received for the first time.
The set numbers are, for example, 0 and 1.
For example, assuming that the load balancing cluster has 3 load balancing nodes, such as a load balancing node 1, a load balancing node 2, and a load balancing node 3, if the first load balancing node is the 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 so, the load balancing node 1 stores 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 packages and sends 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, and if so, the state information of the node and the stored state information of other nodes are packaged and then sent, so as to improve the transmission efficiency of the state information of the node.
It will be appreciated that the electronic device, in order to implement the above-described functions, comprises corresponding hardware and/or software modules for performing the respective functions. The present application is capable of being implemented in hardware or a combination of hardware and computer software in conjunction with the exemplary algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, with the embodiment described in connection with the particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In this embodiment, the electronic device may be divided into functional modules according to the 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 module may be implemented in the form of hardware. It should be noted that the division of the modules in this embodiment is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
In the case of adopting each functional module divided corresponding to each function, fig. 4 shows a schematic diagram of a speed-limiting bandwidth adjusting apparatus, as shown in fig. 4, the speed-limiting bandwidth adjusting apparatus 400 is applied to a load balancing node, and the speed-limiting bandwidth adjusting apparatus 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.
Information obtaining unit 401 may be configured to support the load balancing node to perform step 301 and the like, and/or other processes for the techniques described herein.
Determination unit 402 may be used to support a load balancing node to perform steps 302, etc., described above, 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 steps 303, etc., and/or other processes for the techniques described herein.
The information encapsulating unit 404 may be configured to support the load balancing node to perform the step "encapsulate the second state information and the first state information currently stored by the first load balancing node to obtain the first packet", and/or the like, and/or other processes used in the technology described herein.
The communication unit 405 may be used to support the load balancing node to perform the steps of "send first packet", etc., and/or other processes for the techniques described herein.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The load balancing node provided in this embodiment is configured to execute the speed-limited bandwidth adjustment method, so that the same effect as that of the implementation method can be achieved.
Where an integrated unit is employed, the load balancing node may include a processing module, a storage module, and a communication module. The processing module may be configured to control and manage actions of the load balancing node, and 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 encapsulating unit 404. The storage module may be used to support the load balancing node in executing stored program codes and data. The communication module may be configured to support performing the steps performed by the communication unit 405, and to support communication between the load balancing node and other devices.
The processing module may be a processor or a controller. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. A processor may also be a combination of computing functions, e.g., a combination of one or more microprocessors, a Digital Signal Processing (DSP) and a microprocessor, or the like. The storage module may be a memory. The communication module may specifically be a radio frequency circuit, a bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
In an 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 a structure shown in fig. 2.
The present embodiment also provides a computer storage medium, where computer instructions are stored, and when the computer instructions are run on an electronic device, the electronic device executes the above related method steps to implement the speed-limiting bandwidth adjustment method in the above embodiment.
The present embodiment also provides a computer program product, which when running on a computer, causes the computer to execute the relevant steps described above, so as to implement the speed-limiting bandwidth adjusting method in the above embodiment.
In addition, embodiments of the present application also provide an apparatus, which may be specifically a chip, a component or a module, and may include a processor and a memory connected to each other; the memory is used for storing computer execution instructions, and when the device runs, the processor can execute the computer execution instructions stored in the memory, so that the chip can execute the speed-limiting bandwidth adjusting method in the above-mentioned method embodiments.
The load balancing node, the computer storage medium, the computer program product, or the chip provided in this embodiment are all configured to execute the corresponding method provided above, and therefore, the beneficial effects achieved by the load balancing node, the computer storage medium, the computer program product, or the chip may refer to the beneficial effects in the corresponding method provided above, and are not described herein again.
Through the description of the foregoing embodiments, those skilled in the art will understand that, for convenience and simplicity of description, only the division of the functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules, so as to complete all or part of the functions described above.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a module or a unit may be divided into only one logic function, and may be implemented in other ways, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed to a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit may be implemented in the form of hardware, or may also be implemented in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, or portions of the technical solutions that substantially contribute to the prior art, or all or portions of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

  1. The speed-limiting bandwidth adjusting method is characterized by being applied to a first load balancing node 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 the current state information of each second load balancing node to obtain N pieces of first state information;
    determining 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;
    and adjusting the speed limit bandwidth based on the first speed limit bandwidth.
  2. The method of claim 1, wherein each status message comprises a current traffic bandwidth of its corresponding load balancing node; the determining a first speed-limiting bandwidth of the first load balancing node based on the N pieces of first status information and the current second status information of the first load balancing node includes:
    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 limit bandwidth based on the total speed limit bandwidth, the total traffic bandwidth and the second state information of the load balancing cluster.
  3. The method of claim 2, wherein determining the first rate-limited bandwidth based on the total rate-limited bandwidth, the total traffic bandwidth, and the second status information of the load balancing cluster comprises:
    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;
    wherein the first calculation formula is: b is i =C i + (B-C)/N, said B i For limiting the bandwidth, C i And B is the current traffic bandwidth of the load balancing nodes, 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. The method of claim 3, wherein the type of data currently being processed by the first load balancing node comprises a set data type; the determining the first rate-limiting bandwidth based on the total rate-limiting bandwidth, the total traffic bandwidth, the second state information and a first calculation formula of the load balancing cluster includes:
    determining a second 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;
    and determining the first speed limit bandwidth based on the second speed limit bandwidth.
  5. The method of claim 4, wherein the setting data type comprises a video data type, and wherein the determining the first rate-limiting bandwidth based on the second rate-limiting 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 includes a text data type, and the determining the first speed limit bandwidth based on the second speed limit 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.
  7. The method according to any one of claims 2 to 6, wherein before determining the first rate-limiting bandwidth of the first load balancing node based on the N pieces of 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 traffic bandwidth and the set traffic 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 the 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 first state information of any second load balancing node in the N second load balancing nodes is received, determining whether the first state information of the any second load balancing node is received for the first time or not based on a notification serial number and a node serial number which are included in the first state information of the any second load balancing node;
    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. A speed-limiting bandwidth adjusting device is characterized in that the speed-limiting bandwidth adjusting device is applied to a first load balancing node in a load balancing cluster, 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;
    a determining unit, configured to determine 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;
    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 message comprises a current traffic bandwidth of its corresponding load balancing node; in terms of determining 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 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 limit bandwidth based on the total speed limit bandwidth, the total traffic bandwidth and the second state information of the load balancing cluster.
  12. The apparatus according to claim 11, wherein in determining the first speed limit bandwidth based on the total speed limit 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 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;
    wherein the first calculation formula is: b is i =C i + (B-C)/N, said B i For limiting the bandwidth, C i The current traffic bandwidth of the load balancing nodes, 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 according to claim 12, wherein the type of data currently processed by the first load balancing node comprises a set data type; in respect of determining the first rate-limiting bandwidth based on the total rate-limiting bandwidth, the total traffic bandwidth, the second status 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 traffic bandwidth, the second state information and a first calculation formula of the load balancing cluster;
    and determining the first speed limit bandwidth based on the second speed limit bandwidth.
  14. The apparatus according to claim 13, wherein the setting data type includes a video data type, and in determining the first rate-limiting bandwidth based on the second rate-limiting bandwidth, the determining unit is specifically configured to:
    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 setting data type includes a text data type, and in determining the first speed limit bandwidth based on the second speed limit bandwidth, the determining unit is specifically configured to:
    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 to 15, wherein the determining unit is further configured to determine that an absolute value of a difference between a current traffic bandwidth and a set traffic bandwidth of the first load balancing node is within a set range before determining the first rate-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.
  17. The apparatus of 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. The apparatus according to any of claims 11-17, wherein each status message further comprises a notification sequence number and a node sequence number;
    the determining unit is further configured to determine, after receiving the first state information of any second load balancing node in the N second load balancing nodes, whether the first state information of the any 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 state information of the any second load balancing node;
    the device further comprises: information encapsulation unit and communication unit:
    the information encapsulation unit is configured to encapsulate, if the first state information of any one of the second load balancing nodes is received for the first time, the second state information and the first state information currently stored by the first load balancing node to obtain a first packet;
    the communication unit is configured to send the first packet.
  19. A load balancing node comprising a processor, a memory, a communications interface, and one or more programs stored in the memory and configured for execution by the processor, the programs including 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 true CN115211089A (en) 2022-10-18
CN115211089B 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
WO2021243649A1 (en) 2021-12-09
CN115211089B (en) 2023-09-19

Similar Documents

Publication Publication Date Title
US11166330B2 (en) Data-stream allocation method for link aggregation and related devices
US10375640B2 (en) Method for switching bluetooth working modes, electronic device, and bluetooth chip
US11151010B2 (en) Resource configuration method, mobile terminal and storage medium
US10080158B2 (en) Providing multiple interfaces for traffic
US10785630B2 (en) Method and apparatus for low energy discovery
CN113574836B (en) Electronic device and method for controlling data transmission
KR20130138146A (en) Adaptive process importance
US11016812B2 (en) Method for resource allocation and terminal device
KR102219015B1 (en) Use of network support protocols to improve network usage
EP3591524B1 (en) Memory resource allocation method and terminal device
US20190090119A1 (en) Systems, apparatus, and methods for variable advertising
US11182210B2 (en) Method for resource allocation and terminal device
CN112866970B (en) Communication connection method and device, electronic equipment and wireless transmission system
WO2023246757A1 (en) Computing power service method and apparatus, and terminal
CN115211089B (en) Speed-limiting bandwidth adjusting method and device
EP4287763A2 (en) Electronic device for reducing power consumption in network on basis of wi-fi direct protocol, and method related thereto
CN112882826A (en) Resource cooperative scheduling method and device
CN116244231A (en) Data transmission method, device and system, electronic equipment and storage medium
US10149056B1 (en) System for configuring audio devices to distribute audio data
CN112333690B (en) Data transmission method, device, storage medium, terminal and network access point equipment
CN115344350A (en) Node equipment of cloud service system and resource processing method
CN114430560A (en) Communication method, communication device, electronic equipment, computer equipment and readable storage medium
EP4319101A1 (en) Electronic device, and method for processing received data packet by electronic device
US20240146657A1 (en) Reducing Network Congestion Using a Load Balancer
US10469617B1 (en) System and method for efficient network usage

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