CN111654448B - Traffic scheduling method and device - Google Patents

Traffic scheduling method and device Download PDF

Info

Publication number
CN111654448B
CN111654448B CN202010374211.7A CN202010374211A CN111654448B CN 111654448 B CN111654448 B CN 111654448B CN 202010374211 A CN202010374211 A CN 202010374211A CN 111654448 B CN111654448 B CN 111654448B
Authority
CN
China
Prior art keywords
equipment
state
scheduling
traffic
flow
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010374211.7A
Other languages
Chinese (zh)
Other versions
CN111654448A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202010374211.7A priority Critical patent/CN111654448B/en
Publication of CN111654448A publication Critical patent/CN111654448A/en
Application granted granted Critical
Publication of CN111654448B publication Critical patent/CN111654448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • H04L47/125Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
    • 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
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/11Identifying congestion
    • 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/29Flow control; Congestion control using a combination of thresholds

Abstract

The invention provides a traffic scheduling method and a traffic scheduling device, which can be applied to network equipment; the method comprises the following steps: periodically monitoring the state of the equipment; when the equipment is in a static state, judging whether the flow scheduling strategy of the equipment is a scheduling strategy based on flow attributes; if yes, switching the flow scheduling strategy into a preset statistical scheduling strategy; and scheduling the received traffic according to the statistical scheduling strategy. By the technical scheme, when the equipment is in a static state, the equipment can adopt a preset statistical scheduling strategy to schedule the received traffic, so that the traffic distribution is more reasonable, and the problem of data loss caused by the fact that the traffic received by a link is increased sharply and exceeds the link bandwidth is avoided.

Description

Traffic scheduling method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for traffic scheduling.
Background
After receiving the traffic, the network device generally performs traffic scheduling according to the configured traffic scheduling policy, and if the traffic scheduling policy is unreasonable and inflexible to configure, reasonable traffic allocation cannot be achieved.
Disclosure of Invention
The application provides a flow scheduling method and device, which can realize reasonable distribution of flow.
According to a first aspect of the present application, there is provided a traffic scheduling method, the method being applied to a network device, the method comprising:
periodically monitoring the state of the equipment;
when the equipment is in a static state, judging whether the flow scheduling strategy of the equipment is a scheduling strategy based on flow attributes;
if yes, switching the flow scheduling strategy into a preset statistical scheduling strategy; and scheduling the received traffic according to the statistical scheduling strategy.
Further, when the device is in a normal state,
judging whether the flow scheduling strategy of the equipment is the statistical scheduling strategy or not;
if yes, switching the flow scheduling strategy into the scheduling strategy based on the flow attribute; and scheduling the received traffic according to the scheduling strategy based on the traffic attribute.
Further, the method further comprises:
periodically detecting the appointed index data of the equipment;
and updating the state of the equipment according to the specified index data.
Further, the step of updating the state of the device according to the specified index data includes:
judging the size relation between the specified index data and the corresponding data threshold value;
if the specified index data of the equipment is smaller than the corresponding data threshold value, updating the state of the equipment into a static state when the equipment is in a normal state;
if the specified index data of the equipment is larger than or equal to the corresponding data threshold value, the state of the equipment is updated to be a normal state when the equipment is in a static state.
Further, the step of updating the state of the device to the normal state includes:
judging whether a smooth waiting timer is started or not;
if not, starting the smooth waiting timer;
and when the smooth waiting timer reaches the timing time, updating the state of the equipment to be a normal state.
Further, if the specified index data of the device is smaller than the corresponding data threshold, the following steps are further executed:
further judging whether the smooth waiting timer is started;
if yes, closing the smooth waiting timer.
Further, the method further comprises:
and after the equipment is started, updating the state of the equipment into a static state.
According to a second aspect of the present application, there is provided a traffic scheduling apparatus, the apparatus being applicable to a network device, the apparatus comprising:
the state monitoring unit is used for periodically monitoring the state of the equipment;
the policy judgment unit is used for judging whether the flow scheduling policy of the equipment is a scheduling policy based on the flow attribute when the equipment is in a static state;
the strategy switching unit is used for switching the flow scheduling strategy into a preset statistical scheduling strategy if the flow scheduling strategy is the same;
and the flow scheduling unit schedules the received flow according to the statistical scheduling strategy.
Further, the policy judging unit is further configured to judge whether the traffic scheduling policy of the device is a statistical scheduling policy when the device is in a normal state;
the policy switching unit is used for switching the flow scheduling policy into the scheduling policy based on the flow attribute if the flow scheduling policy is the same;
and the flow scheduling unit schedules the received flow according to the scheduling strategy based on the flow attribute.
Further, the device further comprises:
the data detection unit is used for periodically detecting the specified index data of the equipment;
and the state updating unit is used for updating the state of the equipment according to the specified index data.
Further, the state updating unit is specifically configured to:
judging the size relation between the specified index data and the corresponding data threshold value;
if the specified index data of the equipment is smaller than the corresponding data threshold value, updating the state of the equipment into a static state when the equipment is in a normal state;
if the specified index data of the equipment is greater than or equal to the corresponding data threshold value, when the equipment is in a static state, the state of the equipment is updated to be a normal state.
Further, the state updating unit is further configured to:
judging whether a smooth waiting timer is started or not;
if not, starting the smooth waiting timer;
and when the smooth waiting timer reaches the timing time, updating the state of the equipment to the normal state.
Further, the state updating unit is further configured to:
if the specified index data of the device is smaller than the corresponding data threshold value, further judging whether the smooth waiting timer is started or not;
if yes, closing the smooth waiting timer.
Further, the device further comprises:
and the state updating unit is used for updating the state of the equipment into a static state after the equipment is started.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the technical scheme, the network equipment can distinguish the states of the equipment, can periodically monitor the states of the equipment, and can schedule the received traffic according to the statistical scheduling strategy when the equipment is in a static state, namely, when the received traffic of the equipment is subjected to surge or is about to surge, the equipment can schedule the received traffic according to the statistical scheduling strategy, so that the traffic distribution is more reasonable, and the problem of data loss caused by surge of the traffic received by a link and exceeding of the link bandwidth is avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a flow chart of a method of traffic scheduling in one embodiment of the invention;
fig. 2 is a flow chart of a traffic scheduling method according to another embodiment of the present invention.
FIG. 3 is a schematic diagram of a traffic scheduling device according to an embodiment of the present invention;
fig. 4 is a schematic structural view of a traffic scheduling apparatus according to another embodiment of the present invention.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present description as detailed in the accompanying claims.
The terminology used in the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings. Features of the embodiments described below may be combined with each other without conflict.
In practical applications, existing network devices typically schedule received traffic using a traffic attribute-based scheduling policy. The network devices may be routers, servers, switches, etc. It should be noted that, the scheduling policy based on the traffic attribute may be a scheduling policy based on the minimum bandwidth usage, that is, scheduling traffic to the link with the lowest bandwidth usage. Of course, other traffic scheduling strategies depending on the bandwidth usage of the link are also possible.
However, when the traffic received by the network device is suddenly increased, if the scheduling policy is still adopted, the traffic cannot be reasonably allocated, which may cause the problem of data loss caused by that the traffic received by the link is suddenly increased and the traffic exceeds the link bandwidth.
Illustrating: the network device is assumed to have three links, an a-link, a B-link, and a C-link, respectively. The bandwidth allowable passing threshold of the a link is 800MB, the bandwidth allowable passing threshold of the B link is 800MB, and the bandwidth allowable passing threshold of the C link is 900MB. The sampling calculation is just completed once at the previous moment, the bandwidth utilization rate of the A link is 50%, the bandwidth utilization rate of the B link is 50%, and the bandwidth utilization rate of the C link is 45%. If the traffic received by the device is suddenly increased to 500MB at the next moment and the scheduling policy based on the traffic attribute is still adopted at the moment, the network device schedules the traffic received according to the scheduling policy, namely, the suddenly increased 500MB is distributed to the C link. At this time, the traffic received by the C-link is greater than the threshold allowed by the remaining bandwidth of the C-link, which may cause the fusing of the C-link interface, and further result in data loss.
This surge often occurs. Illustrating: when the network device is started, the traffic received by the network device will be increased. When the network equipment encounters fault recovery, the traffic received by the network equipment also has a surge condition. The network equipment can be subjected to the faults such as equipment disconnection, network cable disconnection and the like.
Aiming at the problems of the scheme, the invention provides a flow scheduling method and a flow scheduling device so as to realize reasonable flow distribution and avoid link fusing and data loss.
In one embodiment, the present invention provides a traffic scheduling method, which is applied to a network device, so that the network device can change a traffic scheduling policy adopted by the device according to its own state, so that the network device can perform better scheduling on received traffic, i.e. make a link be allocated to an appropriate traffic. Specifically, referring to fig. 1, the method of the present embodiment may include the following steps:
step 101, periodically monitoring the state of the device.
The states of the present device include a stationary state and a normal state. The stationary state represents that the device may be in a fault phase or a start-up phase, etc. Specifically, after the equipment is started, the equipment is updated to be in a static state; when the equipment encounters a fault, the state of the equipment is updated to be in a static state. When the device is in a stationary state, this means that the current or later received traffic of the device may be subject to a surge.
Step 102, when the device is in a static state, judging whether the flow scheduling policy of the device is a scheduling policy based on the flow attribute.
And 103, if yes, switching the flow scheduling strategy into a preset statistical scheduling strategy.
And 104, scheduling the received traffic according to a preset statistical scheduling strategy.
The scheduling policy described above does not depend on the bandwidth usage of the links, but does the probability of distributing traffic to each link through mathematical computation, which may be a weighted polling scheduling policy or a hash weight scheduling policy, etc., to avoid that a single link receives too much traffic.
According to the technical scheme, the network equipment can distinguish the states of the equipment, can periodically monitor the states of the equipment, and can schedule the received traffic according to the statistical scheduling strategy when the equipment is in a static state, namely, when the received traffic of the equipment is subjected to surge or is about to surge, the equipment can schedule the received traffic according to the statistical scheduling strategy, so that the traffic distribution is more reasonable, and the problem of data loss caused by surge of the traffic received by a link and exceeding of the link bandwidth is avoided.
Further, the method of this embodiment further includes the following steps:
and 105, judging whether the flow scheduling strategy of the equipment is a preset statistical scheduling strategy or not when the equipment is in a normal state.
And 106, if so, switching the flow scheduling strategy into a scheduling strategy based on the flow attribute.
In step 107, the device schedules the received traffic according to the scheduling policy based on the traffic attribute.
The scheduling policy based on the traffic attribute may be a scheduling policy based on a minimum bandwidth usage, or the like. In this embodiment, the scheduling policy based on the traffic attribute is a scheduling policy based on the minimum broadband usage.
When the device is in a normal state, the traffic received by the device is in a stable state, and when the traffic is distributed to a single link, the traffic distributed to the link generally does not exceed the bandwidth allowable passing threshold corresponding to the link. The device can schedule the received traffic according to the scheduling policy based on the traffic attribute, thereby realizing that the traffic can be transmitted through a selected and proper single link, and simultaneously ensuring that the traffic received by the link does not exceed the bandwidth allowable passing threshold of the link.
In this embodiment, the bandwidth utilization rate of the link may be calculated by periodically sampling the traffic of each link, and combining the allowed passing threshold value configured by each link. When the device is in a normal state, traffic can be preferentially forwarded from the link with the lowest use rate so as to use all links in a balanced way. Through the arrangement, the network equipment can select different scheduling strategies according to different states of the equipment, reasonably distribute received traffic by using the selected scheduling strategies, and simultaneously use all links as uniformly as possible.
Fig. 2 is a flowchart of another traffic scheduling method according to an embodiment of the present invention, based on the method shown in fig. 1. The traffic scheduling method may include the steps of:
step 201, the specified index data of the device is periodically detected.
And step 202, updating the state of the equipment according to the specified index data.
In the above setting, the device may update the state of the device periodically according to the specified index data, and schedule the received traffic using a traffic scheduling policy corresponding to the state of the device, so that the traffic allocation is more reasonable.
Wherein step 202 further includes the following steps, that is, updating the state of the device according to the specified index data further includes the following steps:
in step 2021, the size relationship between the specified index data and the corresponding data threshold is determined.
The specified index data includes at least one of the following: the number of interfaces used in the device, the total traffic with the device, and the number of sessions in the device. In other words, the specified index data may be only the number of interfaces, the total flow of the device, or the number of sessions in the device, and of course, may be a combination of any two or three of the above. In this embodiment, the specified index data is a combination of the number of interfaces, the total flow of the present apparatus, and the number of sessions in the present apparatus. Of course, in other embodiments, the specified index data may be only any one of the number of interfaces, the total flow of the device, or the number of sessions in the device, or a combination of any two, or may also be other index numbers.
In this embodiment, when any one of the number of interfaces used in the device, the total flow of the device, and the number of sessions in the device is smaller than the corresponding data threshold, it may be determined that the device is in a failure stage at this time, that is, the situations such as device disconnection, network line disconnection, and the like may occur. Typically, when the network device is in a failure phase, the user will repair the network device to restore and re-line the network device. The traffic received by the network device may proliferate when the network device recovers from the failure condition and reappears online. At this time, if the device still adopts the scheduling policy based on the traffic attribute to schedule the received traffic, the problem of data loss caused by the surge of the traffic received by the single link and the exceeding of the link bandwidth may be caused. By determining the size relationship between the specified index data and the corresponding data threshold, it is possible to determine whether the network device is in a failure state. When the specified index data of the device is smaller than the corresponding data threshold value, the network device can be determined to be in a fault state. At this time, the state of the device is obtained, and if the device is in a normal state, the state of the device needs to be updated to a static state, so that the device can schedule the traffic according to a statistical scheduling policy to reasonably allocate the traffic to be suddenly increased. If the device is in a static state, the state of the device is not updated and marked.
In contrast, in this embodiment, if the specified index data of the present apparatus is equal to or greater than the corresponding data threshold, it may be determined that each index of the present apparatus is stable and should be in a normal state at this time. At this time, the state of the device is acquired, and if the device is in a stationary state, the state of the device needs to be updated to a normal state. If it is in a normal state, the state of the device is not re-marked. In other embodiments, when the specified index data may be only any one of the number of interfaces, the total flow of the device, or the number of sessions in the device, it may be determined that each index of the device is stable at this time when the index data is greater than the corresponding data threshold. When the specified index data can be only any two of the number of interfaces, the total flow of the equipment or the number of sessions in the equipment, the stability of each index of the equipment at the moment can be judged only when the two index data are larger than the corresponding data threshold value.
In step 2022, if the specified index data of the device is greater than or equal to the data threshold, when the device is in the stationary state, the state of the device is switched to the normal state.
Specifically, the step of updating the state of the device to the normal state includes:
and judging whether the smooth waiting timer is started or not. If not, the smooth waiting timer is started.
And when the smooth waiting timer reaches the timing time, the device is switched to a normal state.
By setting the smooth waiting timer, when the specified index data of the network device is greater than the corresponding data threshold value, the network device still needs to wait for a period of time and then switch to a normal state. Since the present apparatus, once switched to the normal state, schedules the received traffic according to the traffic scheduling policy (traffic attribute-based scheduling policy) corresponding to the normal state in the subsequent step. However, when the device has just recovered, re-brought online, the specified index data may already be greater than the corresponding data threshold, but the traffic it receives is still greater. If the state of the equipment is updated to be the normal state, the equipment is scheduled according to the scheduling strategy based on the traffic attribute, and the traffic in the link is oscillated. In order to avoid the above-mentioned problem, a smooth waiting timer is utilized, so that when the device just resumes and is on line again, that is, when the specified index data of the device just transitions from being smaller than the corresponding data threshold value to being greater than or equal to the corresponding data threshold value, a period of time may be waited first. During this time, the state of the device is more stationary.
In step 2023, if the specified index data of the device is greater than or equal to the data threshold, when the device is in the normal state, the state of the device is not updated, i.e. the state of the device is kept in the normal state and is not changed. It should be noted that this step is not shown in fig. 2.
In step 2024, if the specified index data of the device is smaller than the corresponding data threshold, when the device is in the normal state, the state of the device is updated to the static state.
Specifically, if the specified index data of the present device is smaller than the corresponding data threshold, the following steps are further executed:
further, it is determined whether the smooth waiting timer is started.
If yes, closing the smooth waiting timer.
If the smooth waiting timer is started, the state of the device is switched to the normal state once the smooth waiting timer reaches the timing time. After the equipment is recovered from the fault state, the smooth waiting timer is started after the specified index data is larger than or equal to the corresponding data threshold value. If the device fails to drop the line again under the condition that the smooth waiting timer does not reach the timing time yet, the specified index data is smaller than the corresponding data threshold value, and the device should adopt a preset statistical scheduling strategy to schedule the received flow. However, if the smooth waiting timer is not started at this time and is not closed in time, the smooth waiting timer continues to count, and once the count time is reached, the device is switched to the normal state and schedules the received traffic according to the traffic scheduling policy (the scheduling policy based on the traffic attribute) corresponding to the normal state. Then, after the equipment recovers from the fault state, the problem of flow surge occurs, and the flow cannot be distributed reasonably. Therefore, when the specified index data of the device is smaller than the corresponding data threshold, whether the smooth waiting timer is started or not needs to be judged in advance, if so, the smooth waiting timer needs to be closed first, so that the state of the device is ensured not to be updated in error, and the device is ensured to select a proper flow scheduling strategy to reasonably distribute the received flow.
In the present embodiment, the time duration of the smooth waiting timer may be any value within 1 minute or more and 10 minutes or less.
If the specified index data of the device is smaller than the data threshold, the state of the device is not updated if the device is in the stationary state, i.e. the state of the device is kept in the stationary state and is not changed, step 2025. It should be noted that this step is not shown in fig. 2.
Specifically, in this embodiment, the number of interfaces used in the device corresponds to 1 data threshold, the total flow of the device corresponds to 1K data threshold, and the number of sessions in the device corresponds to 10 data thresholds. Then, when the number of interfaces used in the device is greater than 1, the total flow of the device is greater than 1K, and the number of sessions in the device is greater than 10, it can be determined that the indexes of the device are stable at this time. Of course, the data threshold corresponding to the number of the interfaces to be used, the data threshold corresponding to the total flow, and the data threshold corresponding to the number of sessions may be adjusted according to the needs of the user and the usage scenario, and may be any other value.
Step 203, periodically monitoring the state of the device. It should be noted that, the period of detecting the specified index data of the device and the period of detecting the state of the device are both less than or equal to the timing duration of the smooth waiting timer, so that multiple times of detection can be performed on the specified index data in the process of reaching the timing time of the smooth waiting timer, thereby improving accuracy.
Step 204, when the device is in a static state, it is determined whether the traffic scheduling policy of the device is a scheduling policy based on the traffic attribute.
Step 205, if yes, the traffic scheduling policy is switched to a preset statistical scheduling policy.
And step 206, the device schedules the received traffic according to a preset statistical scheduling policy.
Step 207, when the device is in a normal state, determining whether the traffic scheduling policy of the device is a preset statistical scheduling policy.
And step 208, if yes, switching the flow scheduling strategy into a scheduling strategy based on the flow attribute.
In step 209, the device schedules the received traffic according to the scheduling policy based on the traffic attribute.
The traffic attribute based scheduling policy may be a minimum broadband usage based scheduling policy, and so on.
As described in connection with step 2024, the smooth waiting timer may be configured to wait for a period of time when the specified index data of the network device is greater than the corresponding data threshold, and then switch to a normal state, so that the device may schedule the received traffic according to the scheduling policy based on the traffic attribute. For example, when the device just recovers and is on line again, that is, when the specified index data of the device just transitions from being smaller than the corresponding data threshold value to being greater than or equal to the corresponding data threshold value, the received traffic is still larger. It may be possible to wait a certain period of time. During this time, the state of the device is more stationary. The device still schedules the received traffic according to a preset statistical scheduling policy so as to better distribute the surge traffic, thereby ensuring that the received traffic is scheduled according to the scheduling policy based on the traffic attribute after the traffic received by the device is stable. In other words, after the smooth waiting timer reaches the timing time, the state of the device is switched to the normal state, and at this time, the device schedules the received traffic according to the scheduling policy based on the traffic attribute.
Further, the method comprises the following steps:
and after the equipment is started, updating the state of the equipment into a static state.
When the equipment is just started, namely the equipment is just started, the flow of the equipment is also in a sharp-increasing state. The network equipment at the moment is updated to be in a static state, so that the equipment can schedule the received traffic by utilizing a preset statistical scheduling strategy, and reasonable traffic distribution is realized.
The invention also provides an embodiment of the flow scheduling device corresponding to the embodiment of the flow scheduling method.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present invention. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
As shown in fig. 3, the traffic scheduling apparatus 30 is applicable to a network device, and includes a state monitoring unit 31, a policy judging unit 32, a policy switching unit 33, and a traffic scheduling unit 34.
The state monitoring unit 31 is configured to periodically monitor a state of the device.
The policy determining unit 32 is configured to determine, when the device is in a static state, whether a traffic scheduling policy of the device is a scheduling policy based on a traffic attribute.
If yes, the policy switching unit 33 switches the traffic scheduling policy to a preset statistical scheduling policy.
The traffic scheduling unit 34 may schedule the received traffic according to the statistical scheduling policy.
The policy determining unit 32 is configured to determine a traffic scheduling policy of the device. If the device is in a static state and the traffic scheduling policy of the device is a scheduling policy based on the traffic attribute, the policy switching unit 33 is configured to switch the traffic scheduling policy to a preset statistical scheduling policy, so that the device schedules the received traffic according to the statistical scheduling policy. In other words, through the above arrangement, the traffic scheduling policy used by the device corresponds to the state of the device, so as to more reasonably distribute the traffic received by the device.
The policy determining unit 32 is further configured to determine whether the traffic scheduling policy of the device is a statistical scheduling policy when the device is in a normal state.
If so, the policy switching unit 33 switches the traffic scheduling policy to a scheduling policy based on the traffic attribute.
The traffic scheduling unit 34 may schedule the received traffic according to the traffic attribute based scheduling policy.
If the device is in a normal state and the traffic scheduling policy of the device is a traffic attribute-based scheduling policy, the policy switching unit 33 is configured to switch the traffic scheduling policy to the traffic attribute-based scheduling policy, so that the device is configured to schedule the received traffic according to the traffic attribute-based scheduling policy. In other words, through the above arrangement, the traffic scheduling policy used by the device corresponds to the state of the device, so as to more reasonably distribute the traffic received by the device.
For example, when the state of the present device is updated to a stationary state, the traffic scheduling policy corresponding to the state is a statistical scheduling policy. At this time, the device may reasonably allocate the received traffic according to the statistical scheduling policy. When the state of the device is updated to be a normal state, the traffic scheduling policy corresponding to the state is a scheduling policy based on traffic attributes. At this time, the device may reasonably allocate the received traffic according to the scheduling policy based on the traffic attribute. In this embodiment, the device may preferentially forward traffic from the link with the lowest usage rate so as to use each link in a balanced manner. The device can select different scheduling strategies according to different states of the device, reasonably distribute received traffic by using the selected scheduling strategies, and simultaneously use all links as uniformly as possible
Fig. 4 is a schematic structural diagram of another flow scheduling device according to an embodiment of the present invention, based on the device shown in fig. 3.
The traffic scheduling device 40 includes a data detecting unit 41, a state updating unit 42, a smooth waiting timer 43, a state monitoring unit 44, a policy judging unit 45, a policy switching unit 46, and a traffic scheduling unit 47.
Wherein the data detection unit 41 is configured to periodically detect the specified index data of the present apparatus.
The state updating unit 42 is configured to update the state of the device according to the specified index data.
The state updating unit 42 is specifically configured to determine a magnitude relation between the specified index data and the corresponding data threshold. If the specified index data of the equipment is smaller than the corresponding data threshold value, when the equipment is in a normal state, the state of the equipment is updated to be in a static state. If the specified index data of the equipment is greater than or equal to the corresponding data threshold value, when the equipment is in a static state, the state of the equipment is updated to be a normal state.
The actual state of the equipment is judged by judging the size relation between the designated index data and the corresponding data threshold value, and the state of the equipment is updated, so that the corresponding flow scheduling strategy is selected and used for reasonably distributing the received flow according to the state of the equipment.
The state updating unit 42 is also configured to determine whether the smooth waiting timer 43 is started. If not, the smooth waiting timer 43 is started. When the smooth waiting timer 43 reaches the counted time, the state of the own device is updated to the normal state.
By setting the smooth waiting timer, when the specified index data of the network device is greater than the corresponding data threshold value, the network device still needs to wait for a period of time and then switch to a normal state. Since the present apparatus, once switched to the normal state, schedules the received traffic according to the traffic scheduling policy (traffic attribute-based scheduling policy) corresponding to the normal state in the subsequent step. However, when the device has just recovered, re-brought online, the specified index data may already be greater than the corresponding data threshold, but the traffic it receives is still greater. If the state of the equipment is updated to be in a normal state, the equipment is scheduled according to a scheduling strategy based on the flow attribute, and the flow in the link is oscillated. In order to avoid the above-mentioned problem, a smooth waiting timer is utilized, so that when the device just resumes and is on line again, that is, when the specified index data of the device just transitions from being smaller than the corresponding data threshold value to being greater than or equal to the corresponding data threshold value, a period of time may be waited first. During this time, the state of the device is more stationary.
Further, if the specified index data of the present device is smaller than the corresponding data threshold, the state updating unit 42 is further configured to further determine whether the smooth waiting timer 43 is started. If so, the smooth waiting timer 43 is closed.
When the specified index data of the equipment is smaller than the corresponding data threshold value, whether the smooth waiting timer is started or not needs to be judged in advance, if so, the smooth waiting timer needs to be closed first so as to ensure that the state of the equipment cannot be updated in error, and therefore the equipment can select a proper flow scheduling strategy to reasonably distribute the received flow.
The status monitoring unit 44 is configured to periodically monitor the status of the device.
The policy determining unit 45 is configured to determine, when the device is in a static state, whether a traffic scheduling policy of the device is a scheduling policy based on a traffic attribute.
If yes, the policy switching unit 46 switches the traffic scheduling policy to a preset statistical scheduling policy.
The traffic scheduling unit 47 may schedule the received traffic according to the statistical scheduling policy.
The policy determining unit 45 is configured to determine a traffic scheduling policy of the device. If the device is in a static state and the traffic scheduling policy of the device is a scheduling policy based on the traffic attribute, the policy switching unit 46 is configured to switch the traffic scheduling policy to a preset statistical scheduling policy, so that the device schedules the received traffic according to the statistical scheduling policy. In other words, through the above arrangement, the traffic scheduling policy used by the device corresponds to the state of the device, so as to more reasonably distribute the traffic received by the device.
The policy determining unit 45 is further configured to determine whether the traffic scheduling policy of the device is a statistical scheduling policy when the device is in a normal state.
If yes, the policy switching unit 45 switches the traffic scheduling policy to a scheduling policy based on the traffic attribute.
The traffic scheduling unit 47 may schedule the received traffic according to the traffic attribute based scheduling policy.
Further, after the device is started, the state updating unit is further configured to update the state of the device to a static state.
When the equipment is just started, namely the equipment is just started, the flow of the equipment is also in a sharp-increasing state. The network equipment at the moment is updated to be in a static state, so that the equipment can schedule the received traffic by utilizing a preset statistical scheduling strategy, and reasonable traffic distribution is realized.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (14)

1. A traffic scheduling method, the method being applied to a network device, the method comprising:
periodically monitoring the state of the equipment;
when the equipment is in a static state, judging whether the flow scheduling strategy of the equipment is a scheduling strategy based on flow attributes; wherein the stationary state represents the device being in a fault phase or a start-up phase; the scheduling policy based on the traffic attribute is a scheduling policy for scheduling traffic to each link depending on the bandwidth usage of the link;
if yes, switching the flow scheduling strategy into a preset statistical scheduling strategy; the statistical scheduling strategy is a scheduling strategy which does not depend on the bandwidth use condition of the links and is used for scheduling the flow balance to each link through mathematical calculation;
and scheduling the received traffic according to the statistical scheduling strategy.
2. The method of claim 1, wherein when the device is in a normal state,
judging whether the flow scheduling strategy of the equipment is the statistical scheduling strategy or not;
if yes, switching the flow scheduling strategy into the scheduling strategy based on the flow attribute;
and scheduling the received traffic according to the scheduling strategy based on the traffic attribute.
3. The method of claim 1, wherein the method further comprises:
periodically detecting the appointed index data of the equipment;
and updating the state of the equipment according to the specified index data.
4. A method as claimed in claim 3, wherein the step of updating the state of the device in accordance with the specified index data comprises: judging the size relation between the specified index data and the corresponding data threshold value;
if the specified index data of the equipment is smaller than the corresponding data threshold value, updating the state of the equipment into a static state when the equipment is in a normal state;
if the specified index data of the equipment is greater than or equal to the corresponding data threshold value, when the equipment is in a static state, the state of the equipment is updated to be a normal state.
5. The method of claim 4, wherein the step of updating the state of the device to a normal state comprises:
judging whether a smooth waiting timer is started or not;
if not, starting the smooth waiting timer;
and when the smooth waiting timer reaches the timing time, updating the state of the equipment to be a normal state.
6. The method of claim 4, further comprising, if the specified index data of the device is less than the corresponding data threshold, performing the steps of:
further judging whether the smooth waiting timer is started;
if yes, closing the smooth waiting timer.
7. The method of claim 1, wherein the method further comprises:
and after the equipment is started, updating the state of the equipment into a static state.
8. A traffic scheduling apparatus applicable to a network device, the apparatus comprising:
the state monitoring unit is used for periodically monitoring the state of the equipment;
the policy judgment unit is used for judging whether the flow scheduling policy of the equipment is a scheduling policy based on the flow attribute when the equipment is in a static state; wherein the stationary state represents the device being in a fault phase or a start-up phase; the scheduling policy based on the traffic attribute is a scheduling policy for scheduling traffic to each link depending on the bandwidth usage of the link;
the strategy switching unit is used for switching the flow scheduling strategy into a preset statistical scheduling strategy if the flow scheduling strategy is the same; the statistical scheduling strategy is a scheduling strategy which does not depend on the bandwidth use condition of the links and is used for scheduling the flow balance to each link through mathematical calculation;
and the flow scheduling unit schedules the received flow according to the statistical scheduling strategy.
9. The apparatus of claim 8, wherein the policy determining unit is further configured to determine whether a traffic scheduling policy of the device is a statistical scheduling policy when the device is in a normal state;
the policy switching unit is used for switching the flow scheduling policy into the scheduling policy based on the flow attribute if the flow scheduling policy is the same;
and the flow scheduling unit schedules the received flow according to the scheduling strategy based on the flow attribute.
10. The apparatus of claim 8, wherein the apparatus further comprises:
the data detection unit is used for periodically detecting the specified index data of the equipment;
and the state updating unit is used for updating the state of the equipment according to the specified index data.
11. The apparatus of claim 10, wherein the status updating unit is specifically configured to:
judging the size relation between the specified index data and the corresponding data threshold value;
if the specified index data of the equipment is smaller than the corresponding data threshold value, updating the state of the equipment into a static state when the equipment is in a normal state;
if the specified index data of the equipment is greater than or equal to the corresponding data threshold value, when the equipment is in a static state, the state of the equipment is updated to be a normal state.
12. The apparatus of claim 11, wherein the status updating unit is further to:
judging whether a smooth waiting timer is started or not;
if not, starting the smooth waiting timer;
and when the smooth waiting timer reaches the timing time, updating the state of the equipment to be a normal state.
13. The apparatus of claim 11, wherein the status updating unit is further to:
if the specified index data of the device is smaller than the corresponding data threshold value, further judging whether the smooth waiting timer is started or not;
if yes, closing the smooth waiting timer.
14. The apparatus of claim 8, wherein the apparatus further comprises:
and the state updating unit is used for updating the state of the equipment into a static state after the equipment is started.
CN202010374211.7A 2020-05-06 2020-05-06 Traffic scheduling method and device Active CN111654448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010374211.7A CN111654448B (en) 2020-05-06 2020-05-06 Traffic scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010374211.7A CN111654448B (en) 2020-05-06 2020-05-06 Traffic scheduling method and device

Publications (2)

Publication Number Publication Date
CN111654448A CN111654448A (en) 2020-09-11
CN111654448B true CN111654448B (en) 2023-07-25

Family

ID=72347912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010374211.7A Active CN111654448B (en) 2020-05-06 2020-05-06 Traffic scheduling method and device

Country Status (1)

Country Link
CN (1) CN111654448B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6891798B1 (en) * 2000-02-02 2005-05-10 Cisco Technology, Inc. Estimating equivalent bandwidth capacity for a network transport device using on-line measurements
KR20160026133A (en) * 2014-08-29 2016-03-09 영남대학교 산학협력단 Method of Load balancing for wireless network system
WO2016192205A1 (en) * 2015-06-01 2016-12-08 中兴通讯股份有限公司 Method and device for determining state of network equipment
CN106789658A (en) * 2016-12-29 2017-05-31 南京邮电大学 Satellite MPLS network flow equalization method based on SDN controllers
CN110601989A (en) * 2019-09-24 2019-12-20 锐捷网络股份有限公司 Network traffic balancing method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7940661B2 (en) * 2007-06-01 2011-05-10 Cisco Technology, Inc. Dynamic link aggregation
EP2400698B1 (en) * 2009-02-23 2015-10-14 Mitsubishi Electric Corporation Communication apparatus, communication system, and band allocating method
CN104717158B (en) * 2015-03-02 2019-03-05 中国联合网络通信集团有限公司 A kind of method and device adjusting bandwidth scheduling strategy
CN105939280A (en) * 2015-08-27 2016-09-14 杭州迪普科技有限公司 Flow scheduling method and device
CN106411766A (en) * 2016-09-30 2017-02-15 赛特斯信息科技股份有限公司 Flow scheduling system and method based on SDN
CN109327401B (en) * 2017-08-01 2022-02-25 北京亿阳信通科技有限公司 Flow scheduling method and system of SDN (software defined network)
CN110611577A (en) * 2018-06-14 2019-12-24 中兴通讯股份有限公司 Service fast switching method, switching device, network equipment and storage medium
CN108768877B (en) * 2018-07-20 2021-06-22 网宿科技股份有限公司 Distribution method and device of burst traffic and proxy server
CN110620736B (en) * 2019-10-23 2022-08-26 杭州迪普科技股份有限公司 Method and device for flow scheduling

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6891798B1 (en) * 2000-02-02 2005-05-10 Cisco Technology, Inc. Estimating equivalent bandwidth capacity for a network transport device using on-line measurements
KR20160026133A (en) * 2014-08-29 2016-03-09 영남대학교 산학협력단 Method of Load balancing for wireless network system
WO2016192205A1 (en) * 2015-06-01 2016-12-08 中兴通讯股份有限公司 Method and device for determining state of network equipment
CN106789658A (en) * 2016-12-29 2017-05-31 南京邮电大学 Satellite MPLS network flow equalization method based on SDN controllers
CN110601989A (en) * 2019-09-24 2019-12-20 锐捷网络股份有限公司 Network traffic balancing method and device

Also Published As

Publication number Publication date
CN111654448A (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN102067523B (en) Failover and failback of communication between a router and a network switch
US9197577B2 (en) Policy control method and system, and relevant apparatus
CN104126285A (en) Method and apparatus for rapid disaster recovery preparation in a cloud network
CN103944746A (en) Hot standby method and device
US10708155B2 (en) Systems and methods for managing network operations
CN112491700B (en) Network path adjustment method, system, device, electronic equipment and storage medium
CN112653575B (en) Network configuration method, controller and flow guiding system
CN109151082A (en) A kind of multi-connection method for building up, device and system
CN113656168A (en) Method, system, medium and equipment for automatic disaster recovery and scheduling of traffic
US20220053373A1 (en) Communication apparatus, communication method, and program
CN111654448B (en) Traffic scheduling method and device
WO2017059904A1 (en) Anomaly detection in a data packet access network
US10439941B2 (en) Determining switch load values for switches
Li et al. High availability for non-stop network controller
CN107846294B (en) Main/standby service switching method and device
CN106411731A (en) Method and device of self-negotiation link aggregation control protocol (LACP) reference system and reference port
CN110380981B (en) Flow distribution method and equipment
CN110224872B (en) Communication method, device and storage medium
CN104253747A (en) Transmission method and transmission device for performing 1: 1 protection on message in link aggregation group
CN109587520A (en) A kind of method and apparatus of positioning video traffic failure
CN101340435B (en) Method and apparatus for control peer-to-peer protocol link of multiple link
CN104836679B (en) Communication abnormality processing method and network element device
CN102752189B (en) A kind of method and apparatus processing message
Xu et al. Minimizing multi-controller deployment cost in software-defined networking
CN108762925A (en) A kind of management method and system of storage device application program

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