CN110620736B - Method and device for flow scheduling - Google Patents

Method and device for flow scheduling Download PDF

Info

Publication number
CN110620736B
CN110620736B CN201911012267.1A CN201911012267A CN110620736B CN 110620736 B CN110620736 B CN 110620736B CN 201911012267 A CN201911012267 A CN 201911012267A CN 110620736 B CN110620736 B CN 110620736B
Authority
CN
China
Prior art keywords
state
network device
target network
network equipment
scheduling group
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
CN201911012267.1A
Other languages
Chinese (zh)
Other versions
CN110620736A (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 CN201911012267.1A priority Critical patent/CN110620736B/en
Publication of CN110620736A publication Critical patent/CN110620736A/en
Application granted granted Critical
Publication of CN110620736B publication Critical patent/CN110620736B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • 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
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling

Abstract

The application provides a method and a device for traffic scheduling. According to the method and the device, on the basis of the existing scheduling group, whether the network equipment is in the oscillation state is detected, and the network equipment in the oscillation state is set to be forbidden to be added to the scheduling group according to the detection result, so that the network equipment in flow oscillation is prevented from being frequently moved in and out of the scheduling group, the flow of the same service is guaranteed to be distributed to the same network equipment in the scheduling group for processing, and the service flow is prevented from being lost.

Description

Traffic scheduling method and device
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method and an apparatus for traffic scheduling.
Background
The load balancing technology is to uniformly distribute externally transmitted traffic to each network device in a load balancing system through a certain load balancing strategy, and each network device processes the traffic. In order to ensure the stability and integrity of service execution, the load balancing device will generally allocate the traffic of the same service to the same network device for processing.
The load balancing system comprises a network equipment cluster and load balancing equipment. The network equipment cluster consists of a plurality of network equipment, and each network equipment provides the same or similar network service; and the load balancing equipment distributes the service traffic to the network equipment in a scheduling group according to the configured load balancing strategy so as to process the service traffic, wherein the scheduling group is formed by the network equipment in an UP state in the network equipment cluster.
In the existing load balancing technology, on one hand, when a network device in a scheduling group goes DOWN, the load balancing device moves the network device out of the scheduling group and does not schedule traffic to the network device, and when the network device changes from a DOWN state to an UP state, the load balancing device moves the network device into the scheduling group and schedules traffic to the network device. However, if the network device oscillates between UP and DOWN, the network device is frequently moved into and out of the scheduling group. On the other hand, if the network device that has not completed the service processing of a certain service is moved out of the scheduling group, the subsequent traffic of the service will not be scheduled to the network device, so that the service traffic will be lost. Therefore, from the above two aspects, it can be seen that when a network device is frequently moved into and out of the scheduling group, traffic loss is easily caused.
Disclosure of Invention
In view of the above technical problems, the present application provides a method and an apparatus for traffic scheduling, which can effectively reduce loss of service traffic.
According to a first aspect of the present application, there is provided a method for traffic scheduling, the method comprising:
monitoring the state of each network device in each scheduling group;
if the normal target network equipment in the scheduling group is monitored to be changed from the UP state to the DOWN state, counting the times of changing the UP state of the target network equipment to the DOWN state of the target network equipment from the UP state within a first preset time period;
if the counted times are greater than a preset time threshold, the target network equipment is set to be prohibited from being added to the scheduling group;
and carrying out load sharing on the received service flow according to the scheduling group.
According to a second aspect of the present application, there is provided an apparatus for traffic scheduling, the apparatus comprising:
the monitoring unit is used for monitoring the state of each network device in each scheduling group;
the statistical unit is used for counting the times of changing the UP state of the target network equipment into the DOWN state from the UP state of the target network equipment within a first preset time length from the time when the UP state of the target network equipment is changed into the DOWN state when the normal target network equipment in the scheduling group is monitored to be changed into the DOWN state from the UP state;
a setting unit, configured to set the target network device to be prohibited from being added to the scheduling group when the counted number of times is greater than a preset number threshold;
and the scheduling unit is used for carrying out load sharing on the received service flow according to the scheduling group.
According to the scheme provided by the application, the load balancing equipment can monitor the state of each network equipment in each scheduling group; if it is monitored that the normal target network equipment in the scheduling group is changed from the UP state to the DOWN state, counting the times of changing the UP state of the target network equipment to the DOWN state of the target network equipment from the UP state within a first preset time period from the time when the UP state of the target network equipment is changed to the DOWN state. And if the load balancing equipment determines that the counted times are greater than a preset time threshold, determining that the target network equipment is the network equipment in the oscillation state, and setting the network equipment in the oscillation state as forbidden to be added to the scheduling group.
On the basis of the existing scheduling group, whether the network equipment is in the oscillation state is detected, and the network equipment in the oscillation state is set to be prohibited to be added to the scheduling group according to the detection result, so that the network equipment in flow oscillation is prevented from being frequently moved in and out of the scheduling group, the flow of the same service is guaranteed to be distributed to the same network equipment in the scheduling group for processing, and the service flow is prevented from being lost.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to these drawings.
FIG. 1 is a schematic diagram of an application scenario shown in an exemplary embodiment of the present application;
fig. 2 is a flowchart illustrating a traffic scheduling method according to an exemplary embodiment of the present application;
fig. 3 is a flow chart illustrating another traffic scheduling method according to an exemplary embodiment of the present application;
fig. 4 is a timing diagram illustrating a traffic scheduling method according to an exemplary embodiment of the present application;
fig. 5 is a timing diagram illustrating another traffic scheduling method according to an exemplary embodiment of the present application;
fig. 6 is a hardware structure diagram of a load balancing apparatus according to an exemplary embodiment of the present application;
fig. 7 is a block diagram of a traffic scheduling apparatus according to an exemplary embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the embodiments of the present specification, the technical solutions in the embodiments of the present specification will be described in detail below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of protection.
Referring to fig. 1, fig. 1 is a schematic diagram of an application scenario shown in an exemplary embodiment of the present application, where a load balancing system shown in the diagram includes a load balancing device and a network device cluster.
The network device cluster includes a plurality of network devices, wherein each network device provides the same or similar function services. Such as network device 1, network device 2, and network device 3 in fig. 1, all provide services with the same or similar functions, and these three network devices form a network device cluster in the load balancing system shown in fig. 1.
And the network devices in the UP state in the network device cluster form a scheduling group. As shown in fig. 1, network device 1 and network device 2 are in an UP state, and network device 3 is in a DOWN state, then network device 1 and network device 2 form a scheduling group in the load balancing system.
The load balancing device is at least deployed in the load balancing system, and the load balancing device can be communicated with and interact with all network devices in the network device cluster. As shown in fig. 1, the load balancing device can communicate with the network between network devices 1-3 and can interact with these network devices.
In the operation process of the load balancing system, the load balancing equipment carries out load sharing on the received service flow according to the scheduling group. After receiving the external traffic, the load balancing device allocates the traffic to the network devices in the scheduling group according to the configured load balancing policy (e.g., polling, minimum connection number, etc.). After receiving the service traffic, the network device interacts with the external device independently to process the service.
For example, as in the load balancing system shown in fig. 1, it is assumed that only network device 1 and network device 2 are in the current scheduling group, and the number of connections on network device 1 is much smaller than that of network device 2. And after receiving the external service traffic, the load balancing device queries a currently configured load balancing policy, and if the configured load balancing policy is the minimum connection number, allocates the current service traffic to the network device 1 with the minimum current connection number in the scheduling group. After receiving the scheduling message, the network device 1 will process the service independently.
The existing scheduling group setting mode is as follows:
the load balancing device may monitor the status of each network device in the scheduling group, move the network device that is changed from the UP status to the DOWN status out of the scheduling group according to the monitored status of the network device, and move the network device that is changed from the DOWN status to the UP status into the scheduling group.
For example, in the load balancing system shown in fig. 1, in the initial state, the scheduling group is composed of the network device 1 and the network device 2 in the UP state. When the network device 2 stops service processing due to insufficient performance, network disconnection, and the like, the load balancing device may detect that the network device 2 is changed from the UP state to the DOWN state, and at this time, the load balancing device moves the network device 2 out of the scheduling group. Similarly, when the network device 2 is restored from the DOWN state to the UP state, the load balancing device moves it into the scheduling group.
However, the existing method for setting the scheduling group is very prone to cause the problem of traffic loss, because:
first, a single service often requires multiple interactions between the network device in the scheduling group and the external device initiating the service, and subsequent interactions generally require processing results of the previous interactions. Therefore, in order to ensure the integrity of the network device processing the service, the load balancing device needs to schedule the service traffic of the same service to the same network device in the scheduling group.
If the subsequent traffic of the single service is not scheduled to other network devices according to the scheduling rule, the network device processing the subsequent interaction cannot know the processing results of the previous interactions, so that the network device cannot normally interact with external devices, and finally the traffic is lost.
For example, in fig. 1, it is assumed that the load balancing device allocates the traffic flow of the service 1 to the network device 1 in the scheduling group. The network device 1 starts processing the service 1 and interacts with the external device originating the service 1. The subsequent load balancing device will schedule all the traffic related to the service 1 to the network device 1. If the load balancing device schedules the subsequent traffic of the service 1 to the network device 2, the network device 2 may not know the processing result of the previous interaction, which may eventually cause the service to fail.
Secondly, for a network device oscillating between an UP state and a DOWN state (herein, simply referred to as an oscillating state network device), the load balancing device may frequently move it into or out of the scheduling group.
Taking fig. 1 as an example, if the network device 1 oscillates between UP and DOWN due to repeated restart, network fluctuation, etc., it will be frequently moved into/out of the scheduling group.
Because the existing mode for setting the scheduling group can cause the network device in the oscillation state to be frequently moved in and out of the scheduling group, the problem that the load balancing device cannot schedule all traffic of the same service to the same network device easily occurs, thereby causing the loss of service traffic.
In view of the above, the present application provides a new method for setting a scheduling group. According to the method and the device, on the basis of the existing scheduling group, whether the network equipment is in the oscillation state is detected, and the network equipment in the oscillation state is set to be forbidden to be added to the scheduling group according to the detection result, so that the network equipment in flow oscillation is prevented from being frequently moved in and out of the scheduling group, the flow of the same service is guaranteed to be distributed to the same network equipment in the scheduling group for processing, and the service flow is prevented from being lost.
Referring to fig. 2, fig. 2 is a flow scheduling method according to an exemplary embodiment of the present application.
As shown in fig. 2, the method comprises the following steps:
step S201: and monitoring the state of each network device in each scheduling group.
The load balancing device periodically obtains the operating conditions of all the network devices in the scheduling group, so as to determine that the network devices are in an UP state or a DOWN state, specifically taking the following two ways as examples.
The first method is as follows: the load balancing equipment periodically initiates a query request to the network equipment in the scheduling group to acquire the running condition of the network equipment.
Optionally, the load balancing device periodically initiates an operation status query request to the network devices in the scheduling group, and if the network devices reply their own operation statuses, the load balancing device may determine that the network devices are in an UP state or a DOWN state based on the operation statuses of the network devices; if the network device does not reply the query request for many times, the network device is judged to be in the DOWN state.
The following illustrates an example that "the load balancing device determines that each network device is in an UP state or a DOWN state based on the operating condition of the network device".
For example, the network device may reply its own operation parameters (e.g., CPU utilization, memory utilization, network utilization, etc.), and compare the acquired operation parameters with a preset parameter threshold, thereby determining the operation state of the network device. If the operation parameter is larger than the preset threshold value, judging that the network equipment is in a DOWN state; and if the operation parameter is not greater than the preset threshold value, judging that the network equipment is in an UP state.
The second method comprises the following steps: the load balancing device periodically initiates a query request to other devices (such as a health check device) in the load balancing system to obtain the operation condition of the network device.
The health check device may interact with the network devices in the network device cluster according to a preset method, obtain the operation conditions of the network devices, and determine that the network devices are in the UP state or the DOWN state based on the operation conditions, where the specific determination method is the same as the method in the first mode, "the load balancing device determines that the network devices are in the UP state or the DOWN state based on the operation conditions of the network devices", and details are not described here again. Alternatively, the health check device may be a separate network device deployed in the load balancing system, or may be another functional module operating on the same device as the load balancing device.
Similarly, the load balancing device may periodically initiate an inquiry request carrying a network device identifier (e.g., a network device IP address) to the health check device, and after receiving the inquiry request, the health check device responds according to the network device identifier in the inquiry request, where the response message at least carries an operation state (e.g., an UP state or a Down state) of the network device requested by the load balancing device. Based on the network device operational status replied by the health check device, the load balancing device may determine that the network device in the scheduling group is in an UP state or a DOWN state.
Step S202: if the normal target network equipment in the scheduling group is monitored to be changed from the UP state to the DOWN state, counting the times of changing the UP state of the target network equipment to the DOWN state of the target network equipment from the UP state within a first preset time period from the time when the UP state of the target network equipment is changed to the DOWN state.
In the embodiment of the present application, the schedule group includes normal network devices and abnormal network devices.
The normal network device is: and scheduling the network devices which are not in the counting number of times of changing from the UP state to the DOWN state in the group. It is understood that this includes both network devices that are UP from the beginning of monitoring; network devices that have completed current statistics of a first predetermined duration despite the occurrence of the DOWN state are also included.
The abnormal network device is as follows: devices have appeared which change from UP to DOWN and are being counted the number of times the UP state is changed to DOWN state.
The following describes a manner in which the load balancing device determines the normal target network device in the scheduling group:
the abnormal network device in the present application is configured with a designation flag. When the load balancing device detects that the network device is changed from the UP state to the DOWN state each time, whether the network device is configured with the designated mark or not is checked, and if the network device is not configured with the designated mark, the network device is determined to be a normal target network device.
Optionally, the specified flag may be to add or modify an attribute parameter of the network device, or record the network device in a list, and only needs to distinguish whether the network device is a normal network device, which is not limited herein.
The following describes the manner of "counting the number of times that the target network device changes from the UP state to the DOWN state":
in this embodiment, when monitoring that a network device changes from an UP state to a DOWN state, a load balancing device may determine whether the network device carries an assigned flag. If the network equipment carries the designated mark, the network equipment is indicated to be abnormal network equipment; if the network device does not carry the designated mark, the network device is indicated to be a normal network device, the designated mark is configured on the network device, and the times of changing the state of the network device from the UP state to the DOWN state within the first preset time from the moment are counted.
Correspondingly, after the statistics is finished, the specified mark is deleted, so that the network equipment after the statistics is finished is still normal network equipment.
Step S203: and if the counted times are greater than a preset time threshold, setting the target network equipment to be prohibited from being added to the scheduling group.
The time threshold may be set by the user according to an actual requirement, and the time threshold is used to determine whether the network device is in the oscillation state under the condition that the first preset duration in step S202 is certain. It can be understood that, the smaller the frequency threshold is, the less the minimum frequency that the network device is changed from UP to DOWN required when the network device vibrates is determined, and the higher the requirement of the load balancing system on the stability of the network device is; the larger the frequency threshold is, the more the minimum frequency that the network equipment is changed from UP to DOWN required when the network equipment vibrates is determined to be, and the lower the requirement of the load balancing system on the stability of the network equipment is.
In step S202, a statistical result of the number of times that the normal network device changes from UP to DOWN within the first preset time period has been obtained. In step S203, the statistical result is compared with a preset threshold value. And if the statistical result is greater than the frequency threshold value, judging that the network equipment is unstable in current operation and in a vibration state. Further, the network device whose load balancing device sets the oscillation state is prohibited from being added to the scheduling group.
There are many specific ways to set network device barring for being added to a dispatch group, two examples of which are given below.
In one embodiment, the load balancing device may establish a blacklist entry, and network devices in the blacklist may not be moved into the scheduling group. And when the load balancing equipment judges that the network equipment is in the oscillation state, the network equipment is moved into a blacklist.
In another embodiment, the load balancing device configures a prohibition flag for the network device in the oscillation state, and the network device configured with the prohibition flag is not moved into the scheduling group.
Here, the "setting of the network device prohibited from being added to the scheduling group" is merely exemplified and is not particularly limited.
It should be noted that, when the network device is determined to be in the oscillation state and is set to be prohibited from being added to the scheduling group, the load balancing device does not move the network device into the scheduling group even if the network device is in the UP state.
Step S204: and carrying out load sharing on the received service flow according to the scheduling group.
When receiving the external traffic, the load balancing device queries the configured load balancing policy (e.g., polling, minimum connection number, etc.), selects a network device in the scheduling group that meets the condition, and allocates the traffic to the network device.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the flow shown in fig. 2, in the present application, on the basis of the existing scheduling group, whether the network device is in the oscillation state is detected, and the network device in the oscillation state is set to be prohibited from being added to the scheduling group according to the detection result, so that the network device in the flow oscillation is not frequently moved into and out of the scheduling group, and it is ensured that the flow of the same service can be allocated to the same network device in the scheduling group for processing, thereby avoiding the loss of the service flow.
In this application, after the network device in the oscillation state is set to be prohibited from being added to the scheduling group, if the condition that the network device maintains the UP state within a second preset time period from the specified starting time is met, the setting may be released.
When detecting whether the network device satisfies the above condition, firstly, it needs to consider that the operation state of the target network device when it is set to prohibit adding to the scheduling group is an UP state or a DOWN state, and a specific detection method is described below, as shown in fig. 3:
step S301: the load balancing device monitors the status of network devices set to refrain from adding to the dispatch group.
The method for monitoring the status of the network device can refer to step 201, and is not described herein again.
Step S302: and the load balancing equipment detects whether the state of the target network equipment is an UP state at the specified starting moment.
The load balancing device takes the time when the target network device is prohibited from being added to the scheduling group as the designated starting time. The specified starting time may be updated in the subsequent step, and the specific updating method is described in step S306, which is not described herein again.
Then, the load balancing device may detect the operating state of the target network device at the specified start time.
For example, the load balancing device may detect whether the target network device is in an UP state or a Down state at a specified start time.
If the network device is in the UP state at the designated start time, step S303 is executed.
If the network device is in the DOWN state at the specified start time, step S305 is executed.
Step S303: and the load balancing equipment detects whether the target network equipment is changed from the UP state to the DOWN state within a second preset time period from the specified starting time.
The second preset time period may be set to be positively correlated with the counted number in step S202, for example, the second preset time period is a product of the counted number and the first preset time period or is directly proportional to the product.
The method for setting the second preset duration can ensure that the network equipment in the scheduling group operates stably and can also ensure the utilization rate of the network equipment. Specifically, the more the number of times is counted, the higher the oscillation degree of the network device is, so that the setting of the second preset time is longer, and the network device can be ensured to be in a relatively more stable state when the setting is released; on the contrary, the smaller the counted times, the lower the oscillation degree of the network device is, so that the second preset time is set to be shorter, and the utilization rate of the network device can be ensured.
The meaning and subsequent processing manner of the detection result in step S303 are described as follows:
if the network device changes from the UP state to the DOWN state within a second preset time period from the specified starting time, which indicates that the network device is still in an unstable state, step S305 is executed.
If the network device is not changed from the UP state to the DOWN state within the second preset time period from the designated start time, which indicates that the network device meets the condition that the UP state is maintained within the second preset time period from the designated start time, it is considered that the network device has recovered the stable operation and is no longer in the oscillation state, and step S304 is executed.
Step S304: the load balancing device releases the setting prohibiting the target network device from being added to the dispatch group.
The method of releasing the setting corresponds to the method of "setting the network device prohibited from being added to the scheduling group" in step S203, and is not particularly limited herein. For example, if the setting method is to move the target network device into the blacklist, the unsetting method is to move the target network device out of the blacklist; if the setting method is to configure the prohibition flag for the target network device, the unsetting method is to delete the prohibition flag of the target network device. It should be noted that, after the setting is released, the load balancing device may move the network device into the scheduling group again.
Step S305: the load balancing device detects whether the target network device is changed from the DOWN state to the UP state within a second preset time period from the specified starting time.
There are two cases for the DOWN state.
In the first case: if the target network device is set to be in the DOWN state when it is prohibited to add to the scheduling group, the operation state of the network device is detected, and step 306 is executed after the state of the network device is detected to be changed from the DOWN state to the UP state.
In the second case: after the target network device is set to prohibit adding to the scheduling group, if the UP state is changed to the DOWN state at least once, the operation state of the network device is continuously detected, and after the network device is detected to be changed from the DOWN state to the UP state, step 306 is executed.
Step S306: and the load balancing equipment updates the appointed starting time to the time when the target network equipment is changed from the DOWN state to the UP state.
After the target network device is set to prohibit addition to the scheduling group, at least one time of change from the DOWN state to the UP state occurs, the step updates the designated start time to the latest time of change from the DOWN state to the UP state, and returns to step S303.
Therefore, this step can extend the set time and recheck whether the apparatus resumes the stable operation through step S303. The flow shown in fig. 3 is completed.
From the above, it can be seen that, in the present application, by detecting the state of the network device set as prohibited to be added to the scheduling group, it is determined whether the network device has recovered to be stable, so that the network device that operates stably is set up again to be added to the scheduling group. Therefore, the method and the device ensure the utilization rate of the network equipment on the basis of avoiding the loss of the service flow, and the network equipment cannot be idle due to accidental oscillation.
The following describes the traffic scheduling method in detail by referring to fig. 4 and 5 in detail through specific examples.
A specific embodiment 1 for implementing the method of the present application is described below by using a timing chart shown in fig. 4, in this embodiment, the target network device is in an UP state when it is set to prohibit adding to the scheduling group:
in the illustration, a high level indicates that the network device is in an UP state and a low level indicates that the network device is in a DOWN state.
t 40 Before the moment, when the network device is in the UP state, the network device is in a scheduling group of a load balancing system.
t 40 At this moment, the load balancing device detects that the network device is changed from the UP state to the DOWN state, and meanwhile, judges that the network device does not carry the designated mark, which indicates that the network device is a normal network device, configures the designated mark for the network device, and identifies that the network device is an abnormal network device currently in a statistical process. t is t 40 -t 41 The duration is a first preset duration, and t is counted 40 -t 41 The number of times N that the network device changes from UP to DOWN within the duration.
And after the statistics is finished, deleting the specified mark.
Assuming that the statistical number N is greater than the number threshold, it indicates that the network device is currently in the oscillation state. With t 41 To specify the starting time, from t 41 From time to time, the network device is set to refrain from adding to the dispatch group.
t 41 At the moment, the network equipment is in an UP state, and then the slave t is judged 41 And whether the network equipment is changed from the UP state to the DOWN state within a second preset time length from the moment.
As shown, t 41 -t 42 The duration is less than a second preset duration, and the equipment is at t 42 And changing the UP state to the DOWN state again at the moment, which indicates that the network equipment does not recover to stably operate, and continuously detecting whether the network equipment is changed from the DOWN state to the UP state.
In this example, t 43 At this time, the load balancing device detects that the network device is changed from the DOWN state to the UP state.
At this time, the update designation start time is t 43 And continues to detect the slave t 43 And whether the network equipment is changed from the UP state to the DOWN state within a second preset time length.
Until t 44 Time of day t 43 -t 44 And the time length is a second preset time length, the network equipment is always in an UP state in the time length, and the state is not changed from the UP state to the DOWN state, so that the setting that the network equipment is forbidden to be added to the scheduling group is released.
So far, the flow shown in FIG. 4 ends, t 44 After the time, the network device may be added to the dispatch group. And the load balancing equipment carries out load sharing on the received service flow according to the scheduling group.
Another specific embodiment 2 for implementing the method of the present application is described below by using a timing diagram shown in fig. 5, in this embodiment, the target network device is in a DOWN state when it is set to prohibit addition to the scheduling group:
t 51 before the moment, the executed steps are t in FIG. 4 41 The time is the same, and is not described in detail herein.
Until t 51 At a time, the network device is set to refrain from adding to the dispatch group, where t 51 The time is a designated starting time.
t 51 At the moment, judging that the network equipment is in the DOWN state, and detecting whether the network equipment is changed from the DOWN state to the UP state.
In this example, t is detected 52 At that point, the network device becomes an UP state.
At this time, the update designation start time is t 52 And continues to detect the slave t 52 And whether the network equipment is changed from the UP state to the DOWN state within a second preset time length.
Until t 53 Time of day t 52 -t 53 And the time length is a second preset time length, the network equipment is always in an UP state in the time length, and the state is not changed from the UP state to the DOWN state, so that the setting that the network equipment is forbidden to be added to the scheduling group is released.
At this point, the process illustrated in FIG. 5 ends, t 53 After the time, the network device may be added to the dispatch group. Load balancing deviceAnd carrying out load sharing on the received service flow according to the scheduling group.
Referring to fig. 6, fig. 6 is a hardware structure diagram of a load balancing device according to an exemplary embodiment of the present application.
The load balancing apparatus includes: a communication interface 601, a processor 602, a machine-readable storage medium 603, and a bus 604; wherein the communication interface 601, the processor 602, and the machine-readable storage medium 603 communicate with each other via a bus 604. The processor 602 may perform the traffic scheduling method described above by reading and executing machine executable instructions corresponding to traffic scheduling control logic in the machine readable storage medium 603.
The machine-readable storage medium 603 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: volatile memory, non-volatile memory, or similar storage media. In particular, the machine-readable storage medium 603 may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., a compact disk, a DVD, etc.), or similar storage medium, or a combination thereof.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 7, fig. 7 is a block diagram illustrating a traffic scheduling apparatus according to an exemplary embodiment of the present application. The apparatus may be applied to the load balancing device shown in fig. 6, and the apparatus may include:
a monitoring unit 701, configured to monitor a state of each network device in each scheduling group;
a counting unit 702, configured to count, when it is monitored that a normal target network device in a scheduling group changes from an UP state to a DOWN state, a number of times that the target network device changes from the UP state to the DOWN state within a first preset time period from when the target network device changes from the UP state to the DOWN state;
a setting unit 703, configured to set that the target network device is prohibited from being added to the scheduling group when the counted number of times is greater than a preset number threshold;
a scheduling unit 704, configured to perform load sharing on the received service traffic according to the scheduling group.
Optionally, the apparatus further comprises:
a detecting unit 705 (not shown in fig. 7) configured to detect whether the target network device is always in an UP state within a second preset time period from a specified starting time; the specified starting time is set to a time at which the target network device is prohibited from being added to a dispatch group;
a setting releasing unit 706 (not shown in fig. 7) configured to release the setting that the target network device is prohibited from being added to the scheduling group when the target network device is always in the UP state for a second preset time period from the specified start time.
Optionally, the detection unit further comprises:
if the target network device is not always in the UP state within a second preset time period from the specified starting time, the detection unit is further configured to detect whether the target network device is changed from the DOWN state to the UP state within the second preset time period from the specified starting time;
if the target network device changes from the DOWN state to the UP state, the detecting unit is further configured to update the specified start time to a time when the target network device changes from the DOWN state to the UP state, and return to the step of detecting whether the target network device is always in the UP state within a second preset duration from the specified start time.
As an embodiment, when it is monitored that a normal target network device in a scheduling group changes from an UP state to a DOWN state, the statistical unit is configured to mark the target network device as an abnormal network device.
As an embodiment, the second preset time duration is positively correlated with the number of times that the target network device changes from an UP state to a DOWN state within the first preset time duration.
The block diagram of the apparatus shown in fig. 7 is thus completed.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for traffic scheduling is applied to a load balancing device, and the method comprises the following steps:
monitoring the state of each network device in each scheduling group;
if the normal target network equipment in the scheduling group is monitored to be changed from the UP state to the DOWN state, counting the times of changing the UP state of the target network equipment to the DOWN state of the target network equipment from the UP state within a first preset time period;
if the counted times are greater than a preset time threshold, the target network equipment is set to be prohibited from being added to the scheduling group;
and carrying out load sharing on the received service flow according to the scheduling group.
2. The method of claim 1, further comprising, after said setting the target network device barring from being added to the dispatch group:
detecting whether the target network equipment is always in an UP state within a second preset time from the appointed starting time; the specified starting time is set to a time at which the target network device is prohibited from being added to a dispatch group;
and if so, releasing the setting of forbidding the target network equipment from being added to the scheduling group.
3. The method of claim 2, further comprising:
if not, detecting whether the target network equipment is changed from the DOWN state to the UP state within a second preset time from the specified starting time;
and if the target network equipment is changed from the DOWN state to the UP state, updating the appointed starting time to the time when the target network equipment is changed from the DOWN state to the UP state, and returning to the step of detecting whether the target network equipment is always in the UP state within a second preset time period from the appointed starting time.
4. The method of claim 1, wherein when it is monitored that a normal target network device in the scheduling group changes from an UP state to a DOWN state, the method further comprises:
and marking the target network equipment as abnormal network equipment.
5. The method of claim 2 or 3, wherein the second predetermined duration positively correlates to the number of times the target network device changes from an UP state to a DOWN state within the first predetermined duration.
6. An apparatus for traffic scheduling, applied to a load balancing device, the apparatus comprising:
the monitoring unit is used for monitoring the state of each network device in each scheduling group;
the statistical unit is used for counting the times of changing the UP state of the target network equipment into the DOWN state from the UP state of the target network equipment within a first preset time length from the time when the UP state of the target network equipment is changed into the DOWN state when the normal target network equipment in the scheduling group is monitored to be changed into the DOWN state from the UP state;
a setting unit, configured to set the target network device to be prohibited from being added to the scheduling group when the counted number of times is greater than a preset number threshold;
and the scheduling unit is used for carrying out load sharing on the received service flow according to the scheduling group.
7. The apparatus of claim 6, further comprising:
the detection unit is used for detecting whether the target network equipment is always in an UP state within a second preset time length from the appointed starting time; the specified starting time is set to a time at which the target network device is prohibited from being added to a dispatch group;
and the setting releasing unit is used for releasing the setting of prohibiting the target network equipment from being added to the scheduling group when the target network equipment is always in an UP state within a second preset time from the specified starting time.
8. The apparatus of claim 7, wherein the detection unit further comprises:
if the target network device is not always in the UP state within a second preset time period from the specified starting time, the detection unit is further configured to detect whether the target network device is changed from the DOWN state to the UP state within the second preset time period from the specified starting time;
if the target network device changes from the DOWN state to the UP state, the detecting unit is further configured to update the specified start time to a time when the target network device changes from the DOWN state to the UP state, and return to the step of detecting whether the target network device is always in the UP state within a second preset time period from the specified start time.
9. The apparatus of claim 6, wherein the statistics unit is configured to mark a normal target network device in the dispatch group as an abnormal network device upon detecting the target network device changes from an UP state to a DOWN state.
10. The apparatus of claim 7 or 8, wherein the second predetermined duration positively correlates to the number of times the target network device changes from an UP state to a DOWN state within the first predetermined duration.
CN201911012267.1A 2019-10-23 2019-10-23 Method and device for flow scheduling Active CN110620736B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911012267.1A CN110620736B (en) 2019-10-23 2019-10-23 Method and device for flow scheduling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911012267.1A CN110620736B (en) 2019-10-23 2019-10-23 Method and device for flow scheduling

Publications (2)

Publication Number Publication Date
CN110620736A CN110620736A (en) 2019-12-27
CN110620736B true CN110620736B (en) 2022-08-26

Family

ID=68926672

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911012267.1A Active CN110620736B (en) 2019-10-23 2019-10-23 Method and device for flow scheduling

Country Status (1)

Country Link
CN (1) CN110620736B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111654448B (en) * 2020-05-06 2023-07-25 杭州迪普科技股份有限公司 Traffic scheduling method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1913493A (en) * 2006-08-24 2007-02-14 杭州华为三康技术有限公司 Method for avoiding route equipment frequent switchover state and one type route equipment
JP2007096610A (en) * 2005-09-28 2007-04-12 Fujitsu Ltd Monitor information acquisition device
WO2009115037A1 (en) * 2008-03-18 2009-09-24 华为技术有限公司 Ethernet trunk port allocation method and device
CN103067293A (en) * 2012-12-31 2013-04-24 北京京东世纪贸易有限公司 Method and system for multiplex and connection management of a load balancer
WO2015077997A1 (en) * 2013-11-29 2015-06-04 华为技术有限公司 Method and device for controlling terminal to access network
CN106254262A (en) * 2016-09-30 2016-12-21 杭州华三通信技术有限公司 A kind of traffic scheduling method and device
CN107911229A (en) * 2017-10-16 2018-04-13 浙江大华技术股份有限公司 Based reminding method, device, electronic equipment and the storage medium that operating status changes
US10091098B1 (en) * 2017-06-23 2018-10-02 International Business Machines Corporation Distributed affinity tracking for network connections

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007096610A (en) * 2005-09-28 2007-04-12 Fujitsu Ltd Monitor information acquisition device
CN1913493A (en) * 2006-08-24 2007-02-14 杭州华为三康技术有限公司 Method for avoiding route equipment frequent switchover state and one type route equipment
WO2009115037A1 (en) * 2008-03-18 2009-09-24 华为技术有限公司 Ethernet trunk port allocation method and device
CN103067293A (en) * 2012-12-31 2013-04-24 北京京东世纪贸易有限公司 Method and system for multiplex and connection management of a load balancer
WO2015077997A1 (en) * 2013-11-29 2015-06-04 华为技术有限公司 Method and device for controlling terminal to access network
CN106254262A (en) * 2016-09-30 2016-12-21 杭州华三通信技术有限公司 A kind of traffic scheduling method and device
US10091098B1 (en) * 2017-06-23 2018-10-02 International Business Machines Corporation Distributed affinity tracking for network connections
CN107911229A (en) * 2017-10-16 2018-04-13 浙江大华技术股份有限公司 Based reminding method, device, electronic equipment and the storage medium that operating status changes

Also Published As

Publication number Publication date
CN110620736A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN111464358B (en) Message reporting method and device
EP3008582B1 (en) Terminal and application synchronization method therefor
CN110764963B (en) Service exception handling method, device and equipment
US10321482B2 (en) Method and device for processing carrier resource of unlicensed carrier and transmission node
CN108572898B (en) Method, device, equipment and storage medium for controlling interface
EP3291592B1 (en) Monitoring management method and apparatus
EP3258644B1 (en) Monitoring processing method and device
CN109560976B (en) Message delay monitoring method and device
CN110620736B (en) Method and device for flow scheduling
CN111078386A (en) Control method and control device of distributed scheduling system
CN113489149A (en) Power grid monitoring system service master node selection method based on real-time state perception
CN107911229B (en) Running state change reminding method and device, electronic equipment and storage medium
CN111835797A (en) Data processing method, device and equipment
CN106970696B (en) Electronic equipment management method and electronic equipment
CN112416594A (en) Micro-service distribution method, electronic equipment and computer storage medium
CN112804108B (en) Signaling execution method and device, electronic equipment and machine-readable storage medium
CN115118635A (en) Time delay detection method, device, equipment and storage medium
CN112751895B (en) Communication connection keep-alive method and system thereof
CN113396573B (en) Migration of computing services
CN112799847A (en) Memory allocation method, system and storage medium
JP2016024605A (en) Distributed processing method, processing server, and program
CN106921606B (en) Session detection method, device and system
GB2494858A (en) Managing connections to a network in a mobile device
CN112291288B (en) Container cluster expansion method and device, electronic equipment and readable storage medium
CN114124686B (en) Method and device for distributing user plane function network element UPF for UE session

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