CN115134310B - Traffic scheduling method and device, storage medium and electronic device - Google Patents

Traffic scheduling method and device, storage medium and electronic device Download PDF

Info

Publication number
CN115134310B
CN115134310B CN202211059344.0A CN202211059344A CN115134310B CN 115134310 B CN115134310 B CN 115134310B CN 202211059344 A CN202211059344 A CN 202211059344A CN 115134310 B CN115134310 B CN 115134310B
Authority
CN
China
Prior art keywords
target
container group
determining
identification information
message
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
CN202211059344.0A
Other languages
Chinese (zh)
Other versions
CN115134310A (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211059344.0A priority Critical patent/CN115134310B/en
Publication of CN115134310A publication Critical patent/CN115134310A/en
Application granted granted Critical
Publication of CN115134310B publication Critical patent/CN115134310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/06Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]

Landscapes

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

Abstract

The embodiment of the invention provides a traffic scheduling method, a traffic scheduling device, a storage medium and an electronic device, wherein the method comprises the following steps: determining target identification information of a target container group associated with a target message, wherein the target identification information is information allocated to the target container group under the condition that the target container group is determined to have a target network service quality requirement; modifying a first field of the target message into a target field based on the target identification information, wherein the first field is used for identifying the target message; determining a queue type corresponding to the target field; and sending the target message to a target queue corresponding to the queue type so as to schedule the flow of the target container group. The invention solves the problem of low traffic scheduling speed in the related technology and achieves the effect of improving the traffic scheduling efficiency.

Description

Traffic scheduling method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the technical field of container cloud, in particular to a traffic scheduling method and device, a storage medium and an electronic device.
Background
In the related art, when performing Traffic scheduling, it is usually necessary to filter an IP address (i.e., a network address) of a container group, and determine a TC class (Traffic controller type) of a received packet by a TC filter (TC, i.e., a Traffic controller TC (Traffic Control) in a Linux operating system) for flow Control of a Linux kernel, mainly by establishing a queue at an output port.
Therefore, the related art has the problem of slow traffic scheduling speed.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a traffic scheduling method, a traffic scheduling device, a storage medium and an electronic device, which are used for at least solving the problem of low traffic scheduling speed in the related art.
According to an embodiment of the present invention, a method for scheduling traffic is provided, including: determining target identification information of a target container group associated with a target message, wherein the target identification information is information allocated to the target container group under the condition that the target container group is determined to have a target network service quality requirement; modifying a first field of the target message into a target field based on the target identification information, wherein the first field is used for identifying the target message; determining a queue type corresponding to the target field; and sending the target message to a target queue corresponding to the queue type so as to schedule the flow of the target container group.
According to another embodiment of the present invention, there is provided a traffic scheduling apparatus, including: a first determining module, configured to determine target identification information of a target container group associated with a target packet, where the target identification information is information allocated to the target container group when it is determined that a target network service quality requirement exists in the target container group; a modification module, configured to modify a first field of the target packet into a target field based on the target identification information, where the first field is used to identify the target packet; the second determining module is used for determining the queue type corresponding to the target field; and the scheduling module is used for sending the target message to a target queue corresponding to the queue type so as to schedule the flow of the target container group.
According to a further embodiment of the present invention, there is also provided a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, comprising a memory in which a computer program is stored and a processor configured to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, the target identification information of the target container group associated with the target message is determined, wherein the target identification information is information distributed to the target container group under the condition that the target container group is determined to have the target network service quality requirement, the first field of the target message is modified into the target field according to the target identification information, the queue type corresponding to the target field is determined, and the target message is sent to the target queue corresponding to the queue type to schedule the flow of the target container group. When the traffic of the target container group is scheduled, the target queue can be determined according to the target identification information allocated to the target container group without filtering, so that the problem of low traffic scheduling speed in the related technology can be solved, and the effect of improving the traffic scheduling efficiency is achieved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a traffic scheduling method according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of scheduling traffic according to an embodiment of the present invention;
FIG. 3 is a flow diagram of a target group of containers sending traffic according to an embodiment of the invention;
FIG. 4 is a flow diagram of a group of containers receiving traffic according to an embodiment of the invention;
FIG. 5 is a schematic diagram of a cluster system structure of a cluster in which a target container group is located according to an embodiment of the present invention;
FIG. 6 is a flow diagram illustrating the creation of a target queue in a target node according to an embodiment of the present invention;
fig. 7 is a flowchart of reporting residual bandwidth by node bandwidth according to an embodiment of the present invention;
FIG. 8 is a flow diagram illustrating a scheduling of a target group of containers, according to an embodiment of the present invention;
fig. 9 is a block diagram of a traffic scheduling apparatus according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking an example of the method running on a mobile terminal, fig. 1 is a block diagram of a hardware structure of the mobile terminal of a traffic scheduling method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of an application software, such as a computer program corresponding to the scheduling method of the traffic in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for scheduling traffic is provided, and fig. 2 is a flowchart of a method for scheduling traffic according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, determining target identification information of a target container group associated with a target message, wherein the target identification information is information distributed to the target container group under the condition that the target container group is determined to have a target network service quality requirement;
step S204, modifying a first field of the target message into a target field based on the target identification information, wherein the first field is used for identifying the target message;
step S206, determining the queue type corresponding to the target field;
step S208, the target message is sent to the target queue corresponding to the queue type to schedule the flow of the target container group.
In the above embodiment, the target container group, pod is the smallest unit created or deployed by kubernets (cloud container). A Pod encapsulates one or more containers (containers), storage resources (volumes), an independent network IP, and policy options that govern the way containers operate. Kubernetes, also known as k8s (8 characters between the first and last letters) or "kube", is an open source platform that can automatically implement Linux container operations. Quality of Service (QoS) refers to a network that can provide better Service capability for specified network communication by using various basic technologies, and is a security mechanism of the network, which is a technology for solving the problems of network delay and congestion.
In the above embodiment, the target packet may be a packet sent by the target container group, or may be a packet to be sent to the target container group. When a target message is received, target identification information of a target container group associated with the target message can be determined, and a first field of the target message is modified into a target field according to the target identification information. Wherein the first field may be skb (Socket Buffer) → priority. The target queue, i.e., htbclass (Hierarchical Token Bucket type queue), previously created for the target container group may be determined from skb → priority.
The main body of the above steps may be a processor, etc., but is not limited thereto.
According to the invention, the target identification information of the target container group associated with the target message is determined, wherein the target identification information is information distributed to the target container group under the condition that the target container group is determined to have the target network service quality requirement, the first field of the target message is modified into the target field according to the target identification information, the queue type corresponding to the target field is determined, and the target message is sent to the target queue corresponding to the queue type to schedule the flow of the target container group. When the traffic of the target container group is scheduled, the target queue can be determined according to the target identification information allocated to the target container group without filtering, so that the problem of low traffic scheduling speed in the related technology can be solved, and the effect of improving the traffic scheduling efficiency is achieved.
In one exemplary embodiment, determining target identification information for a target group of containers associated with a target packet includes: acquiring annotation information of the target container group under the condition that the target message is a message sent by the target container group, determining the network service quality requirement of the target container group based on the annotation information, and determining the target identification information distributed to the target container group based on the network service quality requirement; and under the condition that the target message is a message to be sent to a container group, acquiring a target network address carried by the target message, determining the container group with the network address as the target container group, and determining the target identification information of the target container group. In this embodiment, in the afternoon when the target packet is a packet sent by the target container group, the annotation information of the target container group, such as the position annotation (container group annotation information), may be used. The network service quality requirement of the target container group can be determined according to the annotation information, wherein the network service quality requirement can include the minimum bandwidth, the maximum bandwidth, and the like, which are required to be guaranteed by the target container group. Unique target identification information may be assigned to the set of target containers based on network quality of service requirements. Wherein the target identification information may be a 16-bit identification.
In the above embodiment, when the target packet is a packet to be sent to the container group, a destination IP of the target packet, that is, a target network address, may be determined, a target container group having the same target network address as the target network address is determined from the container group, and the target identification information of the target container group is determined according to the annotation information of the target container group.
In an exemplary embodiment, modifying the destination field of the destination packet based on the destination identification information comprises: and modifying the target field into the target identification information through a target program. In this embodiment, the object program may be an ebpf program, and the ebpf program is a very flexible and efficient virtual machine-like (virtual machine-like) component in the Linux kernel, and can safely execute byte codes (bytecodes) at many kernel hook points.
In the above embodiment, when the target packet is a packet sent by the target container group, a flow chart of sending traffic by the target container group may refer to fig. 3, as shown in fig. 3, where the flow includes:
step S302, when the pod sends the message, attach, namely the ebpf program attached to the tc filter of the pod network card, will change skb → priority of the sent message into the corresponding pod id (corresponding to the target identification information of the target container group).
Step S304 determines whether the destination of the transmission is outside the own node, and if the determination result is yes, step S306 is executed, and if the determination result is no, step S308 is executed.
Step S306, when the destination ip of the message to be sent is not on the node, the message is sent to the interface of the physical network card, and the physical network card interface sends the message to the htb class created for the pod in advance through the matching skb → priority, so as to complete the flow scheduling.
And step S308, directly forwarding.
When the target packet is a packet to be sent to the container group, the flow chart of the packet group receiving traffic may refer to fig. 4, and as shown in fig. 4, the flow includes:
step S402, the flow sent to the pod enters the physical network card interface of the node first, and the physical network card interface receives the flow.
Step S404, forward the data to the ifb interface through the tc filter mirror.
Step S406, the message finds the corresponding pod id according to the destination ip of the message through the ebpf program of the attach on the ifb interface tc filter, and modifies the skb → priority field of the message.
Step S408, the ifb interface htb qdisc directly sends the message to a pre-configured htb class through the skb → priority of the message to complete the flow scheduling.
Step S410, the message is forwarded to the pod, and communication is completed.
In the above embodiment, modifying skb → priority using ebpf program directly matches tc class, can reduce the cost of using traditional maintenance tc filter and improve performance.
In an exemplary embodiment, before sending the target packet to the target queue corresponding to the queue type, the method further includes: determining a target node where the target container group is located; creating the target queue in the target node. In this embodiment, before sending the target packet to the target queue, the target node where the target container group is located may be determined, and the target queue may be created in the target node.
In one exemplary embodiment, creating the target queue in the target node comprises: determining a target network quality of service requirement of the target container group; and creating the target queue in the physical network card and the virtual network card of the target node based on the target network service quality requirement and the target identification information. In this embodiment, creating the target queue in the virtual network card may be creating the target queue on an ifb interface of the virtual network card. Referring to fig. 5, as shown in fig. 5, the cluster includes a scheduler and nodes, where each node includes a qos management module and a cni (container network interface) plug-in. Wherein the scheduler may be a K8s scheduler.
In the above embodiment, a schematic diagram of a process of creating a target queue in a target node may be shown in fig. 6, as shown in fig. 6, where the process includes:
at step S602, the pod is scheduled to the node to begin creation.
In step S604, the cni plugin determines whether the pod has a qos requirement according to the pod annotation, and if so, executes step S606.
In step S606, the Pod id management module allocates a unique 16-bit Pod id in the node range to the Pod, corresponding to the target identification information.
In step S608, the epbf program management module assigns the ebpf program attach to the tc filter of the pod network card. The ebpf program modifies skb → priority of a message sent by the pod into a corresponding pod id value according to the pod id, and stores the pod id and the ip of the pod in an ebpf map (an efficient storage engine provided by a kernel).
In step S610, the httb qdisc (queue rule) management module creates an Htb class corresponding to the pod id and the qos requirement on the physical network card and the ifb interface according to the network bandwidth requirement of the pod to schedule the traffic of the pod.
In an exemplary embodiment, before determining the target node where the target container group is located, the method further comprises: determining a minimum bandwidth included in the target network quality of service requirement based on the annotation information for the target group of containers; determining a first node with the residual bandwidth larger than the minimum bandwidth from the nodes included in the cluster; determining the target node meeting a preset condition from the first nodes; creating the target set of containers in the target node. In this embodiment, before creating the target container group, a target node that meets the target network service quality requirement may be determined from the plurality of nodes included in the cluster according to the target network service quality requirement of the target container group.
In the above embodiment, when determining the target node, the minimum bandwidth that needs to be guaranteed by the target container group may be determined according to the annotation information, a first node whose remaining bandwidth is greater than the minimum bandwidth is determined from the nodes included in the cluster, and a target node that meets a predetermined condition is determined from the first node. Wherein the predetermined condition may be that the remaining bandwidth is maximum. The nodes can also be scored according to the residual bandwidth, the memory and the like of each node, and the node with the largest score is determined as the target node, namely the predetermined condition can also be the node with the largest score.
In the above embodiment, the nodes in the cluster may send their remaining bandwidths to the scheduler, and the scheduler may determine how much minimum bandwidth each node can guarantee according to the reported remaining bandwidths, so as to calculate whether the node meets the network bandwidth requirement of the pod to be scheduled. The node bandwidth reporting module firstly obtains the size of the physical network card bandwidth, multiplies the size by an available percentage coefficient and reports the result. The flowchart of reporting the remaining bandwidth by the node bandwidth may refer to fig. 7.
In one exemplary embodiment, after creating the target container group in the target node, the method further comprises: under the condition that the target container group is successfully established, determining the difference value between the residual bandwidth of the target node and the minimum bandwidth to obtain difference bandwidth; and updating the residual bandwidth of the target node to the difference bandwidth. In this embodiment, after the target container group is successfully created in the target node, the remaining bandwidth of the target node may be updated.
In the above embodiment, a schematic flowchart of the process of scheduling the target container group may refer to fig. 8, as shown in fig. 8, the process includes:
in step S802, when the scheduler schedules the pod with the network bandwidth requirement, the scheduler fetches the minimum access bandwidth required by the pod according to the annotation.
Step S804, in the filter stage, screening out the node which can meet the minimum in-out bandwidth of the pod according to the remaining in-out bandwidth of the node.
Step S806, in the score stage (evaluation stage), a node deployment pod with the highest score is selected by calculating the remaining access of the node to the guaranteed bandwidth, and in the reserve stage (preemption stage), the minimum guaranteed bandwidth value that the pod will occupy after being scheduled to the selected node is deducted in advance.
Step S808, determining whether the scheduling is successful, if the scheduling is successful, executing step S812, and if the scheduling is failed, executing step S810.
In step S810, if the scheduling fails, the pre-deducted guaranteed bandwidth of the node is returned in the unreserved phase (the fallback phase).
Step S812 ends.
In the foregoing embodiment, the user may note in the pod announcement that: the minimum guaranteed bandwidth and the maximum limited bandwidth in the incoming direction and the minimum guaranteed bandwidth and the maximum limited bandwidth in the outgoing direction. And the scheduler schedules the nodes meeting the minimum guaranteed bandwidth requirement in the pod annotation according to the minimum guaranteed bandwidth requirement in the pod annotation. In the process of creating the pod, the cni plugin sends the network bandwidth requirement of the pod to the qos management module according to the pod annotation. The Qos management module sets a tc rule according to the requirement of the Qos management module on the network bandwidth to meet the requirement. The requirement of guaranteeing a minimum bandwidth of the pod is fulfilled.
In the foregoing embodiment, each pod has a unique 16-bit id in the node, and the ebpf procedure is used to modify skb → priority for pod id to differentiate pod traffic serving different pods. And the guaranteed bandwidth is taken as a resource on the node in the K8S cluster, and the sum of all required guaranteed bandwidths on the node in the scheduling process is not more than the available guaranteed bandwidth of the node. The physical network card bandwidth is used as a resource for pod scheduling, so that the bandwidth amount required by the pods is really ensured, and the communication (without using the network card bandwidth) between the pods deployed in the same node is not limited.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method according to the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, a traffic scheduling apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 9 is a block diagram of a traffic scheduling apparatus according to an embodiment of the present invention, and as shown in fig. 9, the apparatus includes:
a first determining module 92, configured to determine target identification information of a target container group associated with a target packet, where the target identification information is information allocated to the target container group when it is determined that a target network service quality requirement exists in the target container group;
a modification module 94, configured to modify a first field of the target packet into a target field based on the target identification information, where the first field is used to identify the target packet;
a second determining module 96, configured to determine a queue type corresponding to the target field;
and the scheduling module 98 is configured to send the target packet to a target queue corresponding to the queue type, so as to schedule the traffic of the target container group.
In an exemplary embodiment, the first determining module 92 may determine the target identification information of the target container group associated with the target packet by: acquiring annotation information of the target container group under the condition that the target message is a message sent by the target container group, determining the network service quality requirement of the target container group based on the annotation information, and determining the target identification information distributed to the target container group based on the network service quality requirement; and under the condition that the target message is a message to be sent to a container group, acquiring a target network address carried by the target message, determining the container group with the network address being the target network address as the target container group, and determining the target identification information of the target container group.
In an exemplary embodiment, the modification module 94 may modify the destination field of the destination packet based on the destination identification information by: and modifying the target field into the target identification information through a target program.
In an exemplary embodiment, the apparatus may be configured to determine a target node where the target container group is located before sending the target packet to a target queue corresponding to the queue type; creating the target queue in the target node.
In an exemplary embodiment, the apparatus may enable creating the target queue in the target node by: determining a target network quality of service requirement of the target container group; and creating the target queue in the physical network card and the virtual network card of the target node based on the target network service quality requirement and the target identification information.
In an example embodiment, the apparatus may be configured to determine a minimum bandwidth included in the target network quality of service requirement based on the annotation information of the target container group before determining the target node where the target container group is located; determining a first node with the residual bandwidth larger than the minimum bandwidth from nodes included in the cluster; determining the target node meeting a preset condition from the first nodes; creating the target group of containers in the target node.
In an exemplary embodiment, after the target container group is created in the target node, if the creation of the target container group is successful, determining a difference between the remaining bandwidth of the target node and the minimum bandwidth, so as to obtain a difference bandwidth; and updating the residual bandwidth of the target node to the difference bandwidth.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the steps of any of the above-mentioned method embodiments when executed.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented in a general purpose computing device, they may be centralized in a single computing device or distributed across a network of multiple computing devices, and they may be implemented in program code that is executable by a computing device, such that they may be stored in a memory device and executed by a computing device, and in some cases, the steps shown or described may be executed in an order different from that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps therein may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (7)

1. A method for scheduling traffic, comprising:
determining target identification information of a target container group associated with a target message, wherein the target identification information is information allocated to the target container group under the condition that the target container group is determined to have a target network service quality requirement;
modifying a first field of the target message into a target field based on the target identification information, wherein the first field is used for identifying the target message;
determining a queue type corresponding to the target field;
sending the target message to a target queue corresponding to the queue type to schedule the flow of the target container group;
determining target identification information for a set of target containers associated with a target packet includes: acquiring annotation information of the target container group under the condition that the target message is a message sent by the target container group, determining the network service quality requirement of the target container group based on the annotation information, and determining the target identification information distributed to the target container group based on the network service quality requirement; under the condition that the target message is a message to be sent to a container group, acquiring a target network address carried by the target message, determining the container group with the network address as the target container group, and determining the target identification information of the target container group, wherein the network service quality comprises a minimum bandwidth and a maximum bandwidth required to be ensured by the target container group, and the target field comprises the target identification information;
before sending the target packet to the target queue corresponding to the queue type, the method further includes: determining a target node where the target container group is located; creating the target queue in the target node;
creating the target queue in the target node comprises: determining a target network quality of service requirement for the target group of containers; and creating the target queue in the physical network card and the virtual network card of the target node based on the target network service quality requirement and the target identification information.
2. The method of claim 1, wherein modifying the destination field of the destination packet based on the destination identification information comprises:
and modifying the target field into the target identification information through a target program.
3. The method of claim 1, wherein prior to determining the target node at which the target container group is located, the method further comprises:
determining a minimum bandwidth included in the target network quality of service requirement based on the annotation information for the target group of containers;
determining a first node with the residual bandwidth larger than the minimum bandwidth from the nodes included in the cluster;
determining the target node meeting a preset condition from the first nodes;
creating the target group of containers in the target node.
4. The method of claim 3, wherein after creating the target set of containers in the target node, the method further comprises:
under the condition that the target container group is successfully established, determining the difference value between the residual bandwidth of the target node and the minimum bandwidth to obtain difference bandwidth;
and updating the residual bandwidth of the target node to the difference bandwidth.
5. An apparatus for scheduling traffic, comprising:
a first determining module, configured to determine target identification information of a target container group associated with a target packet, where the target identification information is information allocated to the target container group when it is determined that a target network service quality requirement exists in the target container group;
a modification module, configured to modify a first field of the target packet into a target field based on the target identification information, where the first field is used to identify the target packet;
the second determining module is used for determining the queue type corresponding to the target field;
the scheduling module is used for sending the target message to a target queue corresponding to the queue type so as to schedule the flow of the target container group;
the first determining module determines the target identification information of the target container group associated with the target message by the following method: acquiring annotation information of the target container group under the condition that the target message is a message sent by the target container group, determining the network service quality requirement of the target container group based on the annotation information, and determining the target identification information distributed to the target container group based on the network service quality requirement; under the condition that the target message is a message to be sent to a container group, acquiring a target network address carried by the target message, determining the container group with the network address as the target container group, and determining the target identification information of the target container group, wherein the network service quality comprises a minimum bandwidth and a maximum bandwidth required to be ensured by the target container group, and the target field comprises the target identification information;
the device is further configured to determine a target node where the target container group is located before sending the target packet to a target queue corresponding to the queue type; creating the target queue in the target node;
the apparatus enables creating the target queue in the target node by: determining a target network quality of service requirement of the target container group; and creating the target queue in the physical network card and the virtual network card of the target node based on the target network service quality requirement and the target identification information.
6. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 4 when executed.
7. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 4.
CN202211059344.0A 2022-08-31 2022-08-31 Traffic scheduling method and device, storage medium and electronic device Active CN115134310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211059344.0A CN115134310B (en) 2022-08-31 2022-08-31 Traffic scheduling method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211059344.0A CN115134310B (en) 2022-08-31 2022-08-31 Traffic scheduling method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN115134310A CN115134310A (en) 2022-09-30
CN115134310B true CN115134310B (en) 2022-12-06

Family

ID=83386979

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211059344.0A Active CN115134310B (en) 2022-08-31 2022-08-31 Traffic scheduling method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN115134310B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium
CN111124604A (en) * 2019-12-05 2020-05-08 北京金山云网络技术有限公司 Method, device, equipment and storage medium for allocating Pod (POD) IP addresses
CN111770162A (en) * 2020-06-24 2020-10-13 重庆紫光华山智安科技有限公司 Network bandwidth limiting method, device, main node and storage medium
CN113709810A (en) * 2021-08-30 2021-11-26 河南星环众志信息科技有限公司 Method, device and medium for configuring network service quality
CN113783797A (en) * 2021-09-13 2021-12-10 京东科技信息技术有限公司 Network flow control method, device, equipment and storage medium of cloud native container

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10735279B2 (en) * 2017-04-14 2020-08-04 Futurewei Technologies, Inc. Networking service level agreements for computer datacenters
US11178023B2 (en) * 2017-06-30 2021-11-16 Intel Corporation Data plane interface network quality of service in multi-tenant data centers

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium
CN111124604A (en) * 2019-12-05 2020-05-08 北京金山云网络技术有限公司 Method, device, equipment and storage medium for allocating Pod (POD) IP addresses
CN111770162A (en) * 2020-06-24 2020-10-13 重庆紫光华山智安科技有限公司 Network bandwidth limiting method, device, main node and storage medium
CN113709810A (en) * 2021-08-30 2021-11-26 河南星环众志信息科技有限公司 Method, device and medium for configuring network service quality
CN113783797A (en) * 2021-09-13 2021-12-10 京东科技信息技术有限公司 Network flow control method, device, equipment and storage medium of cloud native container

Also Published As

Publication number Publication date
CN115134310A (en) 2022-09-30

Similar Documents

Publication Publication Date Title
CN110896355B (en) Network slice selection method and device
WO2018213991A1 (en) Network slice creating method and apparatus, and communication system
KR102247993B1 (en) Network slice management method, management unit and system
JP6533475B2 (en) Management device and network service management method
CN110730478B (en) Slice association method, device, end-to-end slice organizer and storage medium
CN115296993A (en) System, function and interface for interconnected multi-domain network fragmentation control and management
CN112789832A (en) Dynamic slice priority handling
CN103346980A (en) Method and device for service dispatching and network equipment
CN111865809B (en) Equipment state sensing method, system and switch based on protocol non-sensing forwarding
CN112637081A (en) Bandwidth speed limiting method and device
CN113162785A (en) Method, device and system for establishing network interface
CN110869919B (en) Method for remote node discovery, communication channel confirmation and connection
CN115134310B (en) Traffic scheduling method and device, storage medium and electronic device
CN113438169A (en) Data scheduling method, electronic equipment and storage medium
CN109076027B (en) Network service request
US20170070573A1 (en) Communication device, communication system, and data processing device
CN110661896B (en) Method for determining mapping address of data stream and server
CN113904871B (en) Access method of network slice, PCF entity, terminal and communication system
CN113453285B (en) Resource adjusting method, device and storage medium
CN107371263B (en) Method and device for scheduling uplink resources
CN111245794B (en) Data transmission method and device
KR102174979B1 (en) Method for controlling transsion of packet in virtual switch
CN112306701B (en) Service fusing method, device, equipment and storage medium
US10560394B2 (en) Dynamic transmission side scaling
CN114531320A (en) Communication method, device, equipment, system and computer readable storage medium

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