CN114153580A - Cross-multi-cluster work scheduling method and device - Google Patents

Cross-multi-cluster work scheduling method and device Download PDF

Info

Publication number
CN114153580A
CN114153580A CN202111416051.9A CN202111416051A CN114153580A CN 114153580 A CN114153580 A CN 114153580A CN 202111416051 A CN202111416051 A CN 202111416051A CN 114153580 A CN114153580 A CN 114153580A
Authority
CN
China
Prior art keywords
work
cluster server
analysis
target
cluster
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111416051.9A
Other languages
Chinese (zh)
Inventor
陈冲
鲁晓琳
白广河
朱小明
文朝
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bangdao Technology Co ltd
Original Assignee
Bangdao Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bangdao Technology Co ltd filed Critical Bangdao Technology Co ltd
Priority to CN202111416051.9A priority Critical patent/CN114153580A/en
Publication of CN114153580A publication Critical patent/CN114153580A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load

Abstract

The invention provides a cross-multi-cluster work scheduling method and a device, wherein the method comprises the following steps: receiving a work request of a target application; performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis; and scheduling the target work cluster server to process the work request of the target application. The method of the invention can adapt to the change of various working request scenes under multiple clusters, and the cluster scheduling system can always keep good performance.

Description

Cross-multi-cluster work scheduling method and device
Technical Field
The invention relates to the technical field of information processing, in particular to a cross-multi-cluster work scheduling method and device.
Background
With the development of cloud computing technology and the rapid increase of applications on the cloud, research on management of multiple clusters and cross-cluster scheduling has received extensive attention in the industry.
Work scheduling in clusters is generally considered a difficult decision problem, while the multi-cluster scenario complicates the work scheduling problem. At present, in a multi-cluster scene, technicians need to perform repeated and tedious manual tests and perform manual operation according to the characteristics of request workload, so that distribution and scheduling of applications among clusters can be gradually completed, and scheduling efficiency is low.
Therefore, how to better automate the task scheduling across multiple clusters has become an urgent problem to be solved in the industry.
Disclosure of Invention
The invention provides a cross-multi-cluster work scheduling method and device, which are used for better and automatically realizing cross-multi-cluster work scheduling.
The embodiment of the invention provides a cross-multi-cluster work scheduling method, which comprises the following steps:
receiving a work request of a target application;
performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis;
and scheduling the target work cluster server to process the work request of the target application.
According to the work scheduling method across multiple clusters provided by the embodiment of the invention, the multi-dimensional analysis is performed on the running data information reported by each work cluster server based on the work request of the target application, and the target work cluster server is determined, including:
based on the work request of the target application, carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining a plurality of candidate work cluster servers from each work cluster server;
and performing target data analysis on the operation data information of each candidate work cluster server, and determining the target work cluster server from each candidate work cluster server, wherein the target data analysis comprises one of the capacity analysis, the load analysis and the resource topology analysis.
According to the method for scheduling work across multiple clusters provided by the embodiment of the present invention, the performing capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server based on the work request of the target application, and determining a plurality of candidate work cluster servers from each work cluster server includes:
based on the work request of the target application, respectively carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining multiple groups of operation data information meeting the work request of the target application;
and determining a plurality of candidate working cluster servers based on the plurality of groups of running data information, wherein each group of running data information corresponds to one candidate working cluster server.
According to the method for scheduling work across multiple clusters provided by the embodiment of the present invention, the performing target data analysis on the operation data information of each candidate work cluster server, and determining the target work cluster server from each candidate work cluster server includes:
performing target data analysis on the running data information of each candidate working cluster server, and determining target running data information from each running data information;
and determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information.
According to the method for scheduling work across multiple clusters provided by the embodiment of the present invention, the target data analysis includes capacity analysis, and correspondingly, the target data analysis is performed on the operation data information of each candidate work cluster server, and the target operation data information is determined from each operation data information, including:
performing the capacity analysis on the capacity information of the running data information of each candidate working cluster server to determine the candidate working cluster server with the most capacity residual resources;
the determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information includes:
taking the candidate working cluster server with the most capacity residual resources as the target working cluster server under the condition that one candidate working cluster server with the most capacity residual resources exists;
alternatively, the first and second electrodes may be,
and when a plurality of candidate working cluster servers with the most capacity residual resources exist, randomly selecting one candidate working cluster server from the candidate working cluster servers with the most capacity residual resources as the target working cluster server.
According to the work scheduling method across multiple clusters provided by the embodiment of the present invention, after the receiving the work request of the target application, the method further includes:
and under the condition that the target work cluster server cannot be determined based on the work request of the target application, retrying to perform multi-dimensional analysis on the operation data information reported by each work cluster server, and determining the target work cluster server from each work cluster server.
An embodiment of the present invention further provides a multi-cluster-spanning job scheduling apparatus, including:
the receiving module is used for receiving a work request of a target application;
the analysis module is used for carrying out multi-dimensional analysis on the running data information reported by each working cluster server based on the working request of the target application and determining a target working cluster server from each working cluster server, wherein the multi-dimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis;
and the scheduling module is used for scheduling the target work cluster server to process the work request of the target application.
The embodiment of the present invention further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of any one of the above-mentioned multi-cluster-spanning work scheduling methods when executing the program.
Embodiments of the present invention further provide a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for scheduling work across multiple clusters as described in any one of the above.
An embodiment of the present invention further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the work scheduling method across multiple clusters as described above are implemented.
According to the cross-multi-cluster work scheduling method and device provided by the embodiment of the invention, the work request of the target application is received, the capacity analysis, the load analysis and the resource topology analysis are carried out on the operation data information reported by each work cluster server based on the work request of the target application, the work cluster servers meeting the work request of the target application are screened out, the capacity analysis, the load analysis or the resource topology analysis are further carried out on the screened work cluster servers, the optimal target work cluster server is determined, and the target work cluster server is scheduled to process the work request of the target application, so that the change of various work request scenes under multiple clusters can be adapted, and the cluster scheduling system can always keep good performance.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic diagram illustrating a scheduling process in a single cluster scenario in the prior art;
fig. 2 is one of scene topology diagrams of a work scheduling method across multiple clusters according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for scheduling work across multiple clusters according to an embodiment of the present invention;
fig. 4 is a second schematic view of a scene topology of the work scheduling method across multiple clusters according to the embodiment of the present invention;
fig. 5 is a third schematic view of a scene topology of a work scheduling method across multiple clusters according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a work scheduling apparatus across multiple clusters according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The following describes a method and an apparatus for scheduling a job across multiple clusters according to an embodiment of the present invention with reference to fig. 1 to 7.
It should be noted that Kubernetes is an open source system for managing containerized applications developed by Google based on Borg. Kubernets, which is based on good container environment and scheduling capability, facilitates expansion and contraction management of cluster nodes, so that kubernets have become popular in recent years and adopted by numerous industrial entities, has grown into an implementation standard in the field of container management.
Currently, Kube-scheduler is the default scheduler for kubernets cluster to bind workloads to the most appropriate work nodes according to various scheduling algorithms.
Fig. 1 is a schematic diagram of a scheduling process in a single cluster scenario in the prior art, as shown in fig. 1, when a work request enters a scheduling controller, the scheduling process shown in fig. 1 is triggered, and the whole scheduling process generally includes two stages: a filtration stage and a scoring stage.
In the filtering stage, the scheduling controller filters out the working nodes which do not meet the conditions in all the nodes, and preliminarily screens out all the working nodes which meet the scheduling requirements to obtain preliminarily screened nodes, which belong to mandatory rules. All the candidate nodes meeting the requirements obtained in the stage are recorded into a list and enter a scoring stage for scoring and sorting to obtain the optimally selected working node. If all nodes can not pass the preliminary screening and can not acquire the candidate nodes, namely the list is empty, the container is always in a Pending (Pending) state, and the scheduler continuously retries the filtering until a working node meets the condition. For example, the resources of a certain working node are not sufficient to meet the needs of the application work. Generally, the filter function checks whether the available resources of the candidate node can satisfy the resource request of the scheduling task.
In the scoring stage, according to a currently enabled scoring rule, priority ranking is performed on candidate working nodes, and finally the node with the highest score is selected to deploy the application. If there are multiple nodes with the highest scores, the scheduler will randomly choose one to run the relevant workload. For example, nodes with richer resources and less load may have a higher ranking.
In the traditional resource management problem, the solution of job scheduling in a single cluster depends on workload and node conditions. Factors to be considered in making scheduling decisions include: individual and overall resource requests, hardware/software/policy constraints, affinity and anti-affinity requirements, data locality, inter-load interference, and the like. Many scheduling algorithms have been designed in a single cluster, such as capacity scheduling, topology-aware scheduling policy, etc. These heuristics give priority to generality, ease of understanding, and ease of execution.
High availability to recover from cloud resource failures is one of the indexes that cloud providers take into account when building a cluster. With the continuous increase of user demands in the cloud resource market and the demand of remote disaster recovery, a plurality of available clusters are built in each geographic area. The multi-cluster can realize decentralization and robustness, can ensure the multi-cloud distribution of the workload, the high availability of the application program and the like, and becomes a mainstream choice for building numerous enterprises. However, the function of cross-cluster distribution is lacking in the traditional Kubernetes default scheduling component, and the federate cluster is not mature as the largest Kubernetes open source sub-project, so that various difficulties and limitations encountered in the implementation process bring about greater and greater uncertainty to the development prospect of multi-cluster management.
Therefore, embodiments of the present invention provide a method and an apparatus for cross-cluster work scheduling to solve the technical defects in the related art.
Fig. 2 is one of scene topology schematic diagrams of a cross-multi-cluster work scheduling method provided in an embodiment of the present invention, and as shown in fig. 2, in the embodiment of the present invention, a multi-cluster deployment scene mainly includes a master cluster server, a scheduling controller configured in the master cluster server, and each work cluster server.
The main cluster server allows a plurality of Kubernets working cluster servers to be coordinated, and the Kubernets working cluster servers store the registration information of each working cluster server;
the working cluster servers are clusters participating in working load, report respective operation data information to the main cluster server by each working cluster server, and receive a scheduling information instruction of the main cluster server; the working cluster servers are mainly subject to the regulations of specific regions or certifications, wherein a single cluster server can be adjusted, and the working cluster servers have the characteristics of high availability, isolation, expandability and the like, are beneficial to a development team to deploy an application program into an isolated cluster, and selectively expose services available for testing and publishing.
The scheduling controller, also called a master cluster scheduler, is a component of a kubernets control plane of a master cluster system, and is used for processing the selection, distribution and scheduling of workload application, and issuing a scheduling result to a work cluster server to realize the scheduling of a target work cluster server, and is a core component for completing multi-cluster work scheduling.
With continued reference to FIG. 2, the master cluster system is typically hosted in a local cloud environment, which serves as some important host cluster, while other edge zone or hybrid cloud environments serve as worker clusters.
The multiple clusters are very important for ensuring that different requirements are complied with and services which conflict with each other are met, the working cluster servers report respective operation data information to the main cluster server at regular time, and the main cluster server can receive the real-time operation data information of the working cluster servers.
And when receiving the working request of the application, the main cluster server implements a distribution scheduling strategy of the application according to the real-time running data information reported by each working cluster server, and selects the optimal working cluster server meeting the working load condition.
Fig. 3 is a schematic flowchart of a method for scheduling work across multiple clusters according to an embodiment of the present invention, where as shown in fig. 3, the method includes: step 101, step 102 and step 103.
Step 101, receiving a work request of a target application;
specifically, the target application described in the embodiment of the present invention refers to an application that the master cluster server selects to process.
The work request of the target application described in the embodiment of the present invention refers to a data processing resource request of the target application sent to the master cluster server by a user. It may specifically include at least one of required capacity information, required load information and required resource topology information.
In the embodiment of the invention, the user can only interact with the main cluster system, and the rest of the working cluster servers schedule and control the main cluster servers in the main cluster system to complete the working load of the running target application.
When a user applies for a work request of a resource execution target application from a main cluster system, a main cluster server receives the work request of the target application.
102, performing multidimensional analysis on running data information reported by each working cluster server based on a working request of the target application, and determining a target working cluster server from each working cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis;
specifically, the operation data information described in the embodiment of the present invention refers to operation state data reported to the master cluster server by each of the work cluster servers, and may specifically include capacity information, load information, resource topology information, and the like of the work cluster servers.
The multidimensional analysis described in the embodiment of the present invention refers to analysis of multiple information dimensions by the master cluster server on the operation data information reported by each of the working cluster servers, where the multidimensional analysis includes at least one of capacity analysis, load analysis, and resource topology analysis.
The target work cluster server described in the embodiment of the present invention refers to an optimal work cluster server determined by a master cluster server through performing multidimensional analysis on operation data information of each work cluster server, and is configured to receive scheduling of a scheduling controller in a master cluster system and process a work request of a target application.
It should be noted that, in the work scheduling method according to the embodiment of the present invention, the whole work scheduling process is also divided into two stages, namely, a filtering stage and a scoring stage.
In the embodiment of the present invention, the capacity analysis refers to the analysis of the capacity information of the working cluster servers, which belongs to the important process of the capacity scheduling policy. The capacity scheduling policy is the most common policy supported natively by Kubernetes. In the scheduling process under the multi-cluster scene, in the filtering stage, the main cluster scheduler only considers scheduling the work to the work clusters with the storage capacity meeting the limiting condition. In the grading stage, clusters with more residual capacity get higher scores;
because capacity information required by a work request based on target application exists in a floating range compared with the capacity of actual application work when a capacity scheduling strategy is used, when the resource capacity planning of the request is more, the working capacity of a working cluster server is underestimated and is in a low load, and resource waste is caused; conversely, there is a risk of overload. Therefore, the capacity analysis is simple and efficient, the cost is low, but the performance of the working cluster is sacrificed, and the risk of low load and overload exists.
In the embodiment of the present invention, the load analysis refers to an analysis made by sensing the actual resource load condition of each work cluster server, and belongs to an important process of a load-sensing scheduling policy. In the scheduling process, key resources such as a CPU/memory and the like in the working cluster are monitored uninterruptedly to obtain monitoring data and report the monitoring data to a scheduling controller in a main cluster system in real time. Generally, the load-aware scheduling policy is to filter the work cluster servers according to the resource indexes most concerned by the current work, and select the work cluster server with the lowest load rate. In the scoring phase, the scores will be higher for the cluster servers that are working at a lower load rate.
In the embodiment of the invention, the resource topology analysis refers to the analysis of the topology relationship among the servers of the working cluster, which belongs to the important process of the topology-aware scheduling policy. The method aims to deploy application work in a work cluster server which belongs to the same logic with the application work, so that the application work is uniformly distributed in the whole cluster. When the cumulative number of allocable resources in the cluster is almost the same, the topology-aware scheduling policy can acquire resource topology information to make a more uniformly distributed scheduling decision;
in the filtering stage in the work scheduling process, the scheduling controller in the main cluster system receives the topology information of the work cluster server, makes constraint conditions according to the configurable logic relationship, and continuously reduces the constraint conditions to obtain an optimal solution. In the scoring stage, the better the resource uniformity of the working cluster, the higher the scoring score, the greater the likelihood of selecting this cluster.
In the embodiment of the invention, a hybrid strategy of cross-multi-cluster work scheduling is provided by combining the advantages of different strategies in a capacity scheduling strategy, a load-aware scheduling strategy and a topology-aware scheduling strategy, namely, after a scheduling controller in a main cluster system receives a work request of a target application, in the scheduling process, according to required capacity information, required load information and required resource topology information in the work request of the target application, multi-dimensional analysis of capacity analysis, load analysis and resource topology analysis is carried out on the running data information reported by each work cluster server, so that the target work cluster server is determined from each work cluster server.
Step 103, scheduling the target work cluster server to process the work request of the target application.
Specifically, in the embodiment of the present invention, after the target work cluster server is determined, the scheduling controller issues the scheduling instruction to the target work cluster server, so that the target application is deployed in the target work cluster server, and the target work cluster server is instructed to process the work request of the target application and some subsequent data processing works of the target application.
According to the cross-multi-cluster work scheduling method provided by the invention, the work request of the target application is received, the capacity analysis, the load analysis and the resource topology analysis are carried out on the operation data information reported by each work cluster server based on the work request of the target application, the work cluster servers meeting the work request of the target application are screened out, the capacity analysis, the load analysis or the resource topology analysis are further carried out on the screened work cluster servers, the optimal target work cluster server is determined, the target work cluster server is scheduled to process the work request of the target application, so that the change of various work request scenes under multiple clusters can be adapted, and the cluster scheduling system can always keep good performance.
Optionally, the performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application to determine a target work cluster server includes:
based on the work request of the target application, carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining a plurality of candidate work cluster servers from each work cluster server;
and performing target data analysis on the operation data information of each candidate work cluster server, and determining the target work cluster server from each candidate work cluster server, wherein the target data analysis comprises one of the capacity analysis, the load analysis and the resource topology analysis.
Specifically, the candidate work cluster server described in the embodiment of the present invention refers to a work cluster server that is primarily screened out from each work cluster server by performing capacity analysis, load analysis, and resource topology analysis on the operation data information reported by each work cluster server, that is, in a filtering stage.
The target data analysis described in the embodiment of the present invention refers to data analysis to be performed on the operational data information of the candidate working cluster server, which is determined based on a fixed policy set manually or by a script in advance, and includes one of capacity analysis, load analysis, and resource topology analysis.
Fig. 4 is a second scenario topology schematic diagram of the cross-multi-cluster work scheduling method provided in the embodiment of the present invention, and as shown in fig. 4, a multi-cluster environment based on Kubernetes is considered, and a hybrid policy of cross-multi-cluster work scheduling is provided in the embodiment of the present invention; in the dispatching process, after a main cluster dispatcher receives a work request, a filtering stage adopts a mixed filtering mode of the strategy A, the strategy B and the strategy C, namely capacity analysis, load analysis and resource topology analysis are simultaneously carried out on the operation data information of each work cluster server, more comprehensive filtering is carried out on the constraint condition for screening the work cluster servers, and the work cluster servers meeting the work request are screened for the first time.
Therefore, in the embodiment of the present invention, according to the received work request of the target application, the capacity analysis, the load analysis, and the resource topology analysis are performed on the operation data information of each work cluster server, and a plurality of candidate work cluster servers can be determined from each work cluster server.
With continued reference to fig. 4, according to the current usage scenario of the kubernets multi-cluster, the usage scenario is roughly divided into three categories, that is, a capacity scheduling scenario in which the resource quota of the work request is more concerned, a load-aware scheduling scenario in which various resource occupation ratios of idle work clusters are more emphasized, and a topology-aware scheduling scenario in which the topological relationship between the work clusters is more concerned.
In the scoring stage, in the embodiment of the present invention, based on a fixed policy set manually or by a script in advance, a scenario suitable for a work request of a target application is determined from the three scenarios, and according to a scoring policy of the determined scenario, such as a policy a, target data analysis is performed on operation data information of each candidate work cluster server, and a candidate work cluster server with the highest score is determined, so that a target work cluster server is screened from each candidate work cluster server.
And obtaining an optimal scheduling result through the grading stage, and issuing the optimal scheduling result to the target work cluster server so as to schedule the target work cluster server to process the work request of the target application.
According to the method, the target work cluster server is finally determined by comprehensively screening the operation data information of each work cluster server, so that a distribution mechanism of the multi-cluster scheduling result application of kubernets is realized, the method has the characteristics of self-adaption, flexibility and low cost, and can be suitable for the change of various work request scenes under the multi-cluster scene.
Optionally, the performing, based on the work request of the target application, capacity analysis, load analysis, and resource topology analysis on the operation data information of each work cluster server, and determining a plurality of candidate work cluster servers from each work cluster server includes:
based on the work request of the target application, respectively carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining multiple groups of operation data information meeting the work request of the target application;
and determining a plurality of candidate working cluster servers based on the plurality of groups of running data information, wherein each group of running data information corresponds to one candidate working cluster server.
Specifically, in the embodiment of the present invention, in the filtering stage, the scheduling controller in the master cluster system analyzes the capacity information in the running data information reported by each working cluster server according to the capacity information required by the resource request in the target application working request, and determines the running data information meeting the capacity information required by the resource request;
the scheduling controller analyzes the load information in the running data information meeting the capacity information required by the resource request according to the required load information in the target application work request, determines the running data information meeting the required capacity information and the required load information at the same time, and obtains a further filtering result;
further, the scheduling controller performs resource topology analysis on the further filtering result according to resource topology information required by the resource request in the target application work request, and determines the operation data information simultaneously meeting the required capacity information, the required load information and the required resource topology information, that is, multiple sets of operation data information meeting the work request of the target application can be determined.
Based on the multiple sets of running data information meeting the work request of the target application, the work cluster servers corresponding to the multiple sets of running data information can be further determined, and therefore multiple candidate work cluster servers can be determined according to the multiple sets of running data information.
Fig. 5 is a third scenario topology schematic diagram of the multi-cluster-spanning work scheduling method provided in the embodiment of the present invention, and as shown in fig. 5, a hybrid filtering stage is performed in the scheduling process, that is, the main cluster scheduler performs capacity analysis, load analysis, and resource topology analysis on the operation data information reported by each work cluster server according to the required capacity information, the required load information, and the required resource topology information in the target application work request, that is, performs filtering in sequence according to the policy a, the policy B, and the policy C, to determine a plurality of candidate work cluster servers.
According to the method provided by the embodiment of the invention, the mixed analysis of capacity analysis, load analysis and resource topology analysis is respectively carried out on the operation data information of each work cluster server according to the work request of the target application, so that the filtering stage in the scheduling process is more comprehensively filtered, the work cluster servers meeting the conditions are more effectively screened out in the filtering stage, and the method is favorable for adapting to the change of various work request scenes in a multi-cluster scene.
Optionally, the performing target data analysis on the operation data information of each candidate work cluster server, and determining the target work cluster server from each candidate work cluster server includes:
performing target data analysis on the running data information of each candidate working cluster server, and determining target running data information from each running data information;
and determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information.
Specifically, the target operation data information described in the embodiment of the present invention refers to operation data information determined after target data analysis.
In the embodiment of the invention, after a plurality of candidate working cluster servers are determined through a mixing and filtering stage, target data analysis is further performed on the candidate working cluster servers, namely, a mixing and scoring stage is performed.
In the embodiment of the invention, the mixed scoring stage refers to a stage of determining to score by a policy A, a policy B or a policy C according to a fixed policy set manually or by a script in advance so as to determine to score and sort the running data information of each candidate working cluster server.
In the embodiment of the present invention, the specific mixing scoring strategy is executed according to the following three scenarios:
in a first scenario, under a scenario that the resource quota of the work request is concerned more, the capacity scheduling policy has better adaptivity in a Kubernetes scheduling process. And configuring a capacity scheduling algorithm in a grading stage, configuring upper and lower limits of resource occupation, presetting a resource buffer area to facilitate quota elastic fault tolerance, and preferentially filtering the working cluster with capacity meeting the limit. It is to be understood that scenario one fits the A policy;
and in a second scenario, the load-aware scheduling strategy can emphasize the occupation ratio of various resources of the idle working cluster, and monitor and measure the change of the resources before and after deployment. The load perception scheduling strategy is configured in the grading stage, so that the target application can be reduced to be deployed on the cluster with unbalanced working cluster server resources, and the condition that the resources are exhausted or excessively remained in the working cluster server is avoided.
It can be appreciated that scenario two is suitable for the B policy;
and in a third scenario, when the operating state of the working cluster is very robust, a plurality of working cluster servers capable of scheduling working requests are available, and at the moment, in order to realize the characteristics of disaster tolerance, high availability and the like of multi-cluster management, the target applications are distributed on different available working cluster servers as uniformly as possible, namely, a topology-aware scheduling strategy is executed. And in the grading stage, obtaining the working cluster information of different topological domains, and screening to obtain candidate working clusters according to configured constraint conditions such as affinity distribution degree and the like. It can be appreciated that scenario three fits the C policy.
For example, after the hybrid filtering stage, after a plurality of candidate working cluster servers are determined, a scoring strategy under a second scene is determined based on a fixed strategy set manually or by a script in advance, that is, a B strategy is used for scoring, at this time, target data analysis is load analysis, further load analysis is performed on the running data information of the plurality of candidate working cluster servers, based on consideration of the occupation ratio of various resources of the idle working cluster, load information in the running data information of each candidate working cluster server is scored, and the working cluster servers with lower load ratios obtain higher scores.
And after a mixed grading stage, determining target operation data information with the optimal score, and further determining a target work cluster server based on a candidate work cluster server corresponding to the target operation data information.
Continuing to refer to fig. 5, as shown in fig. 5, after a plurality of candidate working cluster servers are determined, entering a hybrid scoring stage, scoring and sorting the running data information of each candidate working cluster server, determining the target running data information with the optimal score, and then the main cluster scheduler issues the optimal result to the target working cluster server corresponding to the target running data information to perform working scheduling on the target working cluster server.
According to the method provided by the embodiment of the invention, the target data analysis is carried out on the operation data information of each candidate working cluster server through the predetermined scheduling strategy, so that the optimal target working cluster server can be more quickly and effectively screened out, and the change of various working request scenes under a multi-cluster scene can be effectively coped with.
Optionally, the target data analysis includes capacity analysis, and correspondingly, the performing target data analysis on the operation data information of each candidate work cluster server and determining target operation data information from each operation data information includes:
performing the capacity analysis on the capacity information of the running data information of each candidate working cluster server to determine the candidate working cluster server with the most capacity residual resources;
the determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information includes:
taking the candidate working cluster server with the most capacity residual resources as the target working cluster server under the condition that one candidate working cluster server with the most capacity residual resources exists;
alternatively, the first and second electrodes may be,
and when a plurality of candidate working cluster servers with the most capacity residual resources exist, randomly selecting one candidate working cluster server from the candidate working cluster servers with the most capacity residual resources as the target working cluster server.
Specifically, in the embodiment of the present invention, when the target data analysis includes capacity analysis, a rating policy is set for a scene based on a fixed policy set manually or by a script in advance, that is, a policy a is used for rating.
In this case, the capacity information of the operation data information of each candidate operation cluster server is subjected to capacity analysis and sorted into scores, and the larger the capacity surplus information is, the higher the score is, so that the candidate operation cluster server with the largest capacity surplus resource is determined.
Further, if there is a candidate working cluster server with the most capacity and remaining resources, it can be understood that the candidate working cluster server is the optimal working cluster server that meets the high availability requirement of the resource quota of the working request, and then the candidate working cluster server is taken as the target working cluster server.
If a plurality of candidate working cluster servers with the most capacity residual resources exist, it is indicated that the capacity residual information of the candidate working cluster servers are all the same and are all the optimal working cluster servers meeting the high availability requirement of the resource quota of the working request, and then one candidate working cluster server is randomly selected as the target working cluster server.
According to the method provided by the embodiment of the invention, under the condition that the target data analysis comprises capacity analysis, one candidate work cluster server or a plurality of candidate work cluster servers are screened through the capacity analysis, so that the target work cluster server can be effectively screened, the smooth operation of work scheduling is ensured, and the method is favorable for adapting to the work scheduling under different multi-cluster scenes.
Optionally, after the receiving the work request of the target application, the method further includes:
and under the condition that the target work cluster server cannot be determined based on the work request of the target application, retrying to perform multi-dimensional analysis on the operation data information reported by each work cluster server, and determining the target work cluster server from each work cluster server.
Specifically, in the embodiment of the present invention, if the target work cluster server cannot be determined based on the work request of the target application, that is, all the work cluster servers cannot pass through the hybrid filtering stage in the work scheduling process, the master cluster scheduler retries to perform multidimensional analysis on the operation data information reported by each work cluster server, and if the target work cluster server is determined from each work cluster server, schedules the target work cluster server to process the work request of the target application.
In some embodiments, when there is no working cluster server meeting the filtering rule, and the target working cluster server cannot be determined, the main cluster scheduler is in a pending waiting state, and at this time, by setting the main cluster scheduler to perform retry analysis for a preset number of times, the main cluster scheduler retries for multiple times at a certain time interval to perform multidimensional analysis on the operation data information of each working cluster server.
In the embodiment of the present invention, the preset number of times and the time interval for the master cluster scheduler to perform the retry analysis may be set according to actual requirements, and are not specifically limited in the embodiment of the present invention.
If the target work cluster server cannot be determined by the main cluster scheduler after the preset times of retry analysis, the main cluster scheduler stops retry analysis on the running data information of each work cluster server and reports scheduling failure information to the main cluster server.
The method of the embodiment of the invention performs multidimensional analysis on the operation data information reported by each work cluster server by retrying under the condition that the target work cluster server cannot be determined, so as to effectively ensure that the work scheduling strategy across multiple clusters is smoothly executed, and the method is favorable for adapting to different work request scenes under the multiple cluster scene.
The following describes the multi-cluster-spanning work scheduling apparatus provided in the embodiment of the present invention, and the multi-cluster-spanning work scheduling apparatus described below and the multi-cluster-spanning work scheduling method described above may be referred to each other correspondingly.
Fig. 6 is a schematic structural diagram of a work scheduling apparatus across multiple clusters according to an embodiment of the present invention, and as shown in fig. 6, the apparatus includes:
a receiving module 601, configured to receive a work request of a target application;
an analysis module 602, configured to perform multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determine a target work cluster server from each work cluster server, where the multidimensional analysis includes at least one of capacity analysis, load analysis, and resource topology analysis;
a scheduling module 603, configured to schedule the target work cluster server to process the work request of the target application.
The multi-cluster-crossing work scheduling apparatus according to the embodiment of the present invention may be used in the embodiment of the multi-cluster-crossing work scheduling method, and the principle and technical effect are similar, which are not described herein again.
According to the multi-cluster-crossing work scheduling device provided by the embodiment of the invention, the work request of the target application is received, the capacity analysis, the load analysis and the resource topology analysis are carried out on the operation data information reported by each work cluster server based on the work request of the target application, the work cluster servers meeting the work request of the target application are screened out, the capacity analysis, the load analysis or the resource topology analysis are further carried out on the screened work cluster servers, the optimal target work cluster server is determined, the target work cluster server is scheduled to process the work request of the target application, so that the multi-cluster-crossing work scheduling device can adapt to the change of various work request scenes under multiple clusters, and the cluster scheduling system can always keep good performance.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 7, the electronic device may include: a processor (processor)710, a communication Interface (Communications Interface)720, a memory (memory)730, and a communication bus 740, wherein the processor 710, the communication Interface 720, and the memory 730 communicate with each other via the communication bus 740. Processor 710 may invoke logic instructions in memory 730 to perform the work scheduling method across multiple clusters provided by the methods described above, the method comprising: receiving a work request of a target application; performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis; and scheduling the target work cluster server to process the work request of the target application.
In addition, the logic instructions in the memory 730 can be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, a computer is capable of executing the method for scheduling work across multiple clusters provided by the above methods, the method comprising: receiving a work request of a target application; performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis; and scheduling the target work cluster server to process the work request of the target application.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for scheduling work across multiple clusters provided by the above methods, the method comprising: receiving a work request of a target application; performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis; and scheduling the target work cluster server to process the work request of the target application.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for work scheduling across multiple clusters, comprising:
receiving a work request of a target application;
performing multidimensional analysis on the operation data information reported by each work cluster server based on the work request of the target application, and determining a target work cluster server from each work cluster server, wherein the multidimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis;
and scheduling the target work cluster server to process the work request of the target application.
2. The method according to claim 1, wherein the performing multidimensional analysis on the running data information reported by each work cluster server based on the work request of the target application to determine a target work cluster server comprises:
based on the work request of the target application, carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining a plurality of candidate work cluster servers from each work cluster server;
and performing target data analysis on the operation data information of each candidate work cluster server, and determining the target work cluster server from each candidate work cluster server, wherein the target data analysis comprises one of the capacity analysis, the load analysis and the resource topology analysis.
3. The method for scheduling work across multiple clusters according to claim 2, wherein the performing capacity analysis, load analysis and resource topology analysis on the operation data information of each of the work cluster servers based on the work request of the target application, and determining a plurality of candidate work cluster servers from each of the work cluster servers comprises:
based on the work request of the target application, respectively carrying out capacity analysis, load analysis and resource topology analysis on the operation data information of each work cluster server, and determining multiple groups of operation data information meeting the work request of the target application;
and determining a plurality of candidate working cluster servers based on the plurality of groups of running data information, wherein each group of running data information corresponds to one candidate working cluster server.
4. The method for work scheduling across multiple clusters according to claim 2, wherein the performing target data analysis on the operation data information of each candidate work cluster server and determining the target work cluster server from each candidate work cluster server comprises:
performing target data analysis on the running data information of each candidate working cluster server, and determining target running data information from each running data information;
and determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information.
5. The method according to claim 4, wherein the target data analysis comprises capacity analysis, and accordingly, the performing the target data analysis on the operation data information of each candidate operation cluster server and determining the target operation data information from each operation data information comprises:
performing the capacity analysis on the capacity information of the running data information of each candidate working cluster server to determine the candidate working cluster server with the most capacity residual resources;
the determining the target working cluster server based on the candidate working cluster server corresponding to the target operation data information includes:
taking the candidate working cluster server with the most capacity residual resources as the target working cluster server under the condition that one candidate working cluster server with the most capacity residual resources exists;
alternatively, the first and second electrodes may be,
and when a plurality of candidate working cluster servers with the most capacity residual resources exist, randomly selecting one candidate working cluster server from the candidate working cluster servers with the most capacity residual resources as the target working cluster server.
6. The method of work scheduling across multiple clusters according to claim 1, further comprising, after said receiving a work request of a target application:
and under the condition that the target work cluster server cannot be determined based on the work request of the target application, retrying to perform multi-dimensional analysis on the operation data information reported by each work cluster server, and determining the target work cluster server from each work cluster server.
7. A work scheduler across multiple clusters, comprising:
the receiving module is used for receiving a work request of a target application;
the analysis module is used for carrying out multi-dimensional analysis on the running data information reported by each working cluster server based on the working request of the target application and determining a target working cluster server from each working cluster server, wherein the multi-dimensional analysis comprises at least one of capacity analysis, load analysis and resource topology analysis;
and the scheduling module is used for scheduling the target work cluster server to process the work request of the target application.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method of work scheduling across multiple clusters as claimed in any one of claims 1 to 6.
9. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the steps of the method for work scheduling across multiple clusters according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the steps of the method of work scheduling across multiple clusters according to any of claims 1 to 6.
CN202111416051.9A 2021-11-25 2021-11-25 Cross-multi-cluster work scheduling method and device Pending CN114153580A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111416051.9A CN114153580A (en) 2021-11-25 2021-11-25 Cross-multi-cluster work scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111416051.9A CN114153580A (en) 2021-11-25 2021-11-25 Cross-multi-cluster work scheduling method and device

Publications (1)

Publication Number Publication Date
CN114153580A true CN114153580A (en) 2022-03-08

Family

ID=80457752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111416051.9A Pending CN114153580A (en) 2021-11-25 2021-11-25 Cross-multi-cluster work scheduling method and device

Country Status (1)

Country Link
CN (1) CN114153580A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422518A (en) * 2022-03-31 2022-04-29 北京奥星贝斯科技有限公司 Method and device for requesting service
CN115237608A (en) * 2022-09-21 2022-10-25 之江实验室 Multi-mode scheduling system and method based on unified computing power of multiple clusters
TWI795262B (en) * 2022-04-06 2023-03-01 中華電信股份有限公司 System for deploying high availability service, method and computer readable medium thereof
CN116700933A (en) * 2023-08-02 2023-09-05 之江实验室 Heterogeneous computing power federation-oriented multi-cluster job scheduling system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422518A (en) * 2022-03-31 2022-04-29 北京奥星贝斯科技有限公司 Method and device for requesting service
TWI795262B (en) * 2022-04-06 2023-03-01 中華電信股份有限公司 System for deploying high availability service, method and computer readable medium thereof
CN115237608A (en) * 2022-09-21 2022-10-25 之江实验室 Multi-mode scheduling system and method based on unified computing power of multiple clusters
CN116700933A (en) * 2023-08-02 2023-09-05 之江实验室 Heterogeneous computing power federation-oriented multi-cluster job scheduling system and method
CN116700933B (en) * 2023-08-02 2023-11-21 之江实验室 Heterogeneous computing power federation-oriented multi-cluster job scheduling system and method

Similar Documents

Publication Publication Date Title
CN114153580A (en) Cross-multi-cluster work scheduling method and device
CN108632365B (en) Service resource adjusting method, related device and equipment
US7856572B2 (en) Information processing device, program thereof, modular type system operation management system, and component selection method
US9477460B2 (en) Non-transitory computer-readable storage medium for selective application of update programs dependent upon a load of a virtual machine and related apparatus and method
CN108965014A (en) The service chaining backup method and system of QoS perception
CN110838939B (en) Scheduling method based on lightweight container and edge Internet of things management platform
CN111309440B (en) Method and equipment for managing and scheduling multiple types of GPUs
WO2022002148A1 (en) Resource scheduling method, resource scheduling system, and device
CN115454589A (en) Task scheduling method and device and Kubernetes scheduler
CN106101212A (en) Big data access method under cloud platform
CN114756347A (en) Cluster-based server resource scheduling method and device, cloud platform and medium
CN111767145A (en) Container scheduling system, method, device and equipment
CN108574718A (en) A kind of cloud host creation method and device
CN105827744A (en) Data processing method of cloud storage platform
CN115964176B (en) Cloud computing cluster scheduling method, electronic equipment and storage medium
CN112395269B (en) MySQL high availability group building method and device
CN115061811A (en) Resource scheduling method, device, equipment and storage medium
CN112835989A (en) Single-application multi-MySQL Set deployment method and system
CN114443293A (en) Deployment system and method for big data platform
CN113590317A (en) Scheduling method, device, medium and computing equipment of offline service
CN116938943B (en) Cloud host scheduling method, device, equipment and storage medium
CN108628708A (en) Cloud computing fault-tolerance approach and device
CN113391891B (en) Load balancing resource scheduling method based on Rete and character string pattern matching algorithm
CN112990744B (en) Automatic operation and maintenance method and device for massive million-level cloud equipment
CN112363811B (en) Artificial intelligence computing resource scheduling method and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination