A method for implementing cross-cluster resource scheduling
By using the Kubernetes cluster's raster engine in a multi-cluster environment for data acquisition and analysis, and generating cluster status index, the problem of cross-cluster resource scheduling is solved, the on-demand allocation of resources and business continuity of resources is achieved, and the service quality is improved. System reliability.
Patent Information
- Application Number
- CN202410019563.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-31
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2043-10-31
AI Technical Summary
The prior art cannot realize cross-cluster resource scheduling in multi-cluster scenarios, resulting in the inability to effectively distribute requests when a cluster fails or lacks resources, affecting business continuity.
By establishing a raster engine for multiple Kubernetes clusters, data is monitored and collected in real time, data preprocessing and analysis is performed, cluster status index is generated, and scheduling strategies are formulated to allocate tasks to target clusters with sufficient resources.
It realizes resource management and scheduling in a multi-cluster environment, improves service quality, efficiency and reliability, and ensures business continuity and on-demand scheduling of resources.
Smart Images

Figure CN117978806B_ABST
Abstract
Description
[0001] This application is a divisional application of the patent application with application number 202311422618.2 and invention name “A method for implementing cross-cluster resource scheduling”. Technical Field
[0002] The present invention relates to the technical field of cloud computing, and in particular to a method for implementing cross-cluster resource scheduling. Background Art
[0003] In the early days of cloud platform construction, a single cluster could basically meet the business needs of enterprises. However, as the demand for cloud computing continues to increase, when system and business failures and disasters occur, single clusters have become increasingly unable to meet the increasing demand due to their limited carrying capacity and limited disaster recovery capabilities. Naturally, multi-cluster orchestration has become the preferred solution. However, in the actual application scenarios of multiple clusters, because the resources and configurations of each cluster are different, the allocation and management of resources are relatively complex, and the requirement for multi-cluster load sharing has always been an important and complex problem that software systems need to solve.
[0004] In the existing technical solutions, the resource scheduling of a multi-node cluster is usually carried out by using a unified scheduling load distribution technology. The system will define one or more scheduling nodes, which collect the operating status and load of all computing service nodes, perform real-time computing analysis according to the predetermined scheduling strategy, and then allocate computing tasks to each computing node. However, the existing technical solutions only support resource scheduling for a multi-node cluster, and cannot meet the resource scheduling requirements between multiple clusters in multi-cluster application scenarios. Summary of the invention
[0005] 1. Technical issues to be solved
[0006] In view of the shortcomings of the prior art, the present invention provides a method for implementing cross-cluster resource scheduling. The prior art solution is for the scheduling and distribution of multi-node resources within a cluster, and cannot handle and solve the resource scheduling between multiple clusters. For example, in a multi-cluster application scenario, a business system is deployed on multiple clusters. If one of the clusters fails or has insufficient resources and cannot respond to requests, the prior art cannot solve such problems. The multi-cluster resource scheduling technology of the present invention needs to be used to distribute requests to other clusters with sufficient resources, so as to ensure business continuity and reduce losses.
[0007] (II) Technical solution
[0008] To achieve the above objectives, the present invention is implemented through the following technical solutions: A method for implementing cross-cluster resource scheduling includes the following steps:
[0009] S1. Pre-establish grid engines for multiple Kubernetes clusters and monitor data information of multiple cluster nodes in real time;
[0010] S2. Data collection: Collect and record relevant gateway routing data and node resource data from multiple Kubernetes clusters in real time, and establish a cluster status data set;
[0011] S3, rasterization processing: preprocessing the relevant data information collected in the cluster state data set, removing noise, analyzing and identifying it, and extracting features to generate raster data, and transmitting the raster data to the cluster state data set;
[0012] S4. Data analysis: Perform machine learning analysis on the gridded cluster status data set, split the grid data of Kubernetes1_1, Kubernetes1_2, ..., Kubernetes1_n into nodes, and analyze the running status and load of all cluster nodes, including the total resources Zzyz, occupied resources Ybzz, fault frequency Gzpl, load Fzz, memory value Ncz and network bandwidth Wlkd of each node, and perform deep mining and calculation on the grid data through the grid engine. After dimensionless technology processing, the cluster status index Jqzs is obtained. The cluster status index Jqzs is obtained by the following formula:
[0013]
[0014] Where, Lyl represents resource utilization, Jlxs represents health coefficient, Podl represents the number of Pods, F1, F2 and F3 represent the weight values of resource utilization Lyl, health coefficient Jlxs and number of Pods Podl respectively, where R represents the constant correction coefficient, 0.26≤F1≤0.35, 0.35≤F2≤0.55, 0.22≤F3≤0.62, and 1.0≤F1+F2+F3≤1.35;
[0015] S5, adaptation selection: When the grid engine initiates each request, it formulates a scheduling strategy based on the cluster status index Jqzs result, allocates it to the adapted target cluster, and distributes the task processing request to it.
[0016] Preferably, Kubernetes API technology is used to collect and record information about node resources and Pod resources, and programmatically perform operations, including querying cluster status and configuration information, creating, updating, and deleting resource objects;
[0017] The cluster status data set includes relevant gateway routing data information and node resource data information; the relevant gateway routing data information includes path matching conditions, domain name matching conditions, backend service name, backend service address, port number, identity authentication, Apiserver address, Token information, request conversion, and request response modification;
[0018] Node resource data information includes the node's network traffic, average load, run queue length, used memory, available memory, cache, swap space, total disk capacity, used disk space, available disk space, and whether the node is online, whether there is a hardware failure, and whether the operating system is running normally.
[0019] Preferably, by detecting and processing missing values of relevant data information in the cluster state data set, and using signal processing technology to remove high-frequency noise in the relevant data information, valid data is extracted and raster data is generated;
[0020] The processed data are standardized according to the dimensionless processing technology to unify the units.
[0021] Preferably, the total resource Zzyz of each node is compared with the occupied resource Ybzz, and after dimensionless processing, the resource utilization rate Lyl is obtained, and the resource utilization rate Lyl is obtained by the following formula:
[0022]
[0023] Where Zzyz represents the total resources of each node, and Ybzz represents the occupied resources in the total resources Zzyz of each node.
[0024] Preferably, the fault frequency Gzpl is associated with the load Fzz, and after dimensionless processing, a health coefficient Jlxs is obtained, and the health coefficient Jlxs is obtained by the following formula:
[0025]
[0026] Where Wxcs represents the number of maintenance times, w1, w2 and w3 represent the weight values of fault frequency Gzpl, maintenance times Wxcs and load Fzz respectively, where 0.30≤w1≤0.62, 0.20≤w2≤0.56, 0.43≤w3≤0.75, and 1.0≤w1+w2+w3≤1.65, and C represents the constant correction coefficient.
[0027] Preferably, the memory value Ncz is associated with the network bandwidth Wlkd, and after dimensionless processing, a load influence index Fzyx is obtained, and the load influence index Fzyx is obtained by the following formula:
[0028]
[0029] Where Chs represents the number of CPU cores, a1, a2, and a3 represent the weight values of the memory value Ncz, the network bandwidth Wlkd, and the number of CPU cores Chs, respectively, where 0.15≤a1≤0.32, 0.20≤a2≤0.52, 0.38≤a3≤0.66, and 0.90≤a1+a2+a3≤1.35, and B represents the constant correction coefficient.
[0030] Preferably, after the grid engine initiates each request, it maintains a set of relationship correspondence tables together with the corresponding gateway routing or service information and performs real-time calculation and update.
[0031] Preferably, when a request is initiated, the grid engine first queries the gateway route or service information corresponding to the corresponding request in the relationship correspondence table, resolves the domain name of the gateway route, finds the cluster where the gateway route or service is located, and combines the cluster status index Jqzs result to formulate a scheduling strategy, allocate it to the adapted target cluster, and distribute the task processing request to it.
[0032] Preferably, according to the scheduling strategy, it is determined whether there is an adaptation target cluster in the cluster where the gateway route or service of the corresponding request in the relationship correspondence table is located:
[0033] If there is an adapted target cluster, the grid engine will directly distribute the request to the service instance of the corresponding gateway route in the target cluster and return the response data to the requester;
[0034] If there is no matching target cluster, the grid engine will control the target cluster to initiate an STCP connection with the cluster where the gateway route corresponding to the request is located to establish a channel for communication, call the service interface of the Service instance corresponding to the gateway route in its cluster, and submit the Yaml file corresponding to the obtained Service instance to the target cluster through a POST request.
[0035] Preferably, the grid engine controls the target cluster to deploy and generate the same instance according to the corresponding YAML file through the Apiserver address and Token information of the target cluster, and selects the node to schedule and run the Pod based on the cluster status index Jqzs result, and deploys the Pod. The relationship correspondence table in the grid engine is adjusted according to the latest scheduling situation, and the corresponding request is scheduled to access the Service instance service address corresponding to the network route in the target cluster, and the response data is returned to the request end.
[0036] (III) Beneficial effects
[0037] The present invention provides a method for implementing cross-cluster resource scheduling, which has the following beneficial effects:
[0038] (1) This method for implementing cross-cluster resource scheduling is based on grid technology. It manages and analyzes multi-cluster node data through the grid engine, calculates and analyzes data such as the operating status and load conditions of each cluster in real time, and formulates a scheduling strategy to allocate the best target cluster for requests. Clusters can initiate STCP connections on demand according to the scheduling strategy to establish channels for cross-cluster Pod replication and drift, and ultimately realize the cross-cluster scheduling requirements of resources in multi-cluster scenarios, helping enterprises to achieve unified resource management and scheduling in a multi-cluster environment, and realize the resource management and traffic governance capabilities of multiple clusters.
[0039] (2) Compared with the existing main technical solutions, the invention of this patent is to achieve unified data management and cross-cluster resource scheduling through grid technology, help enterprises to more effectively manage and monitor multiple Kubernetes clusters, support on-demand resource scheduling, and improve service quality and system efficiency, reliability and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a flow chart of a method for implementing cross-cluster resource scheduling according to the present invention;
[0041] Figure 2 The figure is a schematic diagram of the steps of a method for implementing cross-cluster resource scheduling according to the present invention. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] In the early days of cloud platform construction, a single cluster could basically meet the business needs of enterprises. However, as the demand for cloud computing continues to increase, when system and business failures and disasters occur, single clusters have become increasingly unable to meet the increasing demand due to their limited carrying capacity and limited disaster recovery capabilities. Naturally, multi-cluster orchestration has become the preferred solution. However, in the actual application scenarios of multiple clusters, because the resources and configurations of each cluster are different, the allocation and management of resources are relatively complex, and the requirement for multi-cluster load sharing has always been an important and complex problem that software systems need to solve.
[0044] In the existing technical solutions, the resource scheduling of a multi-node cluster is usually carried out by using a unified scheduling load distribution technology. The system will define one or more scheduling nodes, which collect the operating status and load of all computing service nodes, perform real-time computing analysis according to the predetermined scheduling strategy, and then allocate computing tasks to each computing node. However, the existing technical solutions only support resource scheduling for a multi-node cluster, and cannot meet the resource scheduling requirements between multiple clusters in multi-cluster application scenarios.
[0045] Example 1
[0046] See also Figure 1 and Figure 2 The present invention provides a method for implementing cross-cluster resource scheduling, comprising the following steps:
[0047] S1. Pre-establish grid engines for multiple Kubernetes clusters and monitor data information of multiple cluster nodes in real time;
[0048] S2. Data collection: Collect and record relevant gateway routing data and node resource data from multiple Kubernetes clusters in real time, and establish a cluster status data set;
[0049] S3, rasterization processing: preprocessing the relevant data information collected in the cluster state data set, removing noise, analyzing and identifying it, and extracting features to generate raster data, and transmitting the raster data to the cluster state data set;
[0050] S4. Data analysis: Perform machine learning analysis on the gridded cluster status data set, split the grid data of Kubernetes1_1, Kubernetes1_2, ..., Kubernetes1_n into nodes, and analyze the running status and load of all cluster nodes, including the total resources Zzyz, occupied resources Ybzz, fault frequency Gzpl, load Fzz, memory value Ncz and network bandwidth Wlkd of each node, and perform deep mining and calculation on the grid data through the grid engine. After dimensionless technology processing, the cluster status index Jqzs is obtained. The cluster status index Jqzs is obtained by the following formula:
[0051]
[0052] In the formula, Lyl represents resource utilization, Jlxs represents health coefficient, Podl represents the number of Pods, F1, F2 and F3 represent the weight values of resource utilization Lyl, health coefficient Jlxs and Pod number Podl respectively, where R represents the constant correction coefficient, 0.26≤F1≤0.35, 0.35≤F2≤0.55, 0.22≤F3≤0.62, and 1.0≤F1+F2+F3≤1.35; the above-mentioned Pod number Podl refers to the total number of Pod instances that are currently active in the entire Kubernetes cluster, including running Pods, Pods waiting for scheduling, and Pods that have been allocated but not started.
[0053] S5, adaptation selection: When the grid engine initiates each request, it formulates a scheduling strategy based on the cluster status index Jqzs result, allocates it to the adapted target cluster, and distributes the task processing request to it.
[0054] In this embodiment, by real-time collection and recording of gateway routing data information and node resource data information of multiple Kubernetes clusters, it is convenient to timely understand the status and performance of each cluster, which helps to monitor and quickly respond to cluster changes and needs; through data preprocessing and rasterization processing, the noise in the data is removed, and useful features are extracted from the original data, thereby further improving data quality and analyzability; at the same time, machine learning technology is used to analyze the rasterized data to deeply understand the operating status and load conditions of the cluster nodes, further help optimize resource allocation and improve cluster performance, and formulate a scheduling strategy based on the results of the cluster status index Jqzs and the load impact index Fzyx to allocate tasks to the most suitable target cluster, so as to further achieve optimal resource allocation and improve task execution efficiency.
[0055] Example 2
[0056] Please refer to Figure 1 Specifically: Use Kubernetes API technology to collect and record information about node resources and Pod resources, and perform operations programmatically, including querying cluster status and configuration information, creating, updating, and deleting resource objects;
[0057] The cluster status data set includes relevant gateway routing data information and node resource data information; the relevant gateway routing data information includes path matching conditions, domain name matching conditions, backend service name, backend service address, port number, identity authentication, Apiserver address, Token information, request conversion, and request response modification;
[0058] Node resource data information includes the node's network traffic, average load, run queue length, used memory, available memory, cache, swap space, total disk capacity, used disk space, available disk space, and whether the node is online, whether there is a hardware failure, and whether the operating system is running normally.
[0059] By detecting and processing the missing values of relevant data information in the cluster status data set, and using signal processing technology to remove high-frequency noise in the relevant data information, valid data is extracted and raster data is generated;
[0060] The processed data are standardized according to the dimensionless processing technology to unify the units.
[0061] In this embodiment, through the Kubernetes API technology, information about node resources and Pod resources can be obtained in real time, including querying cluster status, creating, updating and deleting resource objects, which helps to monitor and manage the configuration and status of the cluster in real time; at the same time, by detecting and processing missing values in the data set, the integrity of the data can be ensured; using signal processing technology, high-frequency noise can be effectively removed to ensure the accuracy and stability of the data; through dimensionless processing technology, data can be standardized, unified in units and ranges, which helps to compare data of different resources for further analysis. Overall, this method combines Kubernetes API technology, data processing, dimensionless processing and signal processing technologies, and further provides a comprehensive solution for cluster resource management and monitoring to improve the stability and maintainability of the cluster, while providing useful data and indicators for resource allocation and load balancing, which is very beneficial for resource scheduling and health monitoring in a multi-cluster environment.
[0062] Example 3
[0063] Please refer to Figure 1 Specifically, the total resource Zzyz of each node is compared with the occupied resource Ybzz, and after dimensionless processing, the resource utilization rate Lyl is obtained. The resource utilization rate Lyl is obtained by the following formula:
[0064]
[0065] Where Zzyz represents the total resources of each node, and Ybzz represents the occupied resources in the total resources Zzyz of each node.
[0066] The total resource Zzyz of each node and the occupied resource Ybzz of the total resource Zzyz of each node both provide information on the usage of container resources on the node through the container resource manager.
[0067] The fault frequency Gzpl is associated with the load Fzz, and after dimensionless processing, the health coefficient Jlxs is obtained. The health coefficient Jlxs is obtained by the following formula:
[0068]
[0069] Where Wxcs represents the number of maintenance times, w1, w2 and w3 represent the weight values of fault frequency Gzpl, maintenance times Wxcs and load Fzz respectively, where 0.30≤w1≤0.62, 0.20≤w2≤0.56, 0.43≤w3≤0.75, and 1.0≤w1+w2+w3≤1.65, and C represents the constant correction coefficient.
[0070] The above-mentioned maintenance times Wxcs are obtained by recording the maintenance history of the node or device, including the time, reason, and content of the maintenance work; the fault frequency Gzpl is obtained by recording the occurrence time, type, and detailed information of the fault event through the log of the monitoring system or application, and calculating the fault frequency Gzpl based on the recorded data information; the load Fzz is obtained by using monitoring tools to monitor the load of the node or application, including CPU utilization, memory usage, network traffic, etc.
[0071] The memory value Ncz is associated with the network bandwidth Wlkd, and after dimensionless processing, a load influence index Fzyx is obtained. The load influence index Fzyx is obtained by the following formula:
[0072]
[0073] Where Chs represents the number of CPU cores, a1, a2, and a3 represent the weight values of the memory value Ncz, the network bandwidth Wlkd, and the number of CPU cores Chs, respectively, where 0.15≤a1≤0.32, 0.20≤a2≤0.52, 0.38≤a3≤0.66, and 0.90≤a1+a2+a3≤1.35, and B represents the constant correction coefficient.
[0074] The above-mentioned CPU core count and memory value Ncz are obtained by collecting data within the cloud service provider; the network bandwidth Wlkd uses a network traffic monitoring tool to capture and record the network traffic data of each node in the cluster, helping this method to understand network performance indicators such as the inbound and outbound traffic and packet transmission rate of each node.
[0075] In this embodiment, by calculating the resource utilization rate Lyl, it is easy to understand the effective use of node resources, find problems of insufficient resources or resource waste, and provide a decision-making basis for resource scheduling; the health coefficient Jlxs will evaluate the health status and stability of the node, so as to find problems in time and reduce the frequency of failures; the calculation of the load impact index Fzyx will evaluate the impact of the load on the node performance, and can further find memory and network resource bottlenecks. In short, this method comprehensively considers multiple factors to further understand the status of the node, including resource utilization, health status and load status.
[0076] Example 4
[0077] Please refer to Figure 1 ,Specifically: After the grid engine initiates each request, it maintains a set of ,relationship correspondence tables together with the corresponding gateway routing or ,service information and performs real-time calculation and update.
[0078] When a request is initiated, the grid engine first queries the gateway route or service information corresponding to the corresponding request in the relationship correspondence table, resolves the domain name of the gateway route, finds the cluster where the gateway route or service is located, and combines the cluster status index Jqzs result to formulate a scheduling strategy, allocate it to the adapted target cluster, and distribute the task processing request to it.
[0079] According to the scheduling strategy, determine whether there is an adaptation target cluster in the cluster where the gateway route or service of the corresponding request in the relationship correspondence table is located:
[0080] If there is an adapted target cluster, the grid engine will directly distribute the request to the service instance of the corresponding gateway route in the target cluster and return the response data to the requester;
[0081] If there is no matching target cluster, the grid engine will control the target cluster to initiate an STCP connection with the cluster where the gateway route corresponding to the request is located to establish a channel for communication, call the service interface of the Service instance corresponding to the gateway route in its cluster, and submit the Yaml file corresponding to the obtained Service instance to the target cluster through a POST request.
[0082] The grid engine controls the target cluster to deploy and generate the same instance according to the corresponding Yaml file through the Apiserver address and Token information of the target cluster, and selects the node to schedule and run the Pod based on the cluster status index Jqzs result, and deploys the Pod. The relationship correspondence table in the grid engine is adjusted according to the latest scheduling situation, and the corresponding request is scheduled to access the Service instance service address corresponding to the network route in the target cluster, and the response data is returned to the requester. Among them, the Apiserver address of the target cluster refers to the address of the Kubernetes APIServer of the target Kubernetes cluster, which is used as the entry point for communication and management between it and the target cluster; the Token information is used for authentication and authorized access tokens, which allow the grid engine to access the Kubernetes API of the target cluster as an authorized identity.
[0083] In this embodiment, based on grid technology, the grid engine manages and analyzes multi-cluster node data, calculates and analyzes data such as the operating status and load conditions of each cluster in real time, and formulates a scheduling strategy to allocate the best target cluster for the request. Clusters can initiate STCP connections on demand according to the scheduling strategy to establish channels for cross-cluster Pod replication and drift, and ultimately realize the cross-cluster scheduling requirements of resources in multi-cluster scenarios, helping enterprises to achieve unified resource management and scheduling in a multi-cluster environment, and realize the resource management and traffic governance capabilities of multiple clusters.
[0084] Example: A certain enterprise has introduced a method for implementing cross-cluster resource scheduling. The following is an example for the certain enterprise:
[0085] Data collection: The total resource Zzyz of each node is 69; the occupied resource Ybzz is 36; the fault frequency Gzpl is 50%; the number of maintenance times Wxcs is 6; the load Fzz is 102; w1 is 0.35; w2 is 0.33; w3 is 0.56; C is 2; the memory value Ncz is 89; the network bandwidth Wlkd is 130; the number of CPU cores Chs is 57; a1 is 0.22; a2 is 0.38; a3 is 0.58; B is 5; the number of Pods Podl is 16; R is 3; F1 is 0.30; F2 is 0.39; F3 is 0.50;
[0086] With the above data, the following calculations can be performed:
[0087] Resource Utilization
[0088] Health Factor
[0089] Load Impact Index
[0090] Cluster Status Index Combined with the cluster status index Jqzs result, a scheduling strategy is formulated, allocated to the adapted target cluster, and task processing requests are distributed to it.
[0091] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for implementing cross-cluster resource scheduling, characterized in that: The following steps are included: S1. Pre-establish grid engines for multiple Kubernetes clusters and monitor data information of multiple cluster nodes in real time; S2. Data collection: Collect and record relevant gateway routing data and node resource data from multiple Kubernetes clusters in real time, and establish a cluster status data set; S3, rasterization processing: preprocessing the relevant data information collected in the cluster state data set, removing noise, analyzing and identifying it, and extracting features to generate raster data, and transmitting the raster data to the cluster state data set; S4. Data analysis: Perform machine learning analysis on the gridded cluster status data set, split the grid data of Kubernetes1_1, Kubernetes1_2, ..., Kubernetes1_n into nodes, and analyze the running status and load of all cluster nodes, including the total resources Zzyz, occupied resources Ybzz, fault frequency Gzpl, load Fzz, memory value Ncz and network bandwidth Wlkd of each node, and perform deep mining and calculation on the grid data through the grid engine. After dimensionless technology processing, the cluster status index Jqzs is obtained. The cluster status index Jqzs is obtained by the following formula: Where, Lyl represents resource utilization, Jlxs represents health coefficient, Podl represents the number of Pods, F1, F2 and F3 represent the weight values of resource utilization Lyl, health coefficient Jlxs and number of Pods Podl respectively, where R represents the constant correction coefficient, 0.26≤F1≤0.35, 0.35≤F2≤0.55, 0.22≤F3≤0.62, and 1.0≤F1+F2+F3≤1.35; S5, Adaptation selection: When the grid engine initiates each request, it formulates a scheduling strategy based on the cluster status index Jqzs result, allocates it to the adapted target cluster, and distributes the task processing request to it. The memory value Ncz is associated with the network bandwidth Wlkd, and after dimensionless processing, a load influence index Fzyx is obtained. The load influence index Fzyx is obtained by the following formula: Where Chs is the number of CPU cores, a1, a2 and a3 are the weights of the memory value Ncz, the network bandwidth Wlkd and the number of CPU cores Chs, respectively, where 0.15≤a1≤0.32, 0.20≤a2≤0.52, 0.38≤a3≤0.66, and 0.90≤a1+a2+a3≤1.35, and B is the constant correction coefficient. According to the results of the cluster status index Jqzs and the load impact index Fzyx, a scheduling strategy is formulated to assign tasks to the most suitable target cluster. The health coefficient Jlxs is obtained by the following formula: Where Wxcs represents the number of maintenance times, w1, w2 and w3 represent the weight values of fault frequency Gzpl, maintenance times Wxcs and load Fzz respectively, where 0.30≤w1≤0.62, 0.20≤w2≤0.56, 0.43≤w3≤0.75, and 1.0≤w1+w2+w3≤1.65, and C represents the constant correction coefficient.
2. A method for implementing cross-cluster resource scheduling according to claim 1, characterized in that: Use Kubernetes API technology to collect and record information about node resources and Pod resources, and perform operations programmatically, including querying cluster status and configuration information, creating, updating, and deleting resource objects; The cluster status data set includes relevant gateway routing data information and node resource data information; the relevant gateway routing data information includes path matching conditions, domain name matching conditions, backend service name, backend service address, port number, identity authentication, Apiserver address, Token information, request conversion, and request response modification; Node resource data information includes the node's network traffic, average load, run queue length, used memory, available memory, cache, swap space, total disk capacity, used disk space, available disk space, and whether the node is online, whether there is a hardware failure, and whether the operating system is running normally.
3. A method for implementing cross-cluster resource scheduling according to claim 2, characterized in that: By detecting and processing the missing values of relevant data information in the cluster status data set, and using signal processing technology to remove high-frequency noise in the relevant data information, valid data is extracted and raster data is generated; The processed data are standardized according to the dimensionless processing technology to unify the units.
4. The method for implementing cross-cluster resource scheduling according to claim 1, characterized in that: After the grid engine initiates each request, it maintains a set of relationship correspondence tables together with the corresponding gateway routing or service information and performs real-time calculation and update.
5. A method for implementing cross-cluster resource scheduling according to claim 4, characterized in that: When a request is initiated, the grid engine first queries the gateway route or service information corresponding to the corresponding request in the relationship correspondence table, resolves the domain name of the gateway route, finds the cluster where the gateway route or service is located, and combines the cluster status index Jqzs result to formulate a scheduling strategy, allocate it to the adapted target cluster, and distribute the task processing request to it.
6. A method for implementing cross-cluster resource scheduling according to claim 5, characterized in that: According to the scheduling strategy, determine whether there is an adaptation target cluster in the cluster where the gateway route or service of the corresponding request in the relationship correspondence table is located: If there is an adapted target cluster, the grid engine will directly distribute the request to the service instance of the corresponding gateway route in the target cluster and return the response data to the requester; If there is no matching target cluster, the grid engine will control the target cluster to initiate an STCP connection with the cluster where the gateway route corresponding to the request is located to establish a channel for communication, call the service interface of the Service instance corresponding to the gateway route in its cluster, and submit the Yaml file corresponding to the obtained Service instance to the target cluster through a POST request.
7. A method for implementing cross-cluster resource scheduling according to claim 6, characterized in that: The grid engine controls the target cluster to deploy and generate the same instance according to the corresponding YAML file through the Apiserver address and Token information of the target cluster, and selects the node to schedule and run the Pod based on the cluster status index Jqzs result, and deploys the Pod. The relationship correspondence table in the grid engine is adjusted according to the latest scheduling situation, and the corresponding request is scheduled to access the Service instance service address corresponding to the network route in the target cluster, and the response data is returned to the request end.
