Method, device, computing equipment and medium for scheduling computing units
By selecting nodes of different topological domains based on metadata information in the K8S cluster for computing unit scheduling, the problem of application pods dispatching to the same topological domain in the cluster is solved, and the reliability of the system is improved.
Patent Information
- Application Number
- CN202110114862.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-27
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-01-27
AI Technical Summary
In K8S cluster, anti-affinity scheduling methods based on nodes and pods may cause the application's pods to be scheduled to different nodes in the same topological domain, resulting in that when the device in the topological domain fails, all pods of the application are affected and the system reliability is poor.
By responding to a request for the target cluster, the computing unit corresponding to the target application identification is determined, and based on the metadata information in the preset storage location, the topological domain information is selected to bind to a node different from the bound nodes in other clusters to complete the scheduling of the computing unit.
Schedules the computing units of the application to nodes belonging to different topological domains, so that when a certain topological domain device fails, the computing units running in other topological domains will not affect the system's reliability.
Smart Images

Figure CN113760499B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the fields of computer technology, Internet technology, and electronic technology, and more specifically, to a method, apparatus, computing device, and medium for scheduling computing units. Background Art
[0002] K8S cluster uses two methods for anti-affinity scheduling: node-based anti-affinity scheduling and pod-based anti-affinity scheduling. Among them, the node-based anti-affinity scheduling method uses the scheduler to compare the node label and the pod anti-affinity setting when scheduling a node. If the node label and the pod anti-affinity setting match, the node will not be scheduled. The pod-based anti-affinity scheduling method uses the scheduler to compare the labels of all pods on the node and the pod's anti-affinity setting when scheduling a node. If the pod label and the pod's anti-affinity setting match, the node will not be scheduled.
[0003] When some nodes in different clusters are located in the same server rack (i.e., the topology domain is the same), the above two scheduling methods may schedule the pods of the application to nodes in different clusters that belong to the same topology domain. In this case, when a device such as a switch in the topology domain fails, all pods of the application will be affected, resulting in poor reliability. Summary of the invention
[0004] In view of this, the present disclosure provides a method, apparatus, computing device and medium for scheduling computing units.
[0005] One aspect of the present disclosure provides a method for scheduling computing units, including: in response to a first request for a target cluster, determining a first computing unit corresponding to a target application identifier included in the first request, wherein the target cluster includes at least one available node; upon determining that a preset storage location stores first metadata, obtaining the first metadata from the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node currently bound to the target application identifier in other clusters other than the target cluster; determining, from the at least one available node, an available node whose topological domain information is different from that of the at least one second node as a first node; and binding the first node to the first computing unit to complete the scheduling of the first computing unit.
[0006] According to an embodiment of the present disclosure, the method further includes: when it is determined that the preset storage location does not store the first metadata, determining any one of the at least one available node as the first node according to a preset rule.
[0007] According to an embodiment of the present disclosure, the method further includes: converting the target application identifier and the topological domain information of the first node into second metadata, and storing the second metadata in the preset storage location.
[0008] According to an embodiment of the present disclosure, the target cluster further includes an application program interface server; the method further includes: acquiring a first request from a user terminal through the application program interface server.
[0009] According to an embodiment of the present disclosure, the target cluster further includes a scheduler; and determining the first computing unit corresponding to the target application identifier includes: creating the first computing unit corresponding to the target application identifier through the scheduler in the target cluster.
[0010] According to an embodiment of the present disclosure, the method further includes: sending the target application identifier and the topology domain information of the first node to an application program interface server in the target cluster.
[0011] According to an embodiment of the present disclosure, converting the correspondence between the target application identifier and the topological domain information of the first node into the second metadata includes: monitoring the application interface server to obtain the target application identifier and the topological domain information of the first node, and converting the target application identifier and the topological domain information of the first node into the second metadata.
[0012] According to an embodiment of the present disclosure, the preset storage location includes the cache of the scheduler; storing the second metadata to the preset storage location includes: monitoring the metadata controller through the scheduler to obtain the second metadata, and storing the second metadata in the cache of the scheduler.
[0013] According to an embodiment of the present disclosure, the method further includes: generating a scheduling result through the scheduler, and sending the scheduling result to the application interface server; and returning the scheduling result to the user terminal through the application interface server.
[0014] Another aspect of the present disclosure provides a device for scheduling computing units, including: a request acquisition module, used to acquire a first request for a target cluster, wherein the first request includes a target application identifier, and the target cluster includes at least one available node; a computing unit determination module, used to determine a first computing unit corresponding to the target application identifier; a metadata acquisition module, used to acquire the first metadata from a preset storage location when the first metadata is stored in the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node bound to the target application identifier in other clusters other than the target cluster; a node determination module, used to determine, from the at least one available node, an available node whose topological domain information is different from that of the at least one second node, as a first node; and a binding module, used to bind the first node to the first computing unit to complete the scheduling of the first computing unit.
[0015] Another aspect of the present disclosure provides a computing device, including: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.
[0016] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0017] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0018] According to an embodiment of the present disclosure, when it is necessary to deploy computing units of an application in different clusters, these computing units are scheduled to nodes belonging to different topological domains based on metadata information, so that when a device in a topological domain fails, it will not affect the computing units running in other topological domains, thereby improving system reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0020] Figure 1 Schematically illustrates an exemplary application scenario in which the method and apparatus for scheduling a computing unit according to an embodiment of the present disclosure can be applied;
[0021] Figure 2 A flowchart of a method for scheduling a computing unit according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 3A An exemplary system architecture to which a method and apparatus for scheduling computing units according to another embodiment of the present disclosure may be applied is schematically shown;
[0023] Figure 3B A flowchart of a method for scheduling a computing unit according to another embodiment of the present disclosure is schematically shown;
[0024] Figure 4 A block diagram schematically shows a scheduling calculation unit device according to an embodiment of the present disclosure; and
[0025] Figure 5 A block diagram of a computer system suitable for implementing the method described in the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0029] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] The embodiment of the present disclosure provides a method for scheduling computing units and a device capable of applying the method. The method includes: in response to a first request for a target cluster, determining a first computing unit corresponding to a target application identifier included in the first request, wherein the target cluster includes at least one available node; in the case of determining that a preset storage location stores first metadata, obtaining the first metadata from the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node currently bound to the target application identifier in other clusters other than the target cluster; determining an available node from at least one available node whose topological domain information is different from that of at least one second node as the first node; and binding the first node to the first computing unit to complete the scheduling of the first computing unit.
[0031] Figure 1 An exemplary application scenario 100 in which the method and apparatus for scheduling a computing unit according to an embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown are merely examples of application scenarios to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0032] like Figure 1 As shown, the application scenario 100 according to this embodiment may include cluster 1, cluster 2 and switch 3. Cluster 1 and cluster 2 each include multiple nodes, and some nodes in cluster 1 and cluster 2 belong to the same topology domain, and switch 3 is a network switching device in the topology domain.
[0033] Exemplarily, in this embodiment, the application has two computing units, pod1 and pod2. The two pods need to be executed by nodes in cluster1 and cluster2 respectively.
[0034] First, cluster1 is requested to schedule nodes for pod1. Then cluster2 is requested to schedule nodes for pod2.
[0035] Related Technology When cluster2 schedules nodes for pod2, cluster2 cannot know whether the nodes to be scheduled belong to the same topological domain as the nodes already scheduled by cluster1. Therefore, it is possible to schedule pod2 to a node that belongs to the same topological domain as the nodes already scheduled by cluster1.
[0036] If the switch 10 in the topology domain fails at this time, the two pods of the application program will not be able to run normally, which will have a significant impact on the application program, especially for database service programs.
[0037] According to the embodiment of the present disclosure, when cluster1 schedules a node, the scheduled node information is stored in the form of metadata information, and when cluster2 schedules a node, pod2 can be scheduled to a node that belongs to a different topological domain from the scheduled node based on the metadata information. Therefore, when a device in a topological domain fails, it will not affect the computing units running in other topological domains, thereby improving system reliability.
[0038] It should be understood that Figure 1 The number of clusters, nodes, and switches in the embodiment is only for illustration. Any number of clusters, nodes, and switches may be provided as required.
[0039] Figure 2 The flowchart of the method for scheduling computing units according to an embodiment of the present disclosure is schematically shown.
[0040] like Figure 2 As shown, the method includes, in operation S210, in response to a first request for a target cluster, determining a first computing unit corresponding to a target application identifier included in the first request.
[0041] According to an embodiment of the present disclosure, a cluster may include one or more nodes, and one or more computing units (pods) may run in a node. Among them, a node may be, for example, a virtual machine or a physical machine. A computing unit may be, for example, an instance of a single application, which may include one or more containers or container groups. Exemplarily, in this embodiment, a cluster may be, for example, a k8s cluster, but the present disclosure is not limited thereto.
[0042] According to an embodiment of the present disclosure, the target cluster includes at least one available node, an application program interface server and a scheduler. The first request from the user terminal can be obtained through the application program interface server. Then, the first computing unit corresponding to the target application identifier can be created through the scheduler in the target cluster.
[0043] Then, in operation S220, if it is determined that the preset storage location stores the first metadata, the first metadata is acquired from the preset storage location.
[0044] The first metadata includes topological domain information of at least one second node, where the second node is a node currently bound to the target application identifier in other clusters except the target cluster. The second node may be, for example, a node to which a computing unit has been allocated. The topological domain information may include, for example, an identifier of a server where the node is located, an identifier of a server rack, and the like.
[0045] According to an embodiment of the present disclosure, the preset storage location may include, for example, a cache of a scheduler. It should be noted that, in actual application, the preset storage location may also include other storage locations, which is not specifically limited in the present disclosure.
[0046] In operation S230, an available node having topology domain information different from that of at least one second node is determined from at least one available node as a first node.
[0047] According to an embodiment of the present disclosure, available nodes can be screened according to topological domain information. More specifically, the identifier of the server where each available node is located can be determined, and the identifier of the server rack where the server is located can be determined based on the identifier of the server, and then it is determined whether the identifier of the server rack is consistent with the identifier of the server rack of the second node. If they are consistent, the available node is screened out, and if they are inconsistent, the available node is retained. It should be noted that in addition to screening the available nodes according to the topological domain information, they can also be screened according to other preset rules. The preset rules can, for example, include at least one filtering rule, such as hardware constraint rules, constraint rule software, policy constraint rules, etc.
[0048] According to an embodiment of the present disclosure, if there is one available node after screening, the available node after screening is used as the first node. If there are multiple available nodes after screening, the multiple available nodes can be scored, and the best available node can be selected as the first node according to the score. Among them, the scoring factors may include, for example, resource requirements of a single pod and a pod set, data location, interference and deadline of workloads, etc.
[0049] According to an embodiment of the present disclosure, when it is determined that the preset storage location does not store the first metadata, any one of the at least one available node can be determined as the first node according to a preset rule other than the metadata rule.
[0050] In operation S240, the first node is bound to the first computing unit to complete scheduling of the first computing unit.
[0051] According to an embodiment of the present disclosure, the scheduler can determine a node that does not belong to the same topological domain as the bound nodes in other clusters from all available nodes based on the topological domain information in the first metadata, bind it to the first computing unit, and allocate it to the first computing unit.
[0052] According to an embodiment of the present disclosure, after the first node is bound to the first computing unit, the target application identifier and the topological domain information of the first node may be converted into second metadata, and the second metadata may be stored in a preset storage location to record the binding relationship between the target application identifier and the first node and the topological domain information of the bound first node in the preset storage location.
[0053] More specifically, the metadata controller can be used to monitor the application program interface server, and when the application program interface server records data, the recorded target application identifier and the topological domain information of the first node are obtained, and the target application identifier and the topological domain information of the first node are converted into metadata (i.e., second metadata), which are stored in the metadata controller. Then, the scheduler is used to monitor the metadata controller, and when the metadata controller updates the metadata, the updated metadata is obtained, and the metadata is stored in the cache of the scheduler for subsequent use.
[0054] According to an embodiment of the present disclosure, a scheduling result may also be generated by a scheduler, and the scheduling result may be sent to an application program interface server, and then the scheduling result may be returned to a user terminal through the application program interface server. The scheduling result may be used to indicate whether the scheduling is successful. If the scheduling is successful, the scheduling result may include relevant information of the first node assigned to the first computing unit.
[0055] According to an embodiment of the present disclosure, when it is necessary to deploy computing units of an application in different clusters, these computing units are scheduled to nodes belonging to different topological domains based on metadata information, so that when a device in a topological domain fails, it will not affect the computing units running in other topological domains, thereby improving system reliability.
[0056] Reference below Figure 3A to Figure 3B , combined with specific embodiments Figure 2 Those skilled in the art will appreciate that the following exemplary embodiments are only used to understand the present disclosure, and the present disclosure is not limited thereto.
[0057] Figure 3A An exemplary system architecture to which the method and apparatus for scheduling computing units according to another embodiment of the present disclosure can be applied is schematically shown.
[0058] like Figure 3AAs shown, the system architecture according to this embodiment may include a user terminal (user), cluster (cluster) 1, cluster 2 and a metadata controller. Among them, cluster 1 and cluster 2 respectively include an application interface server (apiserver) and a scheduler (scheduler). The scheduler can be used to monitor newly created Pods that do not specify running nodes, and select nodes for the Pods to run on. The system architecture may also include a key-value database, which is used as a background database for storing all cluster data. The key-value database may be, for example, etcd. The system architecture may be based on k8s, for example.
[0059] Figure 3B The flowchart of the method for scheduling computing units according to another embodiment of the present disclosure is schematically shown.
[0060] like Figure 3A and 3B As shown, the user sends a request to the application program interface server in cluster 1 through the user terminal.
[0061] The API server in cluster 1 receives the request from the user terminal and notifies the scheduler in the same cluster. The scheduler creates pod 1 with the application name app1.
[0062] After the scheduler monitors the unscheduled pod1, it determines whether there is metadata information in the cache. Since there is no metadata information in the cache initially, it selects a list of available nodes according to other filtering methods in the preset filtering method except the metadata method. Then it scores each node in the list, selects the best node based on the score, and binds the best node to the pod1 so that the pod1 runs on the best node.
[0063] The scheduler in cluster 1 sends the binding relationship between pod1 and node back to the program interface server, and the program interface server 211 uploads the node information including the binding relationship between node and pod (or pods) and the topological domain information to the database. The topological domain information may include, for example, the identifier of the server where the node is located, the identifier of the server rack (e.g., POD1, POD2, POD3, etc.). The node information may also include the node's requested resources, available resources, resource upper limit, mirror status, conditions, etc.
[0064] The metadata controller monitors the application interface server and scheduler in cluster 1, records the binding relationship between pod1 and the node, and the topological domain information of the node, and converts it into metadata information.
[0065] The schedulers in cluster 1 and cluster 2 monitor the resources of the metadata controller, and when metadata information is generated or updated, obtain the generated or updated metadata information and synchronize the metadata information to the local cache.
[0066] The user sends a request to the application program interface server in cluster 2 through the user terminal.
[0067] The application program interface server in cluster 2 receives the request from the user terminal, creates pod2 with the application name app1, and updates the relevant information of pod2 to the database.
[0068] After the scheduler in cluster 2 monitors the unscheduled pod2, it filters out qualified nodes for pod2 through a preset filtering method including metadata. Among them, filtering according to the metadata method includes searching for topological domain information corresponding to app1 in the metadata information. For the node to be filtered, if the topological domain information of the node is consistent with the information found in the metadata information, it will be filtered out, otherwise it will be retained. After filtering out the qualified nodes, pod2 is bound to the filtered nodes. The scheduling result is returned to the application interface server. The application interface server responds to the result to the user terminal.
[0069] The metadata controller monitors the application interface server and scheduler in cluster 2, records the binding relationship between pod2 and the node, and the topological domain information of the node, and converts it into metadata information.
[0070] According to the method of the embodiment of the present disclosure, pods of the same application are scheduled to different topology domains, thereby improving system reliability.
[0071] Figure 4 A block diagram of a scheduling calculation unit device according to an embodiment of the present disclosure is schematically shown.
[0072] like Figure 4 As shown, the scheduling computing unit device 400 includes a request acquisition module 410, a computing unit determination module 420, a metadata acquisition module 430, a node determination module 440 and a binding module 450.
[0073] The request acquisition module 410 may be used to acquire a first request for a target cluster, wherein the first request includes a target application identifier, and the target cluster includes at least one available node.
[0074] The computing unit determination module 420 may be configured to determine a first computing unit corresponding to the target application identifier.
[0075] The metadata acquisition module 430 can be used to obtain first metadata from a preset storage location when the first metadata is stored in the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node bound to the target application identifier in other clusters other than the target cluster.
[0076] The node determination module 440 may be configured to determine, from at least one available node, an available node whose topology domain information is different from that of at least one second node as the first node.
[0077] The binding module 450 may be used to bind the first node with the first computing unit to complete the scheduling of the first computing unit.
[0078] According to an embodiment of the present disclosure, when it is necessary to deploy computing units of an application in different clusters, these computing units are scheduled to nodes belonging to different topological domains based on metadata information, so that when a device in a topological domain fails, it will not affect the computing units running in other topological domains, thereby improving system reliability.
[0079] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0080] For example, any multiple of the request acquisition module 410, the computing unit determination module 420, the metadata acquisition module 430, the node determination module 440, and the binding module 450 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the request acquisition module 410, the computing unit determination module 420, the metadata acquisition module 430, the node determination module 440, and the binding module 450 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in an appropriate combination of any of them. Alternatively, at least one of the request acquisition module 410, the computing unit determination module 420, the metadata acquisition module 430, the node determination module 440 and the binding module 450 may be at least partially implemented as a computer program module, which may perform corresponding functions when executed.
[0081] Figure 5 The block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 5 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0082] like Figure 5 As shown, the computer system 500 according to the embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 502 or the program loaded from the storage part 508 to the random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0083] In RAM 503, various programs and data required for the operation of system 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other through bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0084] According to an embodiment of the present disclosure, the system 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The system 500 may further include one or more of the following components connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0085] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0086] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0087] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), 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, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0088] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0089] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0090] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for scheduling a computing unit, comprising: In response to a first request for a target cluster, determining a first computing unit corresponding to a target application identifier included in the first request, wherein the target cluster includes at least one available node; In the case where it is determined that the preset storage location stores the first metadata, obtaining the first metadata from the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node currently bound to the target application identifier in other clusters except the target cluster; Determine, from the at least one available node, an available node whose topology domain information is different from that of the at least one second node as the first node; and The first node is bound to the first computing unit to complete the scheduling of the first computing unit.
2. The method according to claim 1, further comprising: When it is determined that the preset storage location does not store the first metadata, any one of the at least one available node is determined as the first node according to a preset rule.
3. The method according to claim 1 or 2, further comprising: The target application identifier and the topological domain information of the first node are converted into second metadata, and the second metadata is stored in the preset storage location.
4. The method according to claim 3, wherein: The target cluster also includes an application program interface server; the method also includes: A first request from a user terminal is obtained through the application program interface server.
5. The method according to claim 4, wherein: The target cluster further includes a scheduler; and the determining of the first computing unit corresponding to the target application identifier includes: A first computing unit corresponding to the target application identifier is created through a scheduler in the target cluster.
6. The method according to claim 5, further comprising: The target application identifier and the topology domain information of the first node are sent to an application program interface server in the target cluster.
7. The method according to claim 6, wherein: The converting the correspondence between the target application identifier and the topology domain information of the first node into second metadata includes: The metadata controller is used to monitor the application program interface server to obtain the target application program identifier and the topology domain information of the first node, and convert the target application program identifier and the topology domain information of the first node into second metadata.
8. The method according to claim 7, wherein: The preset storage location includes a cache of the scheduler; The storing the second metadata to the preset storage location comprises: The metadata controller is monitored by the scheduler to obtain the second metadata, and the second metadata is stored in the cache of the scheduler.
9. The method according to claim 5, further comprising: Generate a scheduling result through the scheduler, and send the scheduling result to the application program interface server; as well as The scheduling result is returned to the user terminal through the application program interface server.
10. A device for scheduling a computing unit, comprising: A request acquisition module, configured to acquire a first request for a target cluster, wherein the first request includes a target application identifier, and the target cluster includes at least one available node; A computing unit determination module, used to determine a first computing unit corresponding to the target application identifier; A metadata acquisition module, configured to acquire the first metadata from a preset storage location when the first metadata is stored in the preset storage location, wherein the first metadata includes topological domain information of at least one second node, and the second node is a node in other clusters other than the target cluster and bound to the target application identifier; a node determination module, configured to determine, from the at least one available node, an available node whose topology domain information is different from that of the at least one second node, as a first node; and A binding module is used to bind the first node with the first computing unit to complete the scheduling of the first computing unit.
11. A computing device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 9.
12. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to implement the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Multi-cluster job scheduling method based on element scheduling ring
CN101340423A
Cluster job dispatching method and system
CN105260243A