Cluster node scheduling method and device, cluster system, storage medium and equipment

By creating a network resource management model in a Kubernetes cluster, monitoring and managing network resource usage on nodes in real time, and prohibiting scheduling when resources are insufficient, the problem of new containers being unable to be scheduled is solved, and resource allocation and service quality are optimized.

CN119520533APending Publication Date: 2025-02-25JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719564.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In Kubernetes cluster, it is impossible to sense the IP address occupancy on the node in real time, resulting in the new container being unable to be scheduled when the IP address on the node is used up.

Method used

By creating a network resource management model in the cluster system, the network resource usage on each work node is monitored and maintained in real time, and set it to the prohibited scheduling state when the network resource usage of the target work node exceeds the threshold.

Benefits of technology

It effectively avoids excessive centralized use of network resources, optimizes resource allocation, avoids the problem of new containers being unable to be scheduled, reduces the risk of service interruptions or performance degradation, and improves service quality and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520533A_ABST
    Figure CN119520533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of container management, and provides a cluster node scheduling method, a cluster node scheduling device, a cluster system, a computer readable storage medium and electronic equipment.The cluster node scheduling method is applied to the cluster system, and the cluster system comprises a plurality of working nodes. The cluster system further comprises a created network resource management model, the network resource management model is used for maintaining the network resource use condition on each working node, and the cluster node scheduling method comprises the following steps: reading the network resource use condition on each working node from the network resource management model; and when the network resource use condition corresponding to the target working node exceeds a resource use threshold value, setting the target working node to be in a scheduling forbidding state. According to the invention, the problem that the new container cannot be scheduled due to insufficient network resources on the node can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Kubernetes (often referred to as K8s because there are 8 characters between the first letter K and the last letter s) is an open source system for automating the deployment, expansion, and management of containerized applications. Kubernetes provides developers with an efficient, elastic, and scalable way to run distributed systems.

[0003] When using container networking in a k8s cluster, each container is assigned to a node and occupies an IP address on the node. However, it is currently impossible to perceive the IP occupancy on the node, so when the IP address on the node is used up, the new container cannot be scheduled.

[0004] In view of this, there is an urgent need in the art to develop a new cluster node scheduling method and device.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure. Summary of the invention

[0006] The purpose of the present disclosure is to provide a cluster node scheduling method, a cluster node scheduling device, a cluster system, a computer-readable storage medium and an electronic device, thereby at least to a certain extent overcoming the technical problem that a new container cannot be scheduled due to insufficient network resources on the node.

[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0008] According to a first aspect of the present disclosure, a cluster node scheduling method is provided, which is applied to a cluster system, wherein the cluster system includes a plurality of working nodes, and the cluster system also includes a created network resource management model, wherein the network resource management model is used to maintain network resource usage on each working node, and the method includes:

[0009] Reading the network resource usage on each working node from the network resource management model;

[0010] When the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

[0011] In an exemplary embodiment of the present disclosure, the network resource management model is created based on a custom resource mechanism;

[0012] The network resource management model maintains the network resource usage on each working node based on the control plug-in.

[0013] In an exemplary embodiment of the present disclosure, the control plug-in is used to monitor container change events on each working node in real time, and update network resource usage on each working node according to the container change event;

[0014] The container change event includes a container addition event and a container deletion event.

[0015] In an exemplary embodiment of the present disclosure, the network resource usage includes the number of idle network resources, and the number of idle network resources is determined according to the total amount of network resources and the number of used network resources;

[0016] When the network resource usage corresponding to the target working node exceeds the resource usage threshold, setting the target working node to a scheduling prohibited state includes:

[0017] When the number of idle network resources corresponding to the target working node is less than the available number threshold, the target working node is set to a scheduling prohibited state.

[0018] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the method further includes:

[0019] Allocate the newly created container to other working nodes;

[0020] The network resource usage corresponding to the other working nodes does not exceed the resource usage threshold.

[0021] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the method further includes:

[0022] When the network resource usage corresponding to the target working node changes and the changed network resource usage does not exceed the resource usage threshold, the target working node is reset to a schedulable state.

[0023] According to a second aspect of the present disclosure, a cluster node scheduling device is provided, the device being deployed in a cluster system, the cluster system comprising a plurality of working nodes, the cluster system further comprising a created network resource management model, the network resource management model being used to maintain network resource usage on each working node, the device comprising:

[0024] A resource usage acquisition module, used to read the network resource usage on each working node from the network resource management model;

[0025] The node status setting module is used to set the target working node to a scheduling prohibited state when the network resource usage corresponding to the target working node exceeds a resource usage threshold.

[0026] According to a third aspect of the present disclosure, a cluster system is provided, wherein the cluster system includes a plurality of working nodes, and the cluster system further includes:

[0027] Network resource management model, used to maintain network resource usage on each working node;

[0028] The scheduler is used to read the network resource usage on each working node from the network resource management model; when the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

[0029] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the cluster node scheduling method described in the first aspect is implemented.

[0030] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the cluster node scheduling method described in the first aspect above by executing the executable instructions.

[0031] It can be seen from the above technical solutions that the cluster node scheduling method, cluster node scheduling device, cluster system, computer-readable storage medium and electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:

[0032] In the technical solutions provided in some embodiments of the present disclosure, on the one hand, by creating a network resource management model in the cluster system, the network resource usage on each working node is maintained based on the network resource management model, and then the network resource usage on each working node is read from the network resource management model, so that the network resource usage of each working node can be monitored and perceived in real time, and the scheduling status of the node can be dynamically adjusted according to the preset resource usage threshold, which can effectively avoid excessive concentrated use of network resources, thereby optimizing the resource allocation of the entire cluster system; on the other hand, by setting the target working node to a scheduling prohibited state when the network resource usage corresponding to the target working node exceeds the resource usage threshold, it can avoid allocating new containers to working nodes with insufficient resources, thereby solving the problem of the inability to schedule new containers due to insufficient network resources on the node, and avoiding the problem of service interruption or performance degradation caused by the inability to schedule containers, reducing the risk of failures, improving service quality, and optimizing user experience.

[0033] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0035] Figure 1 A schematic diagram showing a flow chart of a cluster node scheduling method in an embodiment of the present disclosure;

[0036] Figure 2 The overall architecture diagram of the cluster node scheduling method in the embodiment of the present disclosure is shown;

[0037] Figure 3 A schematic diagram showing the structure of a cluster node scheduling device in an exemplary embodiment of the present disclosure is shown;

[0038] Figure 4 A schematic diagram showing the structure of a cluster system in an exemplary embodiment of the present disclosure is shown;

[0039] Figure 5 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0040] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0041] The terms "a", "an", "the" and "said" are used in this specification to indicate the presence of one or more elements / components / etc.; the terms "including" and "having" are used to express an open-ended inclusion and mean that additional elements / components / etc. may exist in addition to the listed elements / components / etc.; the terms "first" and "second" etc. are used only as labels and are not intended to limit the quantity of their objects.

[0042] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and their repeated descriptions will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities.

[0043] In a k8s cluster, when using a container network, each running container will occupy an IP (Internet Protocol), and IP is a limited resource like CPU (Central Processing Unit) and memory. Therefore, when resources such as CPU and memory are sufficient but IP is used up, the creation of a new container will fail. However, in the related technology, it is impossible to perceive the occupancy of IP in real time. Only after the failure of creating a new container can it be known that there is no IP, which may cause the container to be assigned to a node without IP, affecting the scheduling of the new container.

[0044] In an embodiment of the present disclosure, a cluster node scheduling method is first provided, which at least to some extent overcomes the defect in the related art that a new container cannot be scheduled due to insufficient network resources on the node.

[0045] Figure 1 A flow chart of a cluster node scheduling method in an embodiment of the present disclosure is shown. The execution subject of the cluster node scheduling method may be a cluster system, for example, a kubernetes system.

[0046] refer to Figure 1 According to an embodiment of the present disclosure, a cluster node scheduling method includes the following steps:

[0047] Step S110, reading the network resource usage on each working node from the network resource management model;

[0048] Step S120, when the network resource usage corresponding to the target working node exceeds the resource usage threshold, setting the target working node to a scheduling prohibited state;

[0049] The above method is applied to a cluster system, which includes multiple working nodes. The cluster system also includes a created network resource management model, which is used to maintain the network resource usage on each working node.

[0050] exist Figure 1In the technical solution provided by the illustrated embodiment, on the one hand, by creating a network resource management model in the cluster system, the network resource usage on each working node is maintained based on the network resource management model, and then the network resource usage on each working node is read from the network resource management model, so that the network resource usage of each working node can be monitored and perceived in real time, and the scheduling status of the node can be dynamically adjusted according to the preset resource usage threshold, which can effectively avoid excessive concentrated use of network resources, thereby optimizing the resource allocation of the entire cluster system; on the other hand, by setting the target working node to a scheduling prohibited state when the network resource usage corresponding to the target working node exceeds the resource usage threshold, it can avoid allocating new containers to working nodes with insufficient resources, thereby solving the problem of the inability to schedule new containers due to insufficient network resources on the node, and avoiding service interruption or performance degradation caused by the inability to schedule containers, reducing the risk of failures, improving service quality, and optimizing user experience.

[0051] The following Figure 1 The specific implementation process of each step is described in detail:

[0052] First of all, it should be noted that the cluster system of the present disclosure includes multiple independent working nodes, each of which is a separate computing unit in the cluster, which can be a physical server or a virtual machine. The working nodes can run the same software and can communicate with each other through the network. The working nodes in the cluster can process tasks collaboratively or serve as backups in case other nodes fail.

[0053] The network resources in the present disclosure may be Internet Protocol addresses, i.e., IP resources. For example, the above network resources may also be URLs (Uniform Resource Locator) / URIs (Uniform Resource Identifier), domain names, certificates, and keys, etc., which may be set according to actual conditions, and the present disclosure does not make any special limitation on this.

[0054] The present disclosure can pre-define a network resource management model (IPResource) in the cluster system using a custom resource mechanism (i.e., CRD extension mode), and the role of the network resource management model is to maintain the network resource usage on each working node. Among them, the CRD extension mode allows a new resource type to be registered with the Kubernetes API server. This means that a set of custom objects can be created that have their own behaviors and semantics, but they can still be managed and controlled through the Kubernetes API.

[0055] Specifically, the network resource management model can use a control plug-in (CNI-Operator) to maintain the network resource usage on each of the above working nodes. Specifically, the control plug-in can monitor the container change events on each working node in real time, and update the network resource usage on each working node according to the container change events.

[0056] Among them, the above-mentioned container change events may include container addition events and container deletion events. Since IP resources need to be allocated to the new container when a new container is created, an idle IP on the working node will be occupied when a new container is created, and an available IP address will be released on the working node when a container is deleted. Therefore, the number of used IPs on each working node can be calculated based on the number of pods using the container network on each working node (excluding the host network, which does not occupy IP resources), and then the number of idle IPs (the number of idle network resources) on each working node can be calculated based on the difference between the total number of IPs (total number of network resources) and the number of used IPs (the number of used network resources).

[0057] The CNI (Container Network Interface) plug-in is a standard tool for configuring container network interfaces. In Kubernetes, the CNI plug-in is responsible for allocating IP addresses to Pods, setting network namespaces, and configuring network policies. Common CNI plug-ins include Calico and Flannel.

[0058] Kubernetes Operator is a way to extend the functionality of Kubernetes by building applications on top of the Kubernetes API. Operator is a special controller that automates complex operations such as configuration, scaling, and backup.

[0059] The following is an example of the configuration of the network resource management model in the embodiment of the present disclosure:

[0060] apiVersion:example.com / IPresource / *The API version to which the object belongs is example.com / IPresource, which indicates that the resource belongs to a specific API group of example.com* / ;

[0061] kind:IPResource / *Specifies the type of the object. Here it is IPResource, indicating that the configuration defines an IP resource* /

[0062] metadata: / *Object metadata, including name and other tags and other attributes* /

[0063] name:192.***.1.*

[0064] labels:

[0065] mode:node

[0066] spec: / *describes the specific specifications or configuration of the object* /

[0067] capacity:110

[0068] status: / *Describes the current status of the object* /

[0069] used:40

[0070] In the above configuration, name represents the node ID, capacity represents the total number of IP addresses, and CNI can calculate and modify the maximum number of available IP addresses of each working node in real time according to actual conditions. Used represents the number of used IP addresses in the current node.

[0071] Next reference Figure 1 In step S110, the network resource usage on each working node is read from the network resource management model.

[0072] In this step, considering that the above-mentioned network resource management model can maintain the network resource usage on each working node, the network resource usage on each working node can be traversed from the network resource management model to perceive in real time whether the network resources on each working node are exhausted.

[0073] In step S120, when the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

[0074] In this step, when it is perceived that the network resource usage corresponding to the target work node exceeds the resource usage threshold, the target work node can be set to a scheduling prohibited state. Specifically, when the number of idle network resources corresponding to the target work node is less than the available number threshold (for example: 1), the target work node can be set to a scheduling prohibited state, so that when allocating an IP for a new container, the new container cannot be allocated to the target work node, and the new container can be allocated to other work nodes whose number of idle network resources does not exceed the resource usage threshold (that is, the number of idle network resources is greater than or equal to the available number threshold) to avoid allocating the new container to a work node without an IP.

[0075] Optionally, after setting the target working node to a prohibited scheduling state, the present disclosure may also reset the target working node to a schedulable state when it is monitored that the network resource usage corresponding to the target working node has changed and the changed network resource usage has not exceeded the resource usage threshold, so as to update the node status in real time according to actual conditions.

[0076] refer to Figure 2 , Figure 2 The overall architecture diagram of the cluster node scheduling method in the embodiment of the present disclosure is shown as follows: Figure 2 As shown:

[0077] The above architecture includes the following parts: CNI-operator, kube-apiserver, etcd, and kube-scheduler;

[0078] Among them, CNI-operator is responsible for creating and updating IPResource. The total IP capacity of each node in the cluster; monitor the container network pod, and update the number of used IPs in real time according to events such as adding containers and deleting containers on the node;

[0079] kube-apiserver is one of the core components of the Kubernetes cluster. It is the front-end API server of the cluster and is responsible for providing access to the Kubernetes API. kube-apiserver provides an abstraction layer that allows users and cluster components to interact with the cluster through a standard RESTful interface.

[0080] kube-apiserver can manage containers (pods), nodes (nodes), and IP resources (IPRrsource) through etcd, which is a distributed key-value storage system mainly used for shared configuration and service discovery. It is developed by CoreOS and open sourced on GitHub as an independent project. ETCD uses the Raft consensus algorithm to ensure data consistency and reliability, making it a powerful tool, especially when building distributed systems.

[0081] kube-scheduler defines the extension plug-in IPResourceFilterPlugin, obtains and traverses IPResource resources from the IPResource model. When the number of idle network resources (capacity-used) of IPResource is greater than 0, the working node can be set to a schedulable state, otherwise, the working node is set to a prohibited scheduling state.

[0082] Based on the above technical solutions, the present disclosure has at least the following technical effects:

[0083] First, by defining a network resource management model, based on the cloud-native self-defined resource capability, using the Operator mechanism to manage IP resources, and using the extended plug-in IPResourceFilterPlugin to enable container scheduling to perceive IP resource usage;

[0084] Second, without changing the original Kubernetes scheduling architecture, it achieves zero-intrusive IP resource management and awareness.

[0085] Third, the defined network resource management model can be deployed only on a single working node, or it can be deployed in a cluster system to uniformly manage all working nodes. It can be expanded according to actual needs to achieve management and perception of IP resources in various scenarios.

[0086] The present disclosure also provides a cluster node scheduling device, which is deployed in a cluster system, wherein the cluster system includes multiple working nodes, and the cluster system also includes a created network resource management model, wherein the network resource management model is used to maintain the network resource usage on each working node. Figure 3 A schematic diagram showing the structure of a cluster node scheduling device in an exemplary embodiment of the present disclosure is shown; Figure 3 As shown, the cluster node scheduling device 300 may include a resource usage acquisition module 310 and a node status setting module 320. Among them:

[0087] The resource usage acquisition module 310 is used to read the network resource usage on each working node from the network resource management model;

[0088] The node status setting module 320 is used to set the target working node to a scheduling prohibited state when the network resource usage corresponding to the target working node exceeds a resource usage threshold.

[0089] In an exemplary embodiment of the present disclosure, the network resource management model is created based on a custom resource mechanism;

[0090] The network resource management model maintains the network resource usage on each working node based on the control plug-in.

[0091] In an exemplary embodiment of the present disclosure, the control plug-in is used to monitor container change events on each working node in real time, and update network resource usage on each working node according to the container change event;

[0092] The container change event includes a container addition event and a container deletion event.

[0093] In an exemplary embodiment of the present disclosure, the network resource usage includes the number of idle network resources, and the number of idle network resources is determined according to the total amount of network resources and the number of used network resources;

[0094] When the network resource usage corresponding to the target working node exceeds the resource usage threshold, the node status setting module 320 sets the target working node to a scheduling prohibition state, including:

[0095] When the number of idle network resources corresponding to the target working node is less than the available number threshold, the target working node is set to a scheduling prohibited state.

[0096] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the node state setting module 320 is further configured to:

[0097] Allocate the newly created container to other working nodes;

[0098] The network resource usage corresponding to the other working nodes does not exceed the resource usage threshold.

[0099] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the node state setting module 320 is further configured to:

[0100] When the network resource usage corresponding to the target working node changes and the changed network resource usage does not exceed the resource usage threshold, the target working node is reset to a schedulable state.

[0101] The specific details of each module in the above cluster node scheduling device have been described in detail in the corresponding cluster node scheduling method, so they will not be repeated here.

[0102] The present disclosure also provides a cluster system, wherein the cluster system includes a plurality of working nodes. Figure 4 FIG. 2 shows a schematic diagram of the structure of a cluster system in an exemplary embodiment of the present disclosure; FIG. Figure 4 As shown, the cluster system 400 may include a network resource management model 410 and a scheduler 420. Among them:

[0103] The network resource management model 410 is used to maintain the network resource usage on each working node;

[0104] The scheduler 420 is used to read the network resource usage on each working node from the network resource management model; when the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

[0105] In an exemplary embodiment of the present disclosure, the network resource management model is created based on a custom resource mechanism;

[0106] The network resource management model maintains the network resource usage on each working node based on the control plug-in.

[0107] In an exemplary embodiment of the present disclosure, the control plug-in is used to monitor container change events on each working node in real time, and update network resource usage on each working node according to the container change event;

[0108] The container change event includes a container addition event and a container deletion event.

[0109] In an exemplary embodiment of the present disclosure, the network resource usage includes the number of idle network resources, and the number of idle network resources is determined according to the total amount of network resources and the number of used network resources;

[0110] When the network resource usage corresponding to the target working node exceeds the resource usage threshold, the scheduler 420 sets the target working node to a scheduling prohibited state, including:

[0111] When the number of idle network resources corresponding to the target working node is less than the available number threshold, the target working node is set to a scheduling prohibited state.

[0112] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the scheduler 420 is further configured to:

[0113] Allocate the newly created container to other working nodes;

[0114] The network resource usage corresponding to the other working nodes does not exceed the resource usage threshold.

[0115] In an exemplary embodiment of the present disclosure, after setting the target working node to a scheduling-disabled state, the scheduler 420 is further configured to:

[0116] When the network resource usage corresponding to the target working node changes and the changed network resource usage does not exceed the resource usage threshold, the target working node is reset to a schedulable state.

[0117] The specific details of each module in the above cluster system have been described in detail in the corresponding cluster node scheduling method, so they will not be repeated here.

[0118] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0119] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0120] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0121] The present disclosure also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device.

[0122] The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0123] Computer-readable storage media can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0124] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.

[0125] In addition, an electronic device capable of implementing the above method is also provided in an embodiment of the present disclosure.

[0126] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0127] Refer to the following Figure 5 The electronic device 500 according to this embodiment of the present disclosure is described. Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0128] like Figure 5 As shown, the electronic device 500 is in the form of a general computing device. The components of the electronic device 500 may include but are not limited to: at least one processor 510, at least one memory 520, a bus 530 connecting different system components (including the memory 520 and the processor 510), and a display 540.

[0129] The memory stores program codes, which can be executed by the processor 510, so that the processor 510 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processor 510 can perform the following steps: Figure 1 As shown in: Step S110, reading the network resource usage on each working node from the network resource management model; Step S120, when the network resource usage corresponding to the target working node exceeds the resource usage threshold, setting the target working node to a scheduling prohibited state.

[0130] The memory 520 may include a readable medium in a volatile storage form, such as a random access memory (RAM) 5201 and / or a cache memory 5202 , and may further include a read-only memory (ROM) 5203 .

[0131] The memory 520 may also include a program / utility 5204 having a set (at least one) of program modules 5205, such program modules 5205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0132] Bus 530 may be a bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0133] The electronic device 500 may also communicate with one or more external devices 600 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 500, and / or communicate with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 550. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 560. As shown, the network adapter 560 communicates with other modules of the electronic device 500 via a bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0134] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A cluster node scheduling method, characterized in that: Applied to a cluster system, the cluster system includes a plurality of working nodes, the cluster system also includes a created network resource management model, the network resource management model is used to maintain the network resource usage on each working node, the method includes: Reading the network resource usage on each working node from the network resource management model; When the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

2. The method according to claim 1, characterized in that The network resource management model is created based on a custom resource mechanism; The network resource management model maintains the network resource usage on each working node based on the control plug-in.

3. The method according to claim 2, characterized in that The control plug-in is used to monitor the container change events on each working node in real time, and update the network resource usage on each working node according to the container change events; The container change event includes a container addition event and a container deletion event.

4. The method according to any one of claims 1 to 3, characterized in that: The network resource usage includes the number of idle network resources, and the number of idle network resources is determined according to the total amount of network resources and the number of used network resources; When the network resource usage corresponding to the target working node exceeds the resource usage threshold, setting the target working node to a scheduling prohibited state includes: When the number of idle network resources corresponding to the target working node is less than the available number threshold, the target working node is set to a scheduling prohibited state.

5. The method according to claim 4, characterized in that After setting the target working node to a scheduling-disabled state, the method further includes: Allocate the newly created container to other working nodes; The network resource usage corresponding to the other working nodes does not exceed the resource usage threshold.

6. The method according to claim 4, characterized in that After setting the target working node to a scheduling-disabled state, the method further includes: When the network resource usage corresponding to the target working node changes and the changed network resource usage does not exceed the resource usage threshold, the target working node is reset to a schedulable state.

7. A cluster node scheduling device, characterized in that: Deployed in a cluster system, the cluster system includes multiple working nodes, the cluster system also includes a created network resource management model, the network resource management model is used to maintain the network resource usage on each working node, the device includes: A resource usage acquisition module, used to read the network resource usage on each working node from the network resource management model; The node status setting module is used to set the target working node to a scheduling prohibited state when the network resource usage corresponding to the target working node exceeds a resource usage threshold.

8. A cluster system, characterized in that: The cluster system includes a plurality of working nodes, and the cluster system also includes: Network resource management model, used to maintain network resource usage on each working node; The scheduler is used to read the network resource usage on each working node from the network resource management model; when the network resource usage corresponding to the target working node exceeds the resource usage threshold, the target working node is set to a scheduling prohibited state.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the cluster node scheduling method according to any one of claims 1 to 6 is implemented.

10. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the cluster node scheduling method according to any one of claims 1 to 6 by executing the executable instructions.