CN114430373A - Method and device for dynamically adjusting bandwidth - Google Patents

Method and device for dynamically adjusting bandwidth Download PDF

Info

Publication number
CN114430373A
CN114430373A CN202111583308.XA CN202111583308A CN114430373A CN 114430373 A CN114430373 A CN 114430373A CN 202111583308 A CN202111583308 A CN 202111583308A CN 114430373 A CN114430373 A CN 114430373A
Authority
CN
China
Prior art keywords
server
bandwidth
cluster
response
servers
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.)
Pending
Application number
CN202111583308.XA
Other languages
Chinese (zh)
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111583308.XA priority Critical patent/CN114430373A/en
Publication of CN114430373A publication Critical patent/CN114430373A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0882Utilisation of link capacity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/76Admission control; Resource allocation using dynamic resource allocation, e.g. in-call renegotiation requested by the user or requested by the network in response to changing network conditions

Abstract

A method and a device for dynamically adjusting bandwidth are used for improving the flexibility of a bandwidth adjustment scheme. In the present application, a method comprises: the first server determines that the bandwidth of the first server is in an overload state in a first time period according to the flow of the first server in the first time period, and broadcasts a bandwidth request in the server cluster, wherein the bandwidth of the first server in the first time period is determined based on the flow of the first server in a second time period, and the second time period is before the first time period; the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the second bandwidth response indicating a second shared bandwidth provided by the second server to the first server.

Description

Method and device for dynamically adjusting bandwidth
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for dynamically adjusting a bandwidth.
Background
The complexity of internet application is continuously improved, the types of accessed services are more and more, and the requirements of various services on bandwidth are different, so that a specific speed limit strategy needs to be executed for different users or different services.
Currently, a central controller is mostly adopted to allocate bandwidth to each server in a server cluster, specifically, the central controller collects traffic information of each server, and then allocates total bandwidth in the whole cluster to each server according to a traffic proportion according to the traffic information of each server, so as to realize bandwidth adjustment.
The scheme has larger dependency on the central controller, and when the central controller fails, the server cluster cannot realize bandwidth adjustment, so that the whole bandwidth adjustment scheme is inflexible.
Disclosure of Invention
The application provides a method and a device for dynamically adjusting bandwidth, which are used for improving the flexibility of a bandwidth adjustment scheme.
In a first aspect, the present application provides a method for dynamically adjusting bandwidth, where the method may be performed by a first server or a chip in the first server, and the following description is given by taking the first server as an example.
In one possible implementation manner, the first server determines that the bandwidth of the first server is in an overload state in a first time period according to the traffic of the first server in the first time period, and broadcasts a bandwidth request in the server cluster, wherein the bandwidth of the first server in the first time period is determined based on the traffic of the first server in a second time period, and the second time period is before the first time period; the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the second bandwidth response indicating a second shared bandwidth provided by the second server to the first server.
In the above technical solution, if the first server determines that its bandwidth is in an overload state, it may request bandwidth from other servers in the server cluster, and if the other servers include idle bandwidth, the first server may acquire the bandwidth shared by the other servers to the first server, thereby facilitating to improve the bandwidth of the first server, so that the bandwidth of the first server may meet the traffic transmission demand of the first server. In the scheme, two servers can be directly written, so that the flexibility of the bandwidth adjusting scheme in the cluster is improved.
In one possible implementation manner, the method further includes: the first server receiving a third bandwidth response of a third server in the server cluster in response to the bandwidth request, the third bandwidth response indicating a third shared bandwidth provided by the third server to the first server; and when the bandwidth of the first server and the second shared bandwidth in the first time interval meet the bandwidth requirement corresponding to the traffic of the first server in the first time interval, the first server refuses the third shared bandwidth.
In the above technical solution, the first server may receive bandwidth responses of the multiple servers in response to the bandwidth request, the first server may select a bandwidth shared by a part of the servers (i.e., the second server), and refuse the bandwidth shared by other servers (i.e., the third server), and correspondingly, the third server may further share its own idle bandwidth with other servers in the server cluster, so as to improve flexibility of a bandwidth adjustment scheme in the cluster, and contribute to improving a bandwidth utilization rate.
In a possible implementation manner, after the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the method further includes: and the first server increases the bandwidth of the first server according to the second shared bandwidth.
In a possible implementation manner, after the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the method further includes: the first server determines that the bandwidth of the first server is in an idle state in a third time period according to the flow of the first server in the third time period, and broadcasts an idle bandwidth notification in the server cluster; wherein the idle bandwidth notification indicates that the bandwidth of the first server in the third period includes the first shared bandwidth for sharing.
In the above technical solution, if the first server determines that the bandwidth of the first server is in an idle state, the first server may broadcast an idle bandwidth notification in the server cluster to notify other servers that the bandwidth of the first server currently includes a bandwidth that can be shared to other servers, and correspondingly, if the bandwidth of other servers is in an overload state, the first server may request the bandwidth. Therefore, the flexibility of the bandwidth adjusting scheme in the cluster is improved, and the utilization rate of the bandwidth is improved.
In one possible implementation manner, the method further includes: the first server determines that a fourth server is withdrawn from the server cluster; the first server shares the bandwidth of the fourth server before exiting the server cluster with other servers in the server cluster according to the total traffic of the server cluster and the traffic of the first server. In the above technical solution, when a server exits from the server cluster, the bandwidth used before the server exits can be shared with other servers still remaining in the server cluster, so that the flexibility of the bandwidth adjustment scheme in the cluster is improved, and the bandwidth utilization rate is improved.
In one possible implementation manner, the method further includes: the first server determines that the fifth server is added to the server cluster, and the bandwidth requirement corresponding to the total flow of the server cluster is larger than the total bandwidth of the server cluster; and the first server triggers each server in the server cluster, and redistributes the total bandwidth of the server cluster according to the flow of each server and the total flow of the server cluster. In the above technical solution, when a server newly joins in a server cluster, the newly joined server also needs to transmit data, and the newly joined server can request bandwidth from other servers in the server cluster, so that the flexibility of the bandwidth adjustment scheme in the cluster is improved, and the bandwidth utilization rate is improved.
In one possible implementation, any two servers in the server cluster are connected through a switch. In the above technical solution, the switch is used to realize communication between any two servers in the server cluster, so that the message broadcast by each server can be received by other servers in the server cluster.
In a second aspect, the present application provides an apparatus for dynamically adjusting bandwidth, where the apparatus may be a first server or a chip in the first server. The device comprises a processing module and a transceiver module.
In one possible implementation manner, the processing module is configured to determine that a bandwidth of the device is in an overload state in a first period according to a traffic of the device in the first period; a transceiver module for broadcasting a bandwidth request in a server cluster, wherein a bandwidth of a device in a first period is determined based on a traffic of the device in a second period, the second period being prior to the first period; the transceiver module is further configured to receive a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the second bandwidth response indicating a second shared bandwidth provided by the second server to the device.
In a possible implementation manner, the transceiver module is further configured to receive a third bandwidth response of a third server in the server cluster in response to the bandwidth request, where the third bandwidth response indicates a third shared bandwidth provided by the third server to the device; the processing module may reject the third shared bandwidth when the bandwidth of the device and the second shared bandwidth in the first period satisfy a bandwidth requirement corresponding to traffic of the device in the first period.
In a possible implementation manner, after the transceiver module receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the processing module is further configured to: the bandwidth of the device is increased based on the second shared bandwidth.
In a possible implementation manner, after the transceiver module receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the processing module is further configured to: determining that the bandwidth of the device is in an idle state in a third time period according to the flow of the device in the third time period; the transceiver module is further configured to: broadcasting an idle bandwidth notification in a server cluster; wherein the idle bandwidth notification indicates that the bandwidth of the device in the third period includes the first shared bandwidth for sharing.
In one possible implementation, the processing module is further configured to: determining that a fourth server is withdrawn from the server cluster; and sharing the bandwidth of the fourth server before the fourth server exits from the server cluster with other servers in the server cluster according to the total flow of the server cluster and the flow of the device.
In one possible implementation, the processing module is further configured to: determining that the fifth server is added to the server cluster, wherein the bandwidth requirement corresponding to the total flow of the server cluster is greater than the total bandwidth of the server cluster; and triggering each server in the server cluster, and redistributing the total bandwidth of the server cluster according to the flow of each server and the total flow of the server cluster.
In one possible implementation, any two servers in the server cluster are connected through a switch.
In a third aspect, the present application provides a computer-readable storage medium having stored thereon a computer program or instructions, which, when executed by a computing device, causes the computing device to perform the method of the first aspect or any possible implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer program product comprising a computer program or instructions which, when executed by a computing device, implements the method of the first aspect or any possible implementation manner of the first aspect.
In a fifth aspect, the present application provides a computing device comprising a processor connected to a memory, the memory being configured to store a computer program, and the processor being configured to execute the computer program stored in the memory, so as to cause the apparatus to perform the method of the first aspect or any possible implementation manner of the first aspect.
For technical effects that can be achieved by any one of the second aspect to the fifth aspect, reference may be made to the description of the advantageous effects in the first aspect, and details are not repeated here.
Drawings
Fig. 1 is a system architecture diagram applicable to a method for dynamically adjusting bandwidth provided in the present application;
fig. 2 is a schematic flowchart of a first method for dynamically adjusting bandwidth provided in the present application;
fig. 3 is a schematic flowchart of a second method for dynamically adjusting bandwidth provided in the present application;
fig. 4 is a schematic flow chart illustrating bandwidth adjustment performed by other servers when a server exits a cluster according to the present application;
fig. 5 is a schematic flow chart illustrating bandwidth adjustment of other servers when a server joins a cluster according to the present application;
fig. 6 is a schematic diagram of a format of a request message/response message/acknowledgement message provided in the present application;
fig. 7 is a schematic diagram of a format of an announcement packet of periodic bandwidth acquisition provided in the present application;
fig. 8 is a schematic diagram of a format of a reset message/a NOWAIT message/an idle bandwidth message according to the present application;
fig. 9 is a schematic structural diagram of a first apparatus for dynamically adjusting bandwidth provided in the present application;
fig. 10 is a schematic structural diagram of a second apparatus for dynamically adjusting bandwidth provided in the present application;
fig. 11 is a schematic structural diagram of a third apparatus for dynamically adjusting bandwidth provided in the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Fig. 1 is a system architecture diagram of an exemplary embodiment of a method for dynamically adjusting bandwidth, which includes a switch and a server cluster, where the server cluster includes a plurality of servers, which may be respectively denoted as server 1, server 2, … …, and server N, where N is an integer greater than or equal to 2. Each server in the server cluster may have access to a switch, and as such, any two servers in the server cluster may communicate through the switch. Further, the switch may form a broadcast domain, and any one of the servers in the cluster of servers may broadcast messages in the broadcast domain.
Based on the above system architecture diagram, fig. 2 is a flowchart illustrating an exemplary method for dynamically adjusting bandwidth according to the present application, where the first server may be any server in a server cluster.
In step 201, the first server determines that the bandwidth of the first server is in an overload state in a first time period according to the traffic of the first server in the first time period, and broadcasts a bandwidth request in the server cluster.
Wherein the bandwidth of the first server in the first time period is determined based on the traffic of the first server in a second time period, wherein the second time period precedes the first time period.
Specifically, the first server may periodically collect traffic information, and determine whether the available bandwidth of the first server in the current period is in an overload state or an idle state according to the traffic of the first server in the current period and the available bandwidth of the first server in the current period. For example, when the bandwidth required by the traffic of the first server is greater than a preset proportion (for example, 120%) of the available bandwidth of the first server, the available bandwidth of the first server is in an overload state; when the bandwidth required by the traffic of the first server is less than a preset proportion (such as 80%) of the available bandwidth of the first server, the available bandwidth of the first server is in an idle state. The available bandwidth may also be referred to as a speed limit bandwidth value, a local bandwidth, a bandwidth, and the like.
The available bandwidth of the first server in the current period may be obtained by proportionally allocating, by the first server, the total bandwidth corresponding to the server cluster according to the traffic of the first server and the total traffic of the server cluster in the previous period; or the available bandwidth of the first server in the current cycle, or the available bandwidth of the first server in the previous cycle may be obtained by the first server mutually negotiating the bandwidth usage with other servers in the server cluster.
In a specific scenario, if the first server determines that the available bandwidth of the first server is in an overload state in the first time period according to the traffic of the first server in the first time period, the first server broadcasts a bandwidth request in the server cluster, and the broadcast bandwidth request can be used for requesting bandwidth from other servers. Optionally, the broadcast bandwidth request includes a bandwidth requested by the first server. Correspondingly, other servers in the server cluster can receive the bandwidth request from the first server, and for one of the servers, the server can judge whether the local bandwidth is in an idle state, if so, the local idle bandwidth can be shared to the first server, otherwise, the bandwidth cannot be shared to the first server.
For example, the idle server of the available bandwidth in the server cluster may be referred to as a second server, and the second server may determine a second bandwidth shared by the first server based on the locally available bandwidth and its traffic, and then send a second bandwidth response to the first server, where the second bandwidth response may be used to indicate the second bandwidth shared by the second server to the first server. When the second server sends the second bandwidth response to the first server, the second server may specifically send the second bandwidth response to the first server in a unicast manner, so that other servers cannot receive the second bandwidth response, and unnecessary bandwidth usage conflicts are avoided.
In addition, each server in the server cluster may also periodically broadcast its own bandwidth usage, where the bandwidth usage may include respective traffic information and bandwidth information, and accordingly, the first server may receive notification information from other servers, so as to obtain traffic information and bandwidth information of other servers in the server cluster. The bandwidth usage may specifically be an announcement message.
At step 202, the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request.
After receiving the second bandwidth response, the first server may determine, based on a second shared bandwidth indicated by the second bandwidth response and the local available bandwidth, whether the traffic demand of the first server may be met after the local available bandwidth is upgraded according to the second shared bandwidth, and if so, may not receive the bandwidth shared by other servers.
Illustratively, a third server in the server cluster sends a third bandwidth response to the first server, wherein the third bandwidth response is operable to indicate a third shared bandwidth provided by the third server to the first server. However, since the first server determines that the second shared bandwidth and the locally available bandwidth can already satisfy the current traffic demand, that is, the first server determines the bandwidth of the first server and the second shared bandwidth in the first time period, and can already satisfy the bandwidth demand corresponding to the traffic of the first server in the first time period, the first server may reject the bandwidth shared by the third server. The third server may share its third shared bandwidth with another server when receiving a bandwidth request from another server after receiving the rejection indication from the first server. This helps to increase the flexibility of bandwidth sharing.
Optionally, the first server sends an acknowledgement to the second server after determining to receive the second shared bandwidth of the second server. And after determining not to receive the third shared bandwidth of the third server, sending a denial of acceptance to the third server, or not sending a confirmation of acceptance or denial of acceptance to the third server.
In addition, if the first server determines that the traffic demand of the first server cannot be met after the local available bandwidth is increased according to the second shared bandwidth based on the second shared bandwidth and the local available bandwidth, the bandwidth shared by other servers can be received, so that the first server can meet the bandwidth demand corresponding to the traffic of the first server after the available bandwidth is increased.
In one possible approach, the first server may broadcast the bandwidth request multiple times and start a first timer after each broadcast of the bandwidth request, where the first timer may correspond to a first preset duration and a first preset number of times. For example, if the first preset duration is 2s and the first preset number of times is 3, the first server starts a first timer after the first bandwidth request is broadcast, and if the first timer reaches 2s, the first server receives bandwidth responses from other servers, it is determined that the request is successful; if the first timer reaches 2s and no bandwidth response is received from other servers, the first server may broadcast the bandwidth request again and start the first timer a second time. Based on the similar process, the request is determined to be successful until the first server receives the bandwidth response from the other servers; or until the first timer does not receive the bandwidth response of other servers after starting for 3 times, the request is considered to be failed.
In one possible approach, after sending a bandwidth response to the first server, a server in the server cluster may start a timer and determine whether it needs to share its free bandwidth (or share the bandwidth) to the first server based on the timer. Taking the second server as an example, after sending the second bandwidth response to the first server, the second server may start a second timer, where the second timer may correspond to a second preset duration and a second preset number of times. For example, if the second preset duration is 2s and the second preset number of times is 3 times, the second server may start the second timer after sending the second bandwidth response to the first server, and if the second timer reaches 2s, the second server receives the confirmation acceptance of the first server, it is determined that the sharing is successful; if the first timer reaches 2s and no acknowledgement from the first server is received, the first server may again send a second bandwidth response to the first server and start the second timer a second time. Based on the similar process, the second server determines to successfully share the bandwidth with the first server until receiving the confirmation acceptance from the first server; or until the second timer does not receive the acknowledgement acceptance of the first server after starting for 3 times, the bandwidth is considered to be unsuccessfully shared with the first server.
And step 203, the first server increases the bandwidth of the first server according to the second shared bandwidth.
For example, the first server may transmit the traffic during the first time period together with the second shared bandwidth and the available bandwidth of the first server during the first time period. It should be noted that the step 203 may be before rejecting the third shared bandwidth of the third server, or after rejecting the third shared bandwidth of the third server.
The first server may also determine that the available bandwidth of the first server is idle during the third time period based on the traffic of the first server during the third time period and the available bandwidth of the first server during the third time period. The first server may then broadcast a spare bandwidth notification (specifically, a spare bandwidth message) in the server cluster, where the spare bandwidth notification may be used to indicate that the available bandwidth of the first server includes a first shared bandwidth that may be shared to other servers. Accordingly, after the other servers receive the idle bandwidth notification broadcast by the first server, the shared bandwidth may be requested from the first server based on the first shared bandwidth indicated in the idle bandwidth notification.
For better explaining the embodiment of the present application, the following takes the server 1, the server 2, and the server 3 as an example, and specifically, refer to a flowchart of another method for dynamically adjusting bandwidth, which is exemplarily shown in fig. 3:
the server 1, the server 2 and the server 3 all transmit respective bandwidth utilization conditions at regular intervals.
In step 301, the server 1 may broadcast the bandwidth request after determining that its local bandwidth is overloaded, and accordingly, the server 2 receives the bandwidth request from the server 1, and the server 3 receives the bandwidth request from the server 1. The bandwidth request may specifically be a request message.
Step 302, the server 2 sends a bandwidth response to the server 1, where the bandwidth response may be used to indicate a bandwidth that the server 2 may share with the server 1; the server 3 sends a bandwidth response to the server 1, which bandwidth response is usable to indicate the bandwidth that the server 3 can share to the server 1. The bandwidth response may specifically be a response message.
Step 303, the server 1 determines to receive the bandwidth shared by the server 2, and sends a confirmation acceptance to the server 2, where the confirmation acceptance may specifically be a confirmation message. The server 1 determines to refuse to accept the bandwidth shared by the server 3, and sends a refuse acceptance to the server 3, where the refuse acceptance may specifically be a NOWAIT message.
Subsequently, the server 1 may also determine that its local bandwidth is in an idle state, and then share the local idle bandwidth to other servers, which may be specifically referred to in steps 304 to 307 described below.
In step 304, server 1 broadcasts the idle bandwidth notification, and accordingly, server 2 receives the idle bandwidth notification from server 1, and server 3 receives the idle bandwidth notification from server 1. The idle bandwidth notification may specifically be an idle bandwidth notification.
Step 305, server 2 sends a bandwidth request to server 1, thereby requesting bandwidth from server 1; the server 3 sends a bandwidth request to the server 1, thereby requesting bandwidth from the server 1.
Step 306, after receiving the bandwidth requests respectively sent by the server 2 and the server 3, the server 1 determines to share the bandwidth with the server 2, and then sends a bandwidth response to the server 2, where the bandwidth response may specifically be a response message.
Step 307, after receiving the bandwidth response of the server 1, the server 2 sends an acknowledgement to the server, where the acknowledgement may be an acknowledgement message.
When a server in the server cluster exits (or is called a drop), the bandwidth used by the server before exiting can be shared by other servers. If the first server determines that the fourth server exits from the server cluster, the first server may share the bandwidth of the fourth server before exiting from the server cluster with other servers in the server cluster according to the total traffic of the server cluster and the traffic of the first server, or according to the traffic of each server in the server cluster.
For example, the first server may determine whether a server is still in the server cluster by periodically receiving bandwidth usage of the server in the server cluster. For example, the first server may determine that the fourth server is to be dropped from the cluster of servers after determining that bandwidth usage of the fourth server has not been detected for a plurality of consecutive periods.
Fig. 4 is a schematic diagram of adjusting bandwidth of other servers when a server exits a cluster according to an example provided in the present application:
step 401, the first server periodically detects the bandwidth usage of the fourth server;
step 402, after the first server does not detect the bandwidth usage of the fourth server in a plurality of cycles, determining that the fourth server is disconnected from the server cluster, that is, determining that the fourth server is in a disconnected state (or called an exit state);
step 403, the first server searches the fourth server again;
step 404, the first server determines that the fourth server is still in the offline state by searching again;
in step 405, the first server shares bandwidth with other servers in the server cluster before the fourth server exits the server cluster.
In the present application, the first server is taken as an example to describe that the server cluster detects that the fourth server is in a dropped state, and in addition, other servers in the server cluster execute the detection operation.
In one possible approach, when a new server (for example, referred to as a fifth server) is added in the server cluster, the fifth server may broadcast a bandwidth usage carrying an initial flag (init) in the server cluster, and accordingly, after receiving the bandwidth usage of the fifth server, the first server determines whether a bandwidth requirement corresponding to the total traffic of the server cluster is greater than the total bandwidth of the server cluster, if so, it indicates that the total bandwidth of the current server cluster cannot meet the bandwidth requirement corresponding to the total traffic of the server cluster, and the first server may broadcast a bandwidth resetting request in the server cluster, where the bandwidth resetting request may be used to trigger each server in the server cluster, and reallocate the total bandwidth of the server cluster according to the traffic of each server and the total traffic of the server cluster. The bandwidth resetting request may specifically be a resetting message.
In another possible manner, after the fifth server joins the server cluster, the bandwidth usage carrying the initial marker may be broadcast in the server cluster, and correspondingly, other servers in the server cluster may receive the bandwidth usage carrying the initial marker, and send the bandwidth usage to the fifth server by the other servers in the server cluster, where the bandwidth usage may include respective traffic information and bandwidth information. And the fifth server determines whether the bandwidth requirement corresponding to the total flow of the server cluster is greater than the total bandwidth of the server cluster, and if so, broadcasts a bandwidth resetting request in the server cluster so that each server redistributes the total bandwidth of the server cluster according to the flow of each server and the total flow of the server cluster.
In yet another possible approach, the fifth server may broadcast a bandwidth usage carrying the initial label in the server cluster after joining the server cluster, where the bandwidth usage may correspond to a bandwidth request. Correspondingly, if the available bandwidth of a certain server in the server cluster includes idle bandwidth (or sharable bandwidth), the server may send a bandwidth response to the fifth server, so as to share the sharable bandwidth of the server to the fifth server. However, when the bandwidth of each server is in a non-idle state, the fifth server does not acquire the bandwidth shared by other servers, and it may broadcast a bandwidth resetting request in the server cluster, so that each server reallocates the total bandwidth of the server cluster according to the traffic of each server and the total traffic of the server cluster.
Fig. 5 is a schematic diagram of adjusting bandwidth of other servers when a server joins a cluster according to an example provided in the present application:
step 501, adding a fifth server into a server cluster;
step 502, broadcasting a bandwidth use condition in a server cluster by a fifth server, wherein the bandwidth use condition carries an initial mark;
step 503, the fifth server receives bandwidth usage fed back by other servers in the server cluster;
in step 502, the fifth server determines whether the bandwidth demand corresponding to the total traffic of the server cluster is greater than the total bandwidth of the server cluster, that is, determines whether the total bandwidth of the current server cluster is overloaded. If yes, go to step 503 and step 504, otherwise go to step 505 and step 506.
Step 503, broadcasting a bandwidth resetting request in the server cluster;
and step 504, redistributing the total bandwidth of the server cluster by each server in the server cluster according to the flow of each server and the total flow of the server cluster.
In step 505, the fifth server broadcasts a bandwidth request in the server cluster.
In step 506, the fifth server receives the responses of the other servers in the server cluster, so as to obtain the available bandwidth of the fifth server.
As follows, for example, each server in the server cluster allocates bandwidth to be allocated according to respective traffic, where the bandwidth to be allocated may be a total bandwidth of the server cluster, or may be a bandwidth before the fourth server exits from the server cluster: if the bandwidth ratio to be allocated is 60Mhz, the traffic of the server 1 in the server cluster is 10bit/s, the traffic of the server 2 is 20bit/s, and the traffic of the server 3 is 30bit/s, then the total traffic in the server cluster is 60bit/s, and each server in the server cluster allocates bandwidth according to the respective traffic, specifically, the bandwidth occupied by the server 1 may be 10Mhz, the bandwidth occupied by the server 2 may be 20Mhz, and the bandwidth occupied by the server 3 may be 30 Mhz.
According to the technical scheme, based on a bandwidth adjustment protocol, information interaction is carried out among the servers in the server cluster, namely, dynamic adjustment of the bandwidth can be completed, so that autonomous adjustment of the cluster bandwidth is facilitated, and intervention of external equipment is not needed; and by the bandwidth protocol, the efficiency and the accuracy of bandwidth adjustment are improved while the traffic load and the real-time performance of the server are considered.
Fig. 6 is a schematic diagram of a format of a request message/a response message/a confirmation message exemplarily provided by the present application, fig. 7 is a schematic diagram of a format of a notification message of periodic bandwidth acquisition exemplarily provided by the present application, and fig. 8 is a schematic diagram of a format of a reset message/a NOWAI message/a free bandwidth message exemplarily provided by the present application.
The meaning of each field in the message is as follows:
DST MAC:
the length is 6 bytes, and the value is the unicast MAC address of the broadcast MAC or the target cluster member.
SRC MAC:
The length is 6 bytes, and the value is the local MAC address of the sending cluster member.
FRAME TYPE:
Length 2 bytes, marking frame type, used for Ethernet message analysis.
MARKER&VERSION:
The length is 2 bytes, and the information is used for message validity check and subsequent expansion.
PACKET TYPE:
Length 1 byte, setting type of message;
NEGOTIATE, negotiating the bandwidth adjustment information;
NOTIFY: advertising bandwidth information, and others;
STATUS:
length 1 byte, state of carrying equipment;
INIT, in initialization state, for initializing configuration;
COMPLETE, in normal operation state, the initialization is completed.
PACKET LENGTH:
Length 2 bytes, message length, complete message length from MARKER.
SENDER MAC:
The length is 6 bytes, the MAC address of the member at the packet sending side is used for identifying the sender and counting the number of gateways at the initial stage, and therefore the initial speed limit value is determined.
TYPE:
Length 1 byte, identifying type tlv carried:
NEGOTIATE negotiation packet:
REQEST, the requested bandwidth, the size of the requested bandwidth is appended;
response bandwidth request, add sharable bandwidth size;
CONFIRM the response, which is used for the condition that a plurality of gateways provide bandwidth and request bandwidth;
NOTIFY notification message:
NOTIFY, which is used for broadcasting and informing the real-time bandwidth and the speed-limiting bandwidth of the gateway;
NOWAIT, informing the answering device that confirmation is no longer waiting.
FREE informs the current device of FREE bandwidth.
RESET-all member devices are notified to RESET the rate-limiting bandwidth.
LEN:
Length 1 byte, identifying the length of the tlv information.
POLICY FLAGS:
Length 2 bytes, and specific attribute or identification information for identifying the configuration of the specified speed limit bandwidth, such as overlap identification.
POLICY INDEX:
The length is 4 bytes, the appointed speed limit bandwidth information is searched according to the value, and the speed limit bandwidth information of the appointed cluster member is also searched according to the value and the mac address.
CUR BANDWIDTH:
Length 4 bytes, real-time bandwidth on cluster members.
LIMIT BANDWIDTH:
Length 4 bytes, speed limit bandwidth set on cluster member.
LIMIT STATISTIC:
The length is 8 bytes, and the speed limit flow is counted periodically by cluster members.
REQ/RESPOND BANDWITH:
Length 4 bytes, used in bandwidth request and response, for indicating the bandwidth to be adjusted.
Of course, as described above, the messages may include other fields, and the fields in the messages may occupy other byte lengths, etc.
Based on the same inventive concept, the present application provides a device for dynamically adjusting bandwidth, which may be any one server in a server cluster. For example, a schematic structural diagram of the device can be seen in fig. 9, where the device may include a protocol module 901, a flow rate acquisition module 902, a speed limit module 903, and a flow rate monitoring module 904.
The traffic collection module 902 may periodically collect traffic information, calculate whether the local bandwidth in the server is overloaded or idle, and then notify the protocol module 901, where the protocol module 901 broadcasts the bandwidth usage after receiving the notification message. If the server is in an overload state, the bandwidth request can be broadcasted, after other servers in the server cluster receive the bandwidth request, the available bandwidth of the server cluster is determined to be in an idle state, a response can be sent to the server, after the server receives the response, the available bandwidth can be adjusted, and a confirmation acceptance is sent to the server which sends the response.
The speed limit module 903 monitors in real time whether the bandwidth is overloaded and exceeds a certain threshold, or is idle and is lower than a certain threshold. If the speed limit module 903 detects that the situation occurs, it may notify the protocol module 901 to process immediately, and at this time, if an overload occurs, it sends a bandwidth request to all other servers in the cluster; if a large amount of idle bandwidth is found, the idle bandwidth is sent to notify all other servers in the cluster, and correspondingly, if the servers are in an overload state, a bandwidth request is sent.
The traffic monitoring module 904 may periodically count bandwidth usage of the server cluster (i.e., total traffic and total bandwidth of the server cluster), and bandwidth usage of each server in the server cluster, and select a server with the highest priority or the largest MAC address to perform periodic reporting of traffic according to the bandwidth usage of each server;
by regularly and quickly broadcasting the use condition of the transmission bandwidth, the servers in each server cluster can quickly detect whether a certain server is disconnected, and then immediately execute the bandwidth reallocation of the disconnected servers;
if a new server is added in the capacity expansion process, the new server sends the bandwidth use condition of the appointed times at regular time, wherein the bandwidth use condition carries an initial mark, other servers respond to the bandwidth use condition of the new server after receiving the bandwidth use condition, and the new server stores the received bandwidth use condition. If the available bandwidth of the server in the server cluster is in an idle state, the bandwidth can be shared to a new server according to the bandwidth use condition of the server; if all other servers in the server cluster are in an overload state, the new server can send a bandwidth resetting request to request each server in the server cluster to reset the available bandwidth of each server according to the proportion of the traffic load of each server to the traffic load of the total server cluster.
If the configuration is the newly issued speed-limiting bandwidth, that is, the total bandwidth of the server cluster is newly configured, each server in the server cluster can be initialized to the new bandwidth, and through the statistics of the bandwidth use conditions of the specified times, each server stores the bandwidth use conditions of all other servers, and at this time, the respective available bandwidth can be set according to the own traffic load and the total traffic load.
Based on the same inventive concept, the present application provides another apparatus for dynamically adjusting bandwidth, which may be any one server in a server cluster. As an example, a schematic structure of the apparatus can be seen in fig. 10, wherein the apparatus can include a processing module 1001 and a transceiver module 1002.
In a possible implementation manner, the processing module 1001 is configured to determine that a bandwidth of a device is in an overload state in a first period according to a traffic of the device in the first period; a transceiver module 1002 configured to broadcast a bandwidth request in a server cluster, wherein a bandwidth of a device in a first period is determined based on a traffic of the device in a second period, the second period being before the first period; the transceiver module 1002 is further configured to receive a second bandwidth response of a second server in the server cluster in response to the bandwidth request, where the second bandwidth response indicates a second shared bandwidth provided by the second server to the device.
In a possible implementation manner, the transceiver module 1002 is further configured to receive a third bandwidth response of a third server in the server cluster in response to the bandwidth request, where the third bandwidth response indicates a third shared bandwidth provided by the third server to the device; when the bandwidth of the device and the second shared bandwidth in the first period satisfy the bandwidth requirement corresponding to the traffic of the device in the first period, the processing module 1001 may reject the third shared bandwidth.
In a possible implementation manner, after the transceiver module 1002 receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the processing module 1001 is further configured to: the bandwidth of the device is increased based on the second shared bandwidth.
In a possible implementation manner, after the transceiver module 1002 receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the processing module 1001 is further configured to: determining that the bandwidth of the device is in an idle state in a third time period according to the flow of the device in the third time period; the transceiver module 1002 is further configured to: broadcasting an idle bandwidth notification in a server cluster; wherein the idle bandwidth notification indicates that the bandwidth of the device in the third period includes the first shared bandwidth for sharing.
In one possible implementation, the processing module 1001 is further configured to: determining that a fourth server is withdrawn from the server cluster; and sharing the bandwidth of the fourth server before the fourth server exits from the server cluster with other servers in the server cluster according to the total flow of the server cluster and the flow of the device.
In one possible implementation, the processing module 1001 is further configured to: determining that the fifth server is added to the server cluster, wherein the bandwidth requirement corresponding to the total flow of the server cluster is greater than the total bandwidth of the server cluster; and triggering each server in the server cluster, and redistributing the total bandwidth of the server cluster according to the flow of each server and the total flow of the server cluster.
In one possible implementation, any two servers in the server cluster are connected through a switch.
Based on the above and the same concept, as shown in fig. 11, which is a device 1100 provided in the embodiment of the present application, the device shown in fig. 11 may be a hardware circuit implementation of the device shown in fig. 10. The apparatus may be adapted to the flow chart shown above to perform the functions of the server in the above-described method embodiments.
For ease of illustration, fig. 11 shows only the main components of the device.
The apparatus 1100 shown in fig. 11 comprises a communication interface 1110, a processor 1120, and a memory 1130, wherein the memory 1130 is used to store program instructions and/or data. The processor 1120 may operate in conjunction with the memory 1130. Processor 1120 may execute program instructions stored in memory 1130. When the instructions or programs stored in the memory 1130 are executed, the processor 1120 is configured to perform the operations performed by the processing module 901 in the above embodiments, and the communication interface 1110 is configured to perform the operations performed by the transceiver module 902 in the above embodiments.
A memory 1130 is coupled to the processor 1120. The coupling in the embodiments of the present application is an indirect coupling or a communication connection between devices, units or modules, and may be an electrical, mechanical or other form for information interaction between the devices, units or modules. At least one of the memories 1130 may be included in the processor 1120.
In embodiments of the present application, the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface. In the embodiment of the present application, when the communication interface is a transceiver, the transceiver may include an independent receiver and an independent transmitter; a transceiver that integrates transceiving functions, or a communication interface may also be used.
The apparatus 1100 may also include a communication line 190. The communication interface 1110, the processor 1120, and the memory 1130 may be connected to each other through the communication line 190; the communication line 190 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication lines 190 may be divided into address buses, data buses, control buses, and the like. For ease of illustration, only one thick line is shown in FIG. 11, but this is not intended to represent only one bus or type of bus.
Based on the above and the same idea, the present application provides a computer-readable storage medium having stored therein a computer program or instructions which, when executed by a computing device, cause the computing device to perform the method of the above-described method embodiments.
Based on the above and the same idea, the present application provides a computer program product comprising a computer program or instructions which, when executed by a computing device, implements the method in the above-described method embodiments.
Based on the above and the same idea, the present application provides a computing device comprising a processor connected to a memory for storing a computer program, the processor being configured to execute the computer program stored in the memory to cause the apparatus to perform the method in the above method embodiment.
It is to be understood that the various numerical references referred to in the embodiments of the present application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of the present application. The sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of the processes should be determined by their functions and inherent logic.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for dynamically adjusting bandwidth, comprising:
a first server determines that the bandwidth of the first server is in an overload state in a first time period according to the flow of the first server in the first time period, and broadcasts a bandwidth request in a server cluster, wherein the bandwidth of the first server in the first time period is determined based on the flow of the first server in a second time period, and the second time period is before the first time period;
the first server receives a second bandwidth response of a second server in the server cluster in response to the bandwidth request, the second bandwidth response indicating a second shared bandwidth provided by the second server to the first server.
2. The method of claim 1, further comprising:
the first server receiving a third bandwidth response from a third server of the cluster of servers in response to the bandwidth request, the third bandwidth response indicating a third shared bandwidth provided by the third server to the first server;
and when the bandwidth of the first server and the second shared bandwidth in the first time interval meet the bandwidth requirement corresponding to the traffic of the first server in the first time interval, rejecting the third shared bandwidth by the first server.
3. The method of claim 1, wherein after the first server receives a second bandwidth response from a second server in the cluster of servers in response to the bandwidth request, further comprising:
and the first server increases the bandwidth of the first server according to the second shared bandwidth.
4. The method of claim 1, wherein after the first server receives a second bandwidth response from a second server in the cluster of servers in response to the bandwidth request, further comprising:
the first server determines that the bandwidth of the first server is in an idle state in a third time period according to the flow of the first server in the third time period, and broadcasts an idle bandwidth notification in a server cluster; wherein the idle bandwidth notification indicates that the bandwidth of the first server in the third period includes a first shared bandwidth for sharing.
5. The method of claim 1, further comprising:
the first server determining that a fourth server exits from the cluster of servers;
and the first server shares the bandwidth before the fourth server exits from the server cluster with other servers in the server cluster according to the total flow of the server cluster and the flow of the first server.
6. The method of claim 1, further comprising:
the first server determines that a fifth server is added to the server cluster, and the bandwidth requirement corresponding to the total flow of the server cluster is greater than the total bandwidth of the server cluster;
and the first server triggers each server in the server cluster, and redistributes the total bandwidth of the server cluster according to the flow of each server and the total flow of the server cluster.
7. The method of any one of claims 1 to 6, wherein any two servers in the server cluster are connected by a switch.
8. An apparatus for dynamically adjusting bandwidth, comprising means for performing the method of any one of claims 1 to 7.
9. A computing device comprising a processor coupled to a memory, the memory for storing a computer program, the processor for executing the computer program stored in the memory to cause the computing device to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program or instructions which, when executed by a computing device, carry out the method of any one of claims 1 to 7.
CN202111583308.XA 2021-12-22 2021-12-22 Method and device for dynamically adjusting bandwidth Pending CN114430373A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111583308.XA CN114430373A (en) 2021-12-22 2021-12-22 Method and device for dynamically adjusting bandwidth

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111583308.XA CN114430373A (en) 2021-12-22 2021-12-22 Method and device for dynamically adjusting bandwidth

Publications (1)

Publication Number Publication Date
CN114430373A true CN114430373A (en) 2022-05-03

Family

ID=81311255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111583308.XA Pending CN114430373A (en) 2021-12-22 2021-12-22 Method and device for dynamically adjusting bandwidth

Country Status (1)

Country Link
CN (1) CN114430373A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2800960A1 (en) * 1999-11-05 2001-05-11 Thomson Multimedia Sa METHOD AND DEVICE FOR ALLOCATING BANDWIDTH TO DATA STREAMS IN A BROADCASTING NETWORK
CN1973280A (en) * 2003-01-30 2007-05-30 Ut斯达康有限公司 Universal broadband server system and method
CN101142787A (en) * 2005-03-09 2008-03-12 索尼电子有限公司 System and method for dynamic bandwidth estimation of newtork links
CN101159699A (en) * 2007-11-27 2008-04-09 杭州华三通信技术有限公司 Distributed equipment switch network bandwidth dynamic assignment method and apparatus
CN102202001A (en) * 2011-06-15 2011-09-28 中国电信股份有限公司 Dynamic subscriber bandwidth regulation method, system and broadband network gateway
CN102655503A (en) * 2010-10-18 2012-09-05 阿瓦雅公司 Resource allocation using shared resource pools
CN102685815A (en) * 2011-03-11 2012-09-19 国基电子(上海)有限公司 Wireless network equipment and bandwidth sharing method thereof
CN104243266A (en) * 2014-09-18 2014-12-24 小米科技有限责任公司 Method and device for network access
CN104396215A (en) * 2012-05-01 2015-03-04 思杰系统有限公司 Method and apparatus for bandwidth allocation and estimation
CN111435922A (en) * 2019-01-11 2020-07-21 北京邦天信息技术有限公司 Bandwidth sharing method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2800960A1 (en) * 1999-11-05 2001-05-11 Thomson Multimedia Sa METHOD AND DEVICE FOR ALLOCATING BANDWIDTH TO DATA STREAMS IN A BROADCASTING NETWORK
CN1973280A (en) * 2003-01-30 2007-05-30 Ut斯达康有限公司 Universal broadband server system and method
CN101142787A (en) * 2005-03-09 2008-03-12 索尼电子有限公司 System and method for dynamic bandwidth estimation of newtork links
CN101159699A (en) * 2007-11-27 2008-04-09 杭州华三通信技术有限公司 Distributed equipment switch network bandwidth dynamic assignment method and apparatus
CN102655503A (en) * 2010-10-18 2012-09-05 阿瓦雅公司 Resource allocation using shared resource pools
CN102685815A (en) * 2011-03-11 2012-09-19 国基电子(上海)有限公司 Wireless network equipment and bandwidth sharing method thereof
CN102202001A (en) * 2011-06-15 2011-09-28 中国电信股份有限公司 Dynamic subscriber bandwidth regulation method, system and broadband network gateway
CN104396215A (en) * 2012-05-01 2015-03-04 思杰系统有限公司 Method and apparatus for bandwidth allocation and estimation
CN104243266A (en) * 2014-09-18 2014-12-24 小米科技有限责任公司 Method and device for network access
CN111435922A (en) * 2019-01-11 2020-07-21 北京邦天信息技术有限公司 Bandwidth sharing method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
WONRYU等: "popularity based bandwidth allocation for video broadcast/multicast over wireless networks", IEEE, 17 November 2011 (2011-11-17) *
羊秋玲;金志刚;黄向党;: "无线Mesh网络中基于业务价值的组播带宽分配方案", 计算机工程与科学, no. 10, 15 October 2016 (2016-10-15) *

Similar Documents

Publication Publication Date Title
CA2219526C (en) System for determining the frequency of repetitions of polling active stations relative to the polling of inactive stations
US4975904A (en) Local area network for digital data processing system including timer-regulated message transfer arrangement
CN100459561C (en) Common channel flow control method and system
CA1257399A (en) Local area network for digital data processing system
US20160234327A1 (en) Server cluster and method for push notification service
CN102316133B (en) Method and device for balancing load
US8156372B2 (en) Power outage operation of a cable modem
CN110708256B (en) CDN scheduling method, CDN scheduling device, network equipment and storage medium
CN110858843B (en) Service request processing method and device and computer readable storage medium
CN109769029B (en) Communication connection method based on electricity consumption information acquisition system and terminal equipment
EP3057287A1 (en) Node allocation method, device and system
CN108429703B (en) DHCP client-side online method and device
CN114364031A (en) Service providing method, device and storage medium
CN104009937A (en) Enhanced-transmission-selection configuration information transmission method and device
US8855693B2 (en) Method and apparatus for controlling wireless devices
CN114430373A (en) Method and device for dynamically adjusting bandwidth
CN112073215B (en) Method for realizing application and service controller
CN113329377B (en) Bandwidth resource scheduling method and device, electronic device and computer equipment
CN105516276A (en) Message processing method and system based on bionic hierarchical communication
CN111447126B (en) Ethernet bus communication method, device, robot, equipment and computer readable storage medium
CN111614497B (en) Network bandwidth allocation method and device, electronic equipment and storage medium
WO2011075980A1 (en) Cluster system and method for transmitting broadcast messages thereof
US7324508B2 (en) Crossbar switching circuit and operating method thereof
CN110300035B (en) Method, system, device and server for judging load state of storage system
JP6554011B2 (en) Timeout time setting device and timeout time setting method

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