Container cluster-oriented virtual network card dynamic scheduling method and related device
By obtaining VF network interface status information in the container cluster, performing weighted sorting and delayed updates, and dynamically scheduling Pods to matching VF network interfaces, the problems of VF performance jitter and instability are solved, and dynamic balancing and high availability of container cluster network functions are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA TELECOM CORP LTD TECHNOLOGY INNOVATION CENTER
- Filing Date
- 2023-07-13
- Publication Date
- 2026-07-31
AI Technical Summary
In a container cluster environment based on SR-IOV physical network interface cards, network failures or line fluctuations cause VF performance jitter and instability, making it impossible to dynamically configure VF, resulting in inconsistent network function performance and difficulties in load balancing.
By sending detection messages to obtain VF network interface status information, performing weighted sorting and delay updates, generating a priority sorting table, and dynamically scheduling Pods to matching VF network interfaces, dynamic configuration of network latency is achieved.
It achieves dynamic balancing of container cluster network functions, reduces fault handling paths when network latency occurs, and improves VF's high availability and network stability.
Smart Images

Figure CN116723107B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, and in particular to a method and related equipment for dynamic scheduling of virtual network interface cards for container clusters. Background Technology
[0002] With the need for network virtualization, the network virtualization of virtual machine containers is evolving towards cloud-native container clusters to support network applications. Cloud-native container clusters leverage cloud computing virtualization capabilities, deploying physical machines on virtualized systems and then deploying container clusters on virtual nodes provided by the virtualization system. SR-IOV (Single Root I / O Virtualization) technology virtualizes physical network interface cards (NICs), enabling more virtual machines to connect to virtual NICs and achieve near-physical NIC passthrough performance.
[0003] In existing container cluster environments based on SR-IOV physical network cards, when deploying applications that carry carrier-grade network functions on a large scale, external network failures or line fluctuations can cause excessive physical network cards to cause some Virtual Functions (VFs) to experience performance jitter and instability. VFs cannot be dynamically configured according to network latency, and the inconsistent performance of VFs makes it difficult for load balancers to coordinate. The network function performance of container groups using multiple VFs drops sharply.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] This disclosure provides a method and related equipment for dynamic scheduling of virtual network interface cards (VFs) for container clusters, which at least to some extent overcomes the problem that VFs cannot be dynamically configured based on network latency in related technologies.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to one aspect of this disclosure, a method for dynamic scheduling of virtual network interface cards (VNICs) for container clusters is provided, comprising: sending detection messages to virtual function (VF) NICs in the container cluster to obtain multiple VF NIC status information, wherein the VF NIC status information includes latency information and packet loss information; performing weighted sorting and latency updates on the multiple VF NIC status information to determine a priority sorting table; and scheduling Pods to matching VF NICs according to the priority sorting table.
[0008] In some embodiments, the step of weighting and delaying the updating of the multiple VF network interface card status information to determine the priority sorting table includes: in the Hypervisor layer, weighting and delaying the updating of the delay information and packet loss information in the VF network interface card status information to determine the priority sorting table.
[0009] In some embodiments, the step of weighting and delaying the sorting and updating of latency and packet loss information in the network interface card status information in the Hypervisor layer to determine the priority sorting table includes: calculating the priority weight of each VF network interface card status information in the Hypervisor layer, determining a preliminary priority sorting table based on the calculated priority weights, and delaying the update of the preliminary priority sorting table to determine the final priority sorting table.
[0010] In some embodiments, the delayed update of the preliminary priority ranking table and the determination of the priority ranking table include: obtaining the preliminary priority ranking table, counting the number of times the network interface card in the header is selected, determining the count reduction amount based on the number of selections and the count coefficient constant; determining the feedback reduction amount based on the weights and the delay coefficient constant in the preliminary priority ranking table; and determining the priority ranking table based on the preliminary priority ranking table, the count reduction amount, and the feedback reduction amount.
[0011] In some embodiments, sending detection messages to the Virtual Function (VF) network interface cards (VNICs) in the container cluster to obtain multiple VF NIC status information includes: in the Hypervisor layer, sending detection messages to the latency status of the VF NICs in the container cluster via probe injection to obtain the status information returned by multiple VF NICs.
[0012] In some embodiments, scheduling a Pod to a matching VF network interface according to the priority sorting table includes: obtaining VF network interface information in the PaaS layer; listening to the priority sorting table sent in the Hypervisor layer; determining scheduling information according to the VF network interface information and the priority sorting table, wherein the scheduling information includes the VF network interface matching the Pod; and scheduling the Pod to the matching VF network interface according to the scheduling information.
[0013] In some embodiments, after scheduling the Pod to a matching VF network interface according to the priority sorting table, the method further includes updating the container status in the database.
[0014] According to another aspect of this disclosure, a dynamic scheduling device for virtual network interface cards (VNICs) in a container cluster is also provided, comprising: a latency detection module, used to send detection messages to the Virtual Functions (VF) NICs in the container cluster to obtain multiple VF NIC status information, wherein the VF NIC status information includes latency information and packet loss information; a latency sorting module, used to perform weighted sorting and latency updates on the multiple VF NIC status information to determine a priority sorting table; and a dynamic scheduling module, used to schedule Pods to matching VF NICs according to the priority sorting table.
[0015] According to another aspect of this disclosure, an electronic device is also provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the virtual network interface card dynamic scheduling method for container clusters described above by executing the executable instructions.
[0016] According to another aspect of this disclosure, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the virtual network interface card dynamic scheduling method for container clusters as described in any one of the preceding claims.
[0017] According to another aspect of this disclosure, a computer program product is also provided, including a computer program that, when executed by a processor, implements the method for dynamic scheduling of virtual network interface cards for container clusters as described above.
[0018] The embodiment of this disclosure provides a method for dynamic scheduling of virtual network interfaces (VNICs) for container clusters. This method obtains multiple VNIC status information by sending detection messages to the Virtual Function (VF) NICs in the container cluster. The VF NIC status information includes latency and packet loss information. The method then performs weighted sorting and latency updates on the multiple VF NIC status information to determine a priority sorting table. Based on the priority sorting table, Pods are scheduled to match the VF NICs. This disclosure enables dynamic configuration of VFs based on network latency, resulting in dynamic balancing of network functions within the container cluster.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0021] Figure 1 This diagram illustrates the architecture of a virtual network interface card (NIC) dynamic scheduling system for container clusters, as shown in an embodiment of this disclosure.
[0022] Figure 2 The flowchart illustrates a method for dynamic scheduling of virtual network interface cards (NICs) for container clusters according to an embodiment of this disclosure.
[0023] Figure 3 A flowchart illustrating a specific example of a dynamic scheduling method for virtual network interface cards (NICs) in a container cluster according to an embodiment of this disclosure is shown.
[0024] Figure 4 A flowchart illustrating yet another specific example of a method for dynamic scheduling of virtual network interface cards (NICs) for container clusters, as described in this disclosure;
[0025] Figure 5 A flowchart illustrating another specific example of a virtual network interface card dynamic scheduling method for container clusters according to an embodiment of this disclosure;
[0026] Figure 6 A flowchart illustrating yet another specific example of a method for dynamic scheduling of virtual network interface cards for container clusters, as described in this disclosure;
[0027] Figure 7 This diagram illustrates a virtual network interface card (NIC) dynamic scheduling device for container clusters according to an embodiment of the present disclosure.
[0028] Figure 8 This diagram illustrates a structural block diagram of a computer device according to an embodiment of the present disclosure;
[0029] Figure 9 A schematic diagram of a computer-readable storage medium according to an embodiment of the present disclosure is shown. Detailed Implementation
[0030] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0031] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0032] The specific implementation methods of the embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0033] Figure 1 A schematic diagram of an exemplary application system architecture is shown, illustrating an application of the virtual network interface card dynamic scheduling method for container clusters as described in the embodiments of this disclosure. Figure 1 As shown, the system architecture may include a PaaS layer 11 and a Hypervisor layer 12.
[0034] PaaS (Platform as a Service) Layer 11: This layer primarily connects Kube-APIServer 102 and the SR-IOV network interface creation and binding module 103 through the virtual network interface control component Kube-vf-controller 101. On one hand, it bypasses the native scheduler Kube-scheduler 104 by sending messages to Kube-APIServer 102 to update the NodeSelector value of Pod 105 in the ETCD database and add relevant VF network interface port 106 annotations, thus achieving proactive Pod scheduling behavior discovery at the Kubernetes level. On the other hand, it obtains the current VF status and priority sorting table by connecting to the SR-IOV network interface creation and binding module, and sends notifications for Pod creation and planned binding to VF network interfaces, enabling real-time acquisition of VF network interface status information and real-time management of network interface binding. VF Dynamic Scheduling Plugin 107 is primarily responsible for real-time notification of pod scheduling messages. This module only has a northbound interface, which obtains network interface card (NIC) information from Kube-vf-controller and calculates VF NIC scores based on network latency and other customized requirements for container resources in the YAML form. The highest-scoring VF NIC is selected for matching, and the Kube-APIServer is notified to update the container status in ETCD. The northbound input consists of the VF NIC information sent by Kube-vf-controller and the container YAML form obtained from the APIServer. The northbound output is the final container scheduling status integration information in YAML format. This ultimately achieves real-time NIC status discovery, dynamic scheduling of application containers, and automatic avoidance of network failures. At the PaaS layer, VF Dynamic Scheduling Plugin 107 listens to and synchronizes the VF NIC priority obtained from the delay judgment module in the Hypervisor layer. This message is used to determine which VF pod should be scheduled to the matching VF NIC port node.
[0035] Hypervisor Layer 12: This layer primarily manages the VF network interface card (NIC) through the SR-IOV NIC creation and binding module 103. The VF latency detection module 108 injects probes by sending detection messages to monitor the VF latency status and returns latency and packet loss information, enabling customized real-time monitoring of the network status. The VF priority module 109 performs a weighted evaluation of latency and packet loss to obtain a weighted score, outputting a priority ranking table based on VF status information. On one hand, the VF latency adder 110 adds a certain delay to the initially obtained priority ranking table, assigning weights based on the number of calls to avoid NIC binding request self-locking due to excessively frequent calls. On the other hand, the quotient obtained by dividing the latency coefficient by the priority ranking table of the previous time period is used to add a reduction value, achieving a reasonable evaluation of the VF NIC status. The VF latency ranking module includes the VF priority module and the VF latency detection module, which synchronize information through a message queue.
[0036] The VF latency detection module 108 is primarily responsible for establishing an active status information detection mechanism with the VF network interface card (NIC), sending relevant probe packets to actively acquire NIC status information. The northbound input is a message receiving port conforming to the SRIOV NIC configuration information. The northbound output is a message sending port conforming to the SRIOV NIC configuration information. The southbound output is the filtered and trimmed VF NIC status information, including network latency, packet loss rate, and connectivity. The southbound input is the VF NIC priority sorting table returned by the VF priority module. The VF latency detection module is responsible for detecting real-time VF latency and packet loss. In the Hypervisor layer, detection messages are sent to the VF NIC through the SRIOV NIC creation and binding module, and latency and packet loss feedback are received.
[0037] The VF Priority Module (109) is primarily responsible for weighted sorting of received VF network interface card (NIC) status information. Based on the final weights, it generates a final priority ranking table to provide a basis for the VF dynamic scheduling plugin. The northbound input receives the VF NIC status information after being processed and trimmed by the VF delay detection module. The northbound output is the final sorted and merged priority ranking table based on the VF NIC status information. The southbound input receives negative weight information sent by the VF delay adder to reduce the initially obtained priority ranking table and soften the scheduling target. The VF Priority Module is deployed at the Hypervisor layer, listening to messages from the VF delay detection module and calculating the weight for each VF priority level.
[0038] The VF Delay Adder 110 is primarily responsible for working with the VF Priority Module to generate the VF network interface card (NIC) priority ranking table, thus softening scheduling metrics. The northbound input retrieves the priority ranking table from the previous time period, counts the number of times each NIC is selected (at the head of the priority ranking), and multiplies this count by a constant coefficient to obtain the count reduction. The weights in the previous priority ranking table are then divided by a delay coefficient related to the interval duration to obtain the feedback reduction. The southbound output is a priority reduction table obtained by summing the feedback reduction and the count reduction using a coefficient; the values in this table correspond one-to-one with the VF NIC information. The VF Delay Adder 110 is deployed at the southbound entry point of the VF Priority Module to perform delayed updates to priority weights.
[0039] This system architecture provides real-time monitoring of VF resource latency at the IaaS (Infrastructure as a Service) layer while flexibly troubleshooting VF lines to ensure containers have high-performance VF available.
[0040] This disclosure continuously performs performance testing, evaluation, and analysis on VF, and builds a virtual network based on the scoring in real time.
[0041] This public method dynamically schedules VF resources to ensure high availability of VF.
[0042] This disclosure reduces the fault handling path when network latency occurs, enabling refined operation and maintenance at the virtual network element level.
[0043] This disclosure presents a virtual network interface card (VNIC) control platform that integrates IaaS and PaaS, enabling full-plane awareness and scheduling of VNICs. A latency and scoring algorithm is proposed to quantify and score VNIC status through weighted analysis. Cloud-native features are achieved, supporting cloud-native virtual network interface card passthrough capabilities.
[0044] Under the above system architecture, this disclosure provides a method for dynamic scheduling of virtual network interface cards (NICs) for container clusters, which can be executed by any electronic device with computing capabilities.
[0045] In some embodiments, the virtual network interface card (NIC) dynamic scheduling method for container clusters provided in this disclosure can be executed by the terminal device of the above-described system architecture; in other embodiments, the virtual NIC dynamic scheduling method for container clusters provided in this disclosure can be executed by the server in the above-described system architecture; in still other embodiments, the virtual NIC dynamic scheduling method for container clusters provided in this disclosure can be implemented by the terminal device and the server in the above-described system architecture through interaction.
[0046] Figure 2 This diagram illustrates a flowchart of a dynamic scheduling method for virtual network interface cards (NICs) in a container cluster, as shown in an embodiment of this disclosure. Figure 1As shown in the embodiments of this disclosure, the method for dynamic scheduling of virtual network interface cards (NICs) for container clusters includes the following steps:
[0047] S202, send detection messages to the Virtual Functions (VF) network interface in the container cluster to obtain multiple VF network interface status information, including latency information and packet loss information.
[0048] For example, in the Hypervisor layer, detection messages are sent to monitor the latency status of VF network interfaces in the container cluster via probe injection to obtain status information returned by multiple VF network interfaces.
[0049] S204 performs weighted sorting and delayed updates on the status information of multiple VF network cards to determine the priority sorting table.
[0050] For example, in the Hypervisor layer, the latency and packet loss information in the VF network card status information are weighted, sorted, and updated with delay to determine the priority sorting table.
[0051] It should be noted that the weighted sorting mentioned above can be calculated by sorting according to the weight values. The delayed update mentioned above can be a delayed update process, also known as a modified update process. It is an update process that allows the distribution G of the first update interval T (i.e., the interval from the origin to the first update) and the (common) distribution F of the subsequent update intervals Tz}Ts}... to be different.
[0052] S206 schedules the Pod to the matching VF network interface according to the priority sorting table.
[0053] For example, a priority sorting table can be used to determine which VF network interface port node a Pod should be scheduled to.
[0054] This disclosure obtains VF network interface card (NIC) status information in real time by sending detection messages, processes the VF NIC status information through a preset method, and obtains the judgment criteria for dynamically scheduling Pods. It dynamically configures VFs based on network latency, enabling the load balancer to coordinate and dynamically balance the network function performance of container groups using multiple VFs. This disclosure can dynamically configure VFs based on network latency, thus achieving dynamic balancing of network functions in container clusters.
[0055] In one embodiment of this disclosure, such as Figure 3 As shown in the embodiments of this disclosure, the dynamic scheduling method for virtual network interface cards (NICs) in container clusters can determine the priority sorting table through the following steps, which can avoid the situation of NIC binding request self-locking caused by excessively frequent calls:
[0056] S302, in the Hypervisor layer, calculates the priority weight of each VF network card status information, and determines the preliminary priority sorting table based on the calculated priority weights;
[0057] S304, perform a delayed update on the initial priority sorting table to determine the priority sorting table.
[0058] In one embodiment of this disclosure, such as Figure 4 As shown in the embodiments of this disclosure, the dynamic scheduling method for virtual network interface cards (VNICs) in container clusters can determine the priority ranking table through the following steps, thereby enabling reasonable evaluation of the VF NIC status:
[0059] S402, obtain the preliminary priority sorting table, count the number of times the network card in the header is selected, and determine the count reduction amount based on the number of selections and the counting coefficient constant;
[0060] S404, determine the feedback reduction amount based on the weights and delay coefficient constants in the preliminary priority ranking table;
[0061] S406, determine the priority ranking table based on the preliminary priority ranking table, the count reduction amount, and the feedback reduction amount.
[0062] In a specific instance, the initial priority ranking table is updated with a delay, and the priority ranking table can be calculated using the following formulas (1), (2), and (3):
[0063] K = Cn; (1)
[0064] H = W * / s; (2)
[0065] W^=WKH; (3)
[0066] Where K represents the count reduction amount, C represents the vector of selection times, n represents the count coefficient constant, H represents the feedback reduction amount, and W... * Let s represent the priority sorting vector from the previous time step, s represent the delay coefficient constant, and W represent the current initial priority sorting vector. ^ This represents the final priority sorting vector.
[0067] In one embodiment of this disclosure, such as Figure 5 As shown in the embodiments of this disclosure, the dynamic scheduling method for virtual network interfaces (VFs) in container clusters can determine the scheduling of Pods to the matching VFs through the following steps, enabling finer-grained differentiation of VFs and precise optimization of VFs to shorten the fault handling path:
[0068] S502 obtains VF network card information in the PaaS layer;
[0069] S504, listen to the priority sorting table sent in the Hypervisor layer;
[0070] S506 determines the scheduling information based on the VF network interface information and the priority sorting table, whereby the scheduling information includes the VF network interface matched with the Pod;
[0071] S508 schedules Pods to the matching VF network interface based on scheduling information.
[0072] In one embodiment of this disclosure, after scheduling a Pod to a matching VF network interface according to a priority sorting table, the method for dynamic scheduling of virtual network interfaces for container clusters further includes updating the container status in the database.
[0073] Figure 6 This document presents a flowchart illustrating a specific example of a virtual network interface card (NIC) dynamic scheduling method for container clusters, as described in this disclosure. Figure 6 As shown in the embodiments of this disclosure, the method for dynamic scheduling of virtual network interface cards (NICs) for container clusters includes the following steps:
[0074] S601, Kube-vf-controller receives network card status information from the SRIOV module;
[0075] S602, the VF dynamic scheduling plugin listens to the status information in Kube-vf-controller;
[0076] S603, Check if the network card status information table matches the requirements. If it matches, proceed to step S601; otherwise, proceed to step S604.
[0077] S604, the VF dynamic scheduling plugin sends a priority sorting table request and waits for the priority sorting table;
[0078] S605, determine whether a priority sorting table has been received. If yes, proceed to step S608; otherwise, proceed to step S606.
[0079] S606, the VF priority module receives information from the VF delay detection module;
[0080] S607, the VF priority module merges the VF delayed adder information, the VF priority module returns the priority sorting table, and jumps to S604.
[0081] S608, the VF dynamic scheduling plugin sends container network interface binding information to Kube-APIServer for updates;
[0082] S609, Kube-APIServer updates information in ETCD;
[0083] In S610, when Kube-controller-manager detects a change (discovers an update), it notifies Kubelet to recreate the container based on the associated VF network interface, then terminates the previous container, completing the scheduling.
[0084] This invention can be adapted and implemented in network interface cards (NICs) of both carrier-grade IDC (Internet Data Center) and DC (Data Center) physical servers.
[0085] This public disclosure of dynamic scheduling VF ensures high availability of virtual network interface cards (NICs) for cloud-native data center virtual gateway applications and 5GC cloud-native applications.
[0086] This disclosure can be used to perform fine-grained analysis of the performance jitter of SRIOV (Single Root I / O Virtualization) technology on different brands of physical network cards, obtain the super-resolution capability limit, and formulate the optimal PF (Physical Function):VF ratio to ensure network stability in actual production environments.
[0087] This disclosure proposes a new dimension of automated operation and maintenance for network congestion scenarios, which involves reconfiguring links from switch or routing failures.
[0088] Based on the same inventive concept, this disclosure also provides a virtual network interface card (NIC) dynamic scheduling device for container clusters, as described in the following embodiments. Since the principle by which this device solves the problem is similar to that of the method embodiments described above, the implementation of this device embodiment can refer to the implementation of the method embodiments described above, and repeated details will not be elaborated further.
[0089] Figure 7 This illustration shows a schematic diagram of a virtual network interface card (NIC) dynamic scheduling device for container clusters according to an embodiment of the present disclosure, such as... Figure 7 As shown, the device includes: a delay detection module 71, a delay sorting module 72, a dynamic scheduling module 73, and a control management module 74.
[0090] The latency detection module 71 is used to send detection messages to the Virtual Functions (VF) network interface in the container cluster to obtain multiple VF network interface status information, including latency information and packet loss information.
[0091] The delayed sorting module 72 is used to perform weighted sorting and delayed updates on the status information of multiple VF network cards to determine the priority sorting table;
[0092] The dynamic scheduling module 73 is used to schedule Pods to matching VF network interfaces according to the priority sorting table.
[0093] In one example of this disclosure, the aforementioned delay sorting module 72 is further used to: in the Hypervisor layer, perform weighted sorting and delay update on the delay information and packet loss information in the VF network card status information to determine the priority sorting table.
[0094] In one example of this disclosure, the aforementioned delayed sorting module 72 is further configured to: calculate the priority weights of each VF network interface card status information in the Hypervisor layer, determine a preliminary priority sorting table based on the calculated priority weights, and perform delayed updates on the preliminary priority sorting table to determine the final priority sorting table.
[0095] In one example of this disclosure, the aforementioned delayed sorting module 72 is further configured to: obtain a preliminary priority sorting table, count the number of times the network interface card in the header is selected, and determine the count reduction amount based on the number of selections and the count coefficient constant; determine the feedback reduction amount based on the weights and delay coefficient constants in the preliminary priority sorting table; and determine the priority sorting table based on the preliminary priority sorting table, the count reduction amount, and the feedback reduction amount.
[0096] In one example of this disclosure, the aforementioned latency detection module 71 is further used to: in the Hypervisor layer, send detection messages to the latency status of VF network cards in the container cluster via probe injection to obtain status information returned by multiple VF network cards.
[0097] In one example of this disclosure, the dynamic scheduling module 73 is further configured to: obtain VF network interface information in the PaaS layer; listen to the priority sorting table sent in the Hypervisor layer; determine scheduling information based on the VF network interface information and the priority sorting table, wherein the scheduling information includes the VF network interface matched by the Pod; and schedule the Pod to the matched VF network interface based on the scheduling information.
[0098] The virtual network interface card dynamic scheduling device for container clusters also includes a control and management module 74, which is used to update the container status in the database.
[0099] It should be noted that the aforementioned delay detection module 71, priority module 72, and dynamic scheduling module 73 correspond to S202 to S206 in the method embodiment. These modules and their corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in the above method embodiment. It should also be noted that these modules, as part of the apparatus, can be executed in a computer system such as a set of computer-executable instructions.
[0100] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."
[0101] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.
[0102] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).
[0103] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section above according to various exemplary embodiments of this disclosure.
[0104] For example, the processing unit 810 can perform the following steps in the above method embodiment: send a detection message to the Virtual Function (VF) network interface in the container cluster to obtain multiple VF network interface status information, wherein the VF network interface status information includes latency information and packet loss information; perform weighted sorting and latency update on the multiple VF network interface status information to determine a priority sorting table; and schedule the Pod to the matching VF network interface according to the priority sorting table.
[0105] For example, the processing unit 810 can perform the following steps in the above method embodiment: in the Hypervisor layer, perform weighted sorting and delay update on the delay information and packet loss information in the VF network card status information to determine the priority sorting table.
[0106] For example, the processing unit 810 can perform the following steps in the above method embodiment: in the Hypervisor layer, calculate the priority weight of each VF network card status information, determine the preliminary priority sorting table according to the calculated priority weights; perform delayed updates on the preliminary priority sorting table, and determine the final priority sorting table.
[0107] For example, the processing unit 810 may execute the following steps of the above method embodiment: obtain a preliminary priority sorting table, count the number of times the network interface card in the header is selected, and determine the count reduction amount based on the number of selections and the count coefficient constant; determine the feedback reduction amount based on the weight and latency coefficient constant in the preliminary priority sorting table; and determine the priority sorting table based on the preliminary priority sorting table, the count reduction amount, and the feedback reduction amount.
[0108] For example, the processing unit 810 can execute the following steps of the above method embodiment: in the Hypervisor layer, send detection messages to the latency status of VF network cards in the container cluster through probe injection to obtain the status information returned by multiple VF network cards.
[0109] For example, the processing unit 810 can execute the following steps of the above method embodiment: in the PaaS layer, obtain VF network interface information; listen to the priority sorting table sent in the Hypervisor layer; determine scheduling information according to the VF network interface information and the priority sorting table, wherein the scheduling information includes the VF network interface matched by the Pod; and schedule the Pod to the matched VF network interface according to the scheduling information.
[0110] For example, the processing unit 810 may perform the following steps in the above method embodiment: update the container status in the database.
[0111] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0112] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0113] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0114] Electronic device 800 can also communicate with one or more external devices 840 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0115] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0116] In particular, according to embodiments of this disclosure, the process described above with reference to the flowchart can be implemented as a computer program product, which includes a computer program that, when executed by a processor, implements the above-described method for dynamic scheduling of virtual network interface cards for container clusters.
[0117] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, which may be a readable signal medium or a readable storage medium. Figure 9 This diagram illustrates a computer-readable storage medium according to an embodiment of the present disclosure, such as... Figure 9 As shown, the computer-readable storage medium 900 stores a program product capable of implementing the methods described above. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0118] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: sending detection messages to the Virtual Function (VF) network interface in the container cluster to obtain multiple VF network interface status information, wherein the VF network interface status information includes latency information and packet loss information; performing weighted sorting and latency update on the multiple VF network interface status information to determine a priority sorting table; and scheduling the Pod to the matching VF network interface according to the priority sorting table.
[0119] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: In the Hypervisor layer, the delay information and packet loss information in the VF network card status information are weighted, sorted, and delayed, and a priority sorting table is determined.
[0120] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: in the Hypervisor layer, calculate the priority weight of each VF network card status information, determine a preliminary priority ranking table based on the calculated priority weights, and perform a delayed update on the preliminary priority ranking table to determine the final priority ranking table.
[0121] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: obtaining a preliminary priority ranking table, counting the number of times the network interface card in the header is selected, determining the count reduction amount based on the number of selections and the count coefficient constant; determining the feedback reduction amount based on the weight and the delay coefficient constant in the preliminary priority ranking table; and determining the priority ranking table based on the preliminary priority ranking table, the count reduction amount, and the feedback reduction amount.
[0122] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: In the Hypervisor layer, a detection message is sent to the VF network interface card in the container cluster via probe injection to obtain the status information returned by multiple VF network interfaces.
[0123] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: in the PaaS layer, it obtains VF network interface information; it listens to the priority sorting table sent in the Hypervisor layer; it determines scheduling information based on the VF network interface information and the priority sorting table, wherein the scheduling information includes the VF network interface matched by the Pod; and it schedules the Pod to the matched VF network interface based on the scheduling information.
[0124] For example, when the program product in this embodiment is executed by the processor, it implements the following steps: updating the container state in the database.
[0125] More specific examples of computer-readable storage media in this disclosure may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0126] In this disclosure, a computer-readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device.
[0127] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0128] In practical implementation, program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0129] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0130] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0131] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0132] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A method for dynamic scheduling of virtual network interface cards (NICs) for container clusters, characterized in that, include: In the Hypervisor layer, detection messages are sent to the Virtual Functions (VF) network interfaces in the container cluster to obtain multiple VF network interface status information, including latency information and packet loss information. In the Hypervisor layer, the latency and packet loss information in the status information of the multiple VF network interface cards (NICs) are weighted, sorted, and updated with delays to determine a priority ranking table. This process includes: calculating the priority weights of each VF NIC status information in the Hypervisor layer; determining a preliminary priority ranking table based on the calculated priority weights; obtaining the preliminary priority ranking table; counting the number of times the NIC in the header is selected; determining the count reduction amount based on the selection count and a constant counting coefficient; determining the feedback reduction amount based on the weights and latency constants in the preliminary priority ranking table; and finally, determining the final priority ranking table based on the preliminary priority ranking table, the count reduction amount, and the feedback reduction amount. In the PaaS layer, obtain VF network card information and listen to the priority sorting table sent in the Hypervisor layer; In the PaaS layer, according to the priority sorting table, the Pod is scheduled to the matching VF network interface. The scheduling of the Pod to the matching VF network interface includes: the virtual network interface control component sending a message to the Kube-APIServer to update the value of the NodeSelector of the Pod in the ETCD database and add the matching VF network interface port annotation.
2. The method for dynamic scheduling of virtual network interface cards for container clusters according to claim 1, characterized in that, The step of sending detection messages to the Virtual Functions (VF) network interface in the container cluster to obtain multiple VF network interface status information includes: In the Hypervisor layer, the latency status of VF network interfaces in the container cluster is monitored by sending detection messages through probe injection to obtain status information returned by multiple VF network interfaces.
3. The method for dynamic scheduling of virtual network interface cards for container clusters according to claim 1, characterized in that, The step of scheduling a Pod to a matching VF network interface according to the priority sorting table includes: Based on the VF network interface information and priority sorting table, the scheduling information is determined, wherein the scheduling information includes the VF network interface matched with the Pod; Based on the scheduling information, the Pod is scheduled to the matching VF network interface.
4. The method for dynamic scheduling of virtual network interface cards for container clusters according to claim 1, characterized in that, After scheduling the Pod to a matching VF network interface according to the priority sorting table, the method further includes: Update the container status in the database.
5. A dynamic scheduling device for virtual network interface cards (NICs) in container clusters, characterized in that, include: The latency detection module is used in the Hypervisor layer to send detection messages to the Virtual Functions (VF) network interface cards in the container cluster to obtain multiple VF network interface card status information, wherein the VF network interface card status information includes latency information and packet loss information. The delay sorting module is used in the Hypervisor layer to perform weighted sorting and delay updates on the delay and packet loss information in the status information of the multiple VF network interface cards (NICs) to determine a priority sorting table. The step of performing weighted sorting and delay updates on the delay and packet loss information in the NIC status information in the Hypervisor layer to determine the priority sorting table includes: calculating the priority weight of each VF NIC status information in the Hypervisor layer; determining a preliminary priority sorting table based on the calculated priority weights; obtaining the preliminary priority sorting table; counting the number of times the NIC in the header is selected; determining the count reduction amount based on the selection count and a constant count coefficient; determining the feedback reduction amount based on the weights in the preliminary priority sorting table and a constant delay coefficient; and determining the final priority sorting table based on the preliminary priority sorting table, the count reduction amount, and the feedback reduction amount. The dynamic scheduling module is used in the PaaS layer to obtain VF network interface information and listen to the priority sorting table sent in the Hypervisor layer. In the PaaS layer, according to the priority sorting table, the Pod is scheduled to the matching VF network interface. The scheduling of the Pod to the matching VF network interface includes: the virtual network interface control component sending a message to the Kube-APIServer to update the NodeSelector value of the Pod in the ETCD database and add the matching VF network interface port annotation.
6. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the virtual network interface dynamic scheduling method for container clusters as described in any one of claims 1 to 4 by executing the executable instructions.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the virtual network interface dynamic scheduling method for container clusters as described in any one of claims 1 to 4.